@boostxyz/sdk 0.0.0-alpha.17 → 0.0.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +13 -13
- package/dist/Actions/ContractAction.d.ts +9 -9
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +12 -12
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +32 -49
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +13 -962
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +5 -5
- package/dist/AllowLists/SimpleAllowList.js +24 -24
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +6 -6
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +18 -0
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BiPwp6SR.cjs +3 -0
- package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
- package/dist/BoostCore-kwoUw7YE.js +1477 -0
- package/dist/BoostCore-kwoUw7YE.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +86 -36
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1273
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +25 -19
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +30 -29
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +18 -18
- package/dist/Budgets/ManagedBudget.js +48 -48
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +23 -23
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +4 -5
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.js +1 -1
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +5 -5
- package/dist/Deployable/DeployableTarget.js +6 -6
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +15 -15
- package/dist/Deployable/DeployableTargetWithRBAC.js +33 -33
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/EventAction-D5tnm00s.js +1355 -0
- package/dist/EventAction-D5tnm00s.js.map +1 -0
- package/dist/EventAction-DBDRaG4A.cjs +2 -0
- package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
- package/dist/{Incentive-DJf-vdyL.js → Incentive-Bp8Sez7M.js} +61 -62
- package/dist/Incentive-Bp8Sez7M.js.map +1 -0
- package/dist/{Incentive-DNwROd1r.cjs → Incentive-Djnzseoj.cjs} +2 -2
- package/dist/Incentive-Djnzseoj.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +12 -12
- package/dist/Incentives/AllowListIncentive.js +19 -19
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +15 -15
- package/dist/Incentives/CGDAIncentive.js +18 -18
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +23 -23
- package/dist/Incentives/ERC20Incentive.js +25 -25
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +3 -3
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +14 -14
- package/dist/Incentives/PointsIncentive.js +21 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-DMlUkmAn.cjs → SimpleDenyList-BwfNjRsg.cjs} +2 -2
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/{SimpleDenyList-DvUvmOeE.js → SimpleDenyList-Cn5WpNn0.js} +9 -9
- package/dist/SimpleDenyList-Cn5WpNn0.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +14 -14
- package/dist/Validators/SignerValidator.js +19 -19
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs.map +1 -1
- package/dist/claiming.d.ts +1 -1
- package/dist/claiming.js.map +1 -1
- package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
- package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
- package/dist/componentInterfaces-RXBMI5yH.js +14 -0
- package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
- package/dist/deployments-BM42vImE.js +43 -0
- package/dist/deployments-BM42vImE.js.map +1 -0
- package/dist/deployments-CMdF5uEC.cjs +2 -0
- package/dist/deployments-CMdF5uEC.cjs.map +1 -0
- package/dist/deployments.json +15 -12
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +132 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +122 -36
- package/dist/errors.js.map +1 -1
- package/dist/generated-B0tk-c9b.cjs +3 -0
- package/dist/generated-B0tk-c9b.cjs.map +1 -0
- package/dist/{generated-C_7Jx3YG.js → generated-B7VaSah4.js} +631 -343
- package/dist/generated-B7VaSah4.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -126
- package/dist/transfers.cjs.map +1 -1
- package/dist/transfers.d.ts +1 -1
- package/dist/transfers.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +5 -5
- package/src/Actions/ContractAction.ts +9 -10
- package/src/Actions/ERC721MintAction.ts +12 -13
- package/src/Actions/EventAction.test.ts +45 -54
- package/src/Actions/EventAction.ts +100 -100
- package/src/AllowLists/SimpleAllowList.ts +5 -5
- package/src/AllowLists/SimpleDenyList.ts +6 -6
- package/src/Boost.ts +19 -0
- package/src/BoostCore.test.ts +117 -1
- package/src/BoostCore.ts +121 -57
- package/src/BoostRegistry.ts +29 -21
- package/src/Budgets/ManagedBudget.ts +18 -18
- package/src/Budgets/VestingBudget.ts +23 -23
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +5 -5
- package/src/Deployable/DeployableTargetWithRBAC.ts +15 -15
- package/src/Incentives/AllowListIncentive.ts +12 -12
- package/src/Incentives/CGDAIncentive.ts +15 -15
- package/src/Incentives/ERC1155Incentive.ts +26 -26
- package/src/Incentives/ERC20Incentive.ts +23 -23
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.ts +19 -19
- package/src/Incentives/Incentive.ts +6 -5
- package/src/Incentives/PointsIncentive.test.ts +21 -21
- package/src/Incentives/PointsIncentive.ts +14 -14
- package/src/Validators/SignerValidator.ts +14 -14
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +165 -0
- package/src/index.test.ts +117 -33
- package/src/index.ts +1 -0
- package/src/transfers.ts +1 -1
- package/src/utils.ts +1 -1
- package/dist/Incentive-DJf-vdyL.js.map +0 -1
- package/dist/Incentive-DNwROd1r.cjs.map +0 -1
- package/dist/SimpleDenyList-DMlUkmAn.cjs.map +0 -1
- package/dist/SimpleDenyList-DvUvmOeE.js.map +0 -1
- package/dist/componentInterfaces-BPVR_Ykd.js +0 -13
- package/dist/componentInterfaces-BPVR_Ykd.js.map +0 -1
- package/dist/componentInterfaces-BfppSIl4.cjs +0 -2
- package/dist/componentInterfaces-BfppSIl4.cjs.map +0 -1
- package/dist/deployments-BvFcK_eR.js +0 -40
- package/dist/deployments-BvFcK_eR.js.map +0 -1
- package/dist/deployments-Ho4PnGCS.cjs +0 -2
- package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
- package/dist/generated-CMQ6ZC2_.cjs +0 -3
- package/dist/generated-CMQ6ZC2_.cjs.map +0 -1
- package/dist/generated-C_7Jx3YG.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventAction.js","sources":["../../../../node_modules/.pnpm/ts-pattern@5.4.0/node_modules/ts-pattern/dist/index.js","../../src/Actions/EventAction.ts"],"sourcesContent":["const t=Symbol.for(\"@ts-pattern/matcher\"),e=Symbol.for(\"@ts-pattern/isVariadic\"),n=\"@ts-pattern/anonymous-select-key\",r=t=>Boolean(t&&\"object\"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error(\"Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.\");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&\"optional\"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:\"optional\"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"and\"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"or\"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r=\"string\"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:\"string\"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function w(t){return\"bigint\"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return\"boolean\"==typeof t})),B=u(p(function(t){return\"symbol\"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\\`P.map\\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:\"not\"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&\"function\"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as NonExhaustiveError,N as P,N as Pattern,a as isMatching,z as match};\n//# sourceMappingURL=index.js.map\n","import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport functions from '@boostxyz/signatures/functions';\nimport { match } from 'ts-pattern';\nimport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n type Address,\n type ContractEventName,\n type ContractFunctionName,\n type GetLogsReturnType,\n type GetTransactionParameters,\n type Hex,\n type Log,\n type PublicClient,\n decodeFunctionData,\n encodeAbiParameters,\n fromHex,\n isAddressEqual,\n} from 'viem';\nimport { getLogs } from 'viem/actions';\nimport { EventAction as EventActionBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n DecodedArgsMalformedError,\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n FunctionDataDecodeError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnparseableAbiParamError,\n UnrecognizedFilterTypeError,\n} from '../errors';\nimport {\n type GetLogsParams,\n type Overwrite,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\n/*\n * Action Event Payloads\n */\n\n/**\n * Filter types used to determine how criteria are evaluated.\n *\n * @export\n * @enum {number}\n */\nexport enum FilterType {\n EQUAL = 0,\n NOT_EQUAL = 1,\n GREATER_THAN = 2,\n LESS_THAN = 3,\n CONTAINS = 4,\n REGEX = 5,\n}\n\n/**\n * The primitive types supported for filtering.\n *\n * @export\n * @enum {number}\n */\nexport enum PrimitiveType {\n UINT = 0,\n ADDRESS = 1,\n BYTES = 2,\n STRING = 3,\n}\n\n/**\n * Object representation of a `Criteria` struct used in event actions.\n *\n * @export\n * @interface Criteria\n * @typedef {Criteria}\n */\nexport interface Criteria {\n /**\n * The filter type used in this criteria.\n *\n * @type {FilterType}\n */\n filterType: FilterType;\n /**\n * The primitive type of the field being filtered.\n *\n * @type {PrimitiveType}\n */\n fieldType: PrimitiveType;\n /**\n * The index in the logs argument array where the field is located.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The filter data used for complex filtering.\n *\n * @type {Hex}\n */\n filterData: Hex;\n}\n\n/**\n * Whether a given signature is an event or function\n *\n * @export\n * @enum {number}\n */\nexport enum SignatureType {\n EVENT = 0,\n FUNC = 1,\n}\n\n/**\n * The payload describing how claimants are identified\n *\n * @export\n * @interface ActionClaimant\n * @typedef {ActionClaimant}\n */\nexport interface ActionClaimant {\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The 4 byte signature of the event or function\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index corresponding to claimant.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the target contract\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n}\n\n/**\n * Object representation of an `ActionStep` struct used in event actions.\n *\n * @export\n * @interface ActionStep\n * @typedef {ActionStep}\n */\nexport interface ActionStep {\n /**\n * The signature of the event.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The type of action being performed.\n *\n * @type {number}\n */\n actionType?: number;\n /**\n * The address of the target contract.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n /**\n * The criteria used for this action step.\n *\n * @type {Criteria}\n */\n actionParameter: Criteria;\n}\n\n/**\n * Parameters for validating an event step.\n *\n * This type omits the 'address' field from GetLogsParams and adds optional fields\n * for logs and known events.\n *\n * @typedef {Object} ValidateEventStepParams\n * @property {Log[]} [logs]\n * @property {Record<Hex, AbiEvent>} [knownEvents]\n * @property {number} [fromBlock]\n * @property {number} [toBlock]\n * @property {Hex} [blockHash]\n * @property {Abi} abi\n * @property {ContractEventName<Abi>} eventName\n */\nexport type ValidateEventStepParams = Omit<\n GetLogsParams<Abi, ContractEventName<Abi>> & {\n logs?: Log[];\n knownEvents?: Record<Hex, AbiEvent>;\n },\n 'address'\n>;\n\n/**\n * Parameters for validating a function step.\n *\n * This type includes all parameters required to get a transaction.\n *\n * @typedef {Object} ValidateFunctionStepParams\n * @property {Hex} hash\n * @property {number} [chainId]\n */\nexport type ValidateFunctionStepParams = GetTransactionParameters;\n\n/**\n * You can either supply a simplified version of the payload, or one that explicitly declares action steps.\n *\n * @export\n * @typedef {EventActionPayload}\n */\nexport type EventActionPayload =\n | EventActionPayloadSimple\n | EventActionPayloadRaw;\n\nexport interface EventActionPayloadSimple {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n\n /**\n * Up to 4 action steps.\n * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload\n * Any more than 4 will throw an error.\n *\n * @type {ActionStep[]}\n */\n actionSteps: ActionStep[];\n}\n\nexport type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nexport function isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Object representation of an `InitPayload` struct used to initialize event actions.\n *\n * @export\n * @interface EventActionPayloadRaw\n * @typedef {EventActionPayloadRaw}\n */\nexport interface EventActionPayloadRaw {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n /**\n * The first action step.\n *\n * @type {ActionStep}\n */\n actionStepOne: ActionStep;\n /**\n * The second action step.\n *\n * @type {ActionStep}\n */\n actionStepTwo: ActionStep;\n /**\n * The third action step.\n *\n * @type {ActionStep}\n */\n actionStepThree: ActionStep;\n /**\n * The fourth action step.\n *\n * @type {ActionStep}\n */\n actionStepFour: ActionStep;\n}\n\n/**\n * Array of event logs to pass into TxParams\n * @export\n * @typedef {EventLogs}\n */\nexport type EventLogs = GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n\n/**\n * Getter params from the event action contract\n *\n * @export\n * @typedef {ReadEventActionParams}\n * @param {fnName} fnName - The getter function name\n */\nexport type ReadEventActionParams<\n fnName extends ContractFunctionName<typeof eventActionAbi, 'pure' | 'view'>,\n> = ReadParams<typeof eventActionAbi, fnName>;\n\ntype TxParams = ValidateEventStepParams | ValidateFunctionStepParams;\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(EventActionBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadEventActionParams<'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadEventActionParams<'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadEventActionParams<'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as RawActionStep[];\n return _dedupeActionSteps(steps.map(_fromRawActionStep));\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadEventActionParams<'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadEventActionParams<'getActionClaimant'>,\n ) {\n const result = (await readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n ...params,\n })) as RawActionClaimant;\n return _fromRawActionStep(result);\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return await this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]\n * @returns {unknown}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param {?TxParams} [params]\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(params?: TxParams) {\n const actionSteps = await this.getActionSteps();\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs or function calls.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n * For functions a hash is required.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.\n * @param {?TxParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, logs, and chain ID.\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params?: TxParams & { chainId?: number },\n ) {\n if (actionStep.signatureType === SignatureType.EVENT) {\n return await this.isActionEventValid(actionStep, params);\n }\n if (actionStep.signatureType === SignatureType.FUNC) {\n return await this.isActionFunctionValid(\n actionStep,\n params as ValidateFunctionStepParams,\n );\n }\n return false;\n }\n\n /**\n * Validates a single action event with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the event to validate.\n * @param {?ValidateEventStepParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, logs, and chain ID.\n * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.\n */\n public async isActionEventValid(\n actionStep: ActionStep,\n params?: ValidateEventStepParams & { chainId?: number },\n ) {\n const criteria = actionStep.actionParameter;\n const signature = actionStep.signature;\n let event: AbiEvent;\n // Lookup ABI based on event signature\n if (params?.knownEvents) {\n event = params.knownEvents[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new Error(`No known ABI for given event signature: ${signature}`);\n }\n\n if (this.isArraylikeIndexed(actionStep, event)) {\n // If the field is indexed, we can't filter on it\n throw new UnparseableAbiParamError(\n actionStep.actionParameter.fieldIndex,\n event,\n );\n }\n const targetContract = actionStep.targetContract;\n // Get all logs matching the event signature from the target contract\n const logs =\n params?.logs ||\n (await getLogs(this._config.getClient({ chainId: params?.chainId }), {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n ...(params as any),\n address: targetContract,\n event,\n }));\n if (!logs.length) return false;\n for (let log of logs) {\n if (!this.validateLogAgainstCriteria(criteria, log as EventLogs[0])) {\n return false;\n }\n }\n return true;\n }\n /**\n * Validates a single action function with a given criteria against the transaction input.\n * If a transaction hash is provided in the optional `params` argument, then the transaction\n * will be fetched and decoded using the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the function to validate.\n * @param {?ValidateFunctionStepParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, transaction hash, and chain ID.\n * @returns {Promise<boolean>} Resolves to true if the action function is valid, throws if the inputs are invalid, otherwise false.\n */\n public async isActionFunctionValid(\n actionStep: ActionStep,\n params?: ValidateFunctionStepParams & { chainId?: number },\n ) {\n const criteria = actionStep.actionParameter;\n let signature = actionStep.signature;\n\n if (!params || !params?.hash) {\n // Should we return false in this case?\n throw new Error('Hash is required for function validation');\n }\n const client = this._config.getClient({\n chainId: params?.chainId,\n }) as PublicClient;\n // Fetch the transaction receipt and decode the function input using `viem` utilities\n const transaction = await client.getTransaction({ hash: params.hash });\n const func = (functions.abi as Record<Hex, AbiFunction>)[\n signature\n ] as AbiFunction;\n\n if (!func) {\n throw new Error(\n `No known ABI for given function signature: ${signature}`,\n );\n }\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n\n // Validate the criteria against decoded arguments using fieldIndex\n const decodedArgs = decodedData.args;\n\n if (!decodedArgs || !decodedData) return false;\n\n if (\n !this.validateFunctionAgainstCriteria(\n criteria,\n decodedArgs as (string | bigint)[],\n )\n ) {\n return false;\n }\n\n return true;\n }\n /**\n * Validates a field against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {string | bigint} fieldValue - The field value to validate.\n * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.\n */\n public validateFieldAgainstCriteria(\n criteria: Criteria,\n fieldValue: string | bigint | Hex,\n input:\n | { log: EventLogs[0] }\n | { decodedArgs: readonly (string | bigint)[] },\n ): boolean {\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n return match(criteria.fieldType)\n .with(PrimitiveType.ADDRESS, () =>\n isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) === BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue === fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue === criteria.filterData);\n\n case FilterType.NOT_EQUAL:\n return match(criteria.fieldType)\n .with(\n PrimitiveType.ADDRESS,\n () => !isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) !== BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue !== fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue !== criteria.filterData);\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n let substring;\n if (criteria.fieldType === PrimitiveType.STRING) {\n substring = fromHex(criteria.filterData, 'string');\n } else {\n // truncate the `0x` prefix\n substring = criteria.filterData.slice(2);\n }\n return (fieldValue as string).includes(substring);\n }\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.REGEX:\n if (typeof fieldValue !== 'string') {\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n\n if (criteria.fieldType === PrimitiveType.STRING) {\n // fieldValue is decoded by the ABI\n const regexString = fromHex(criteria.filterData, 'string');\n return new RegExp(regexString).test(fieldValue);\n }\n\n default:\n throw new UnrecognizedFilterTypeError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {Promise<boolean>} - Returns true if the log passes the criteria, false otherwise.\n */\n public validateLogAgainstCriteria(\n criteria: Criteria,\n log: EventLogs[0],\n ): boolean {\n if (!Array.isArray(log.args) || log.args.length <= criteria.fieldIndex) {\n throw new DecodedArgsMalformedError({\n log,\n criteria,\n fieldValue: undefined,\n });\n }\n\n const fieldValue = log.args.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, { log });\n }\n\n /**\n * Validates a function's decoded arguments against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {unknown[]} decodedArgs - The decoded arguments of the function call.\n * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.\n */\n public validateFunctionAgainstCriteria(\n criteria: Criteria,\n decodedArgs: readonly (string | bigint)[],\n ): boolean {\n const fieldValue = decodedArgs[criteria.fieldIndex];\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({\n criteria,\n fieldValue,\n });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, {\n decodedArgs,\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps: ActionStep[] = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStepTuple = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i) || tmpSteps.at(-1);\n }) as ActionStepTuple;\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps[0],\n actionStepTwo: steps[1],\n actionStepThree: steps[2],\n actionStepFour: steps[3],\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n public isArraylikeIndexed(step: ActionStep, event: AbiEvent) {\n if (\n (step.actionParameter.fieldType === PrimitiveType.STRING ||\n step.actionParameter.fieldType === PrimitiveType.BYTES) &&\n event.inputs[step.actionParameter.fieldIndex]?.indexed\n ) {\n return true;\n }\n return false;\n }\n}\n\nfunction _dedupeActionSteps(_steps: ActionStep[]): ActionStep[] {\n const steps: ActionStep[] = [],\n signatures: Record<string, boolean> = {};\n for (let step of _steps) {\n const signature = JSON.stringify(step);\n if (signatures[signature]) continue;\n steps.push(step);\n signatures[signature] = true;\n }\n return steps;\n}\ntype RawActionStep = Overwrite<ActionStep, { chainid: bigint }>;\ntype RawActionClaimant = Overwrite<ActionClaimant, { chainid: bigint }>;\n\nfunction _toRawActionStep<T extends ActionStep | ActionClaimant>(obj: T) {\n return {\n ...obj,\n chainid: BigInt(obj.chainid),\n };\n}\n\nfunction _fromRawActionStep<T extends RawActionStep | RawActionClaimant>(\n obj: T,\n) {\n if (obj.chainid > BigInt(Number.MAX_SAFE_INTEGER)) {\n throw new Error('Chain ID exceeds max safe integer');\n }\n\n return {\n ...obj,\n chainid: Number(obj.chainid),\n };\n}\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nfunction _isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Function to properly encode an event action payload.\n *\n * @param {InitPayload} param0\n * @param {ActionStep} param0.actionStepOne - The first action step to initialize.\n * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.\n * @param {ActionStep} param0.actionStepThree - The third action step to initialize.\n * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.\n * @returns {Hex}\n */\nexport function prepareEventActionPayload({\n actionClaimant,\n actionStepOne,\n actionStepTwo,\n actionStepThree,\n actionStepFour,\n}: EventActionPayloadRaw) {\n // note chainIds are technically uint256 but viem treats them (safely) as numbers,\n // so we encode them as uint32 here to avoid downcast issues\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayload',\n components: [\n {\n type: 'tuple',\n name: 'actionClaimant',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepOne',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepTwo',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepThree',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepFour',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n ],\n },\n ],\n [\n {\n actionClaimant: _toRawActionStep(actionClaimant),\n actionStepOne: {\n ..._toRawActionStep(actionStepOne),\n actionType: actionStepOne.actionType || 0,\n },\n actionStepTwo: {\n ..._toRawActionStep(actionStepTwo),\n actionType: actionStepTwo.actionType || 0,\n },\n actionStepThree: {\n ..._toRawActionStep(actionStepThree),\n actionType: actionStepThree.actionType || 0,\n },\n actionStepFour: {\n ..._toRawActionStep(actionStepFour),\n actionType: actionStepFour.actionType || 0,\n },\n },\n ],\n );\n}\n"],"names":["t","e","n","r","i","s","o","c","a","h","m","d","y","p","v","b","w","j","x","A","W","$","z","I","u","FilterType","PrimitiveType","SignatureType","isEventActionPayloadSimple","opts","_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","_dedupeActionSteps","_fromRawActionStep","result","readEventActionGetActionClaimant","data","request","simulateEventActionExecute","writeEventActionExecute","actionSteps","actionStep","criteria","signature","event","events","UnparseableAbiParamError","targetContract","logs","getLogs","log","transaction","func","functions","decodedData","decodeFunctionData","FunctionDataDecodeError","decodedArgs","fieldValue","input","match","isAddressEqual","fromHex","InvalidNumericalCriteriaError","substring","FieldValueNotComparableError","regexString","UnrecognizedFilterTypeError","DecodedArgsMalformedError","FieldValueUndefinedError","_payload","_options","payload","options","rawPayload","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","bytecode","prepareEventActionPayload","_a","EventActionBases","RegistryType","EventAction","_steps","signatures","_toRawActionStep","obj","actionClaimant","actionStepOne","actionStepTwo","actionStepThree","actionStepFour","encodeAbiParameters"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAMA,IAAE,OAAO,IAAI,qBAAqB,GAAEC,KAAE,OAAO,IAAI,wBAAwB,GAAEC,IAAE,oCAAmCC,IAAE,OAAG,GAAQ,KAAa,OAAO,KAAjB,WAAoBC,IAAE,CAAAH,MAAGA,KAAG,CAAC,CAACA,EAAED,CAAC,GAAEK,IAAE,CAACH,GAAEI,GAAEC,MAAI;AAAC,MAAGH,EAAEF,CAAC,GAAE;AAAC,UAAMD,IAAEC,EAAEF,CAAC,EAAG,GAAC,EAAC,SAAQG,GAAE,YAAWC,EAAC,IAAEH,EAAE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A,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,eAAe;AAAA,UACb,GAAGH,EAAiBI,CAAa;AAAA,UACjC,YAAYA,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,iBAAiB;AAAA,UACf,GAAGJ,EAAiBK,CAAe;AAAA,UACnC,YAAYA,EAAgB,cAAc;AAAA,QAC5C;AAAA,QACA,gBAAgB;AAAA,UACd,GAAGL,EAAiBM,CAAc;AAAA,UAClC,YAAYA,EAAe,cAAc;AAAA,QAC3C;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"EventAction.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../generated-B0tk-c9b.cjs"),l=require("../componentInterfaces-D09mhzxO.cjs"),p=require("@wagmi/core"),m=require("../errors.cjs"),e=require("../SimpleDenyList-BwfNjRsg.cjs"),d=require("viem"),c=require("./SimpleAllowList.cjs"),y=s.I;class L extends e.SimpleDenyList{buildParameters(n,t){const[i,a]=this.validateDeploymentConfig({},t);return{abi:y,bytecode:e.bytecode,args:[e.prepareSimpleDenyListPayload({owner:d.zeroAddress,denied:[]})],...this.optionallyAttachAccount(a.account)}}}const r={[l.ASimpleAllowList]:c.SimpleAllowList,[l.ASimpleDenyList]:e.SimpleDenyList};async function A(o,n){const t=await p.readContract(o.config,{abi:s.h,functionName:"getComponentInterface",address:n}),i=r[t];if(!i)throw new m.InvalidComponentInterfaceError(Object.keys(r),t);return new i(o,n)}exports.SimpleDenyList=e.SimpleDenyList;exports.SimpleAllowList=c.SimpleAllowList;exports.AllowListByComponentInterface=r;exports.OpenAllowList=L;exports.allowListFromAddress=A;
|
|
2
2
|
//# sourceMappingURL=AllowList.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as m, d as p } from "../componentInterfaces-
|
|
1
|
+
import { I as s, F as l } from "../generated-B7VaSah4.js";
|
|
2
|
+
import { c as m, d as p } from "../componentInterfaces-RXBMI5yH.js";
|
|
3
3
|
import { readContract as c } from "@wagmi/core";
|
|
4
4
|
import { InvalidComponentInterfaceError as f } from "../errors.js";
|
|
5
|
-
import { S as i, b as d, p as A } from "../SimpleDenyList-
|
|
5
|
+
import { S as i, b as d, p as A } from "../SimpleDenyList-Cn5WpNn0.js";
|
|
6
6
|
import { zeroAddress as w } from "viem";
|
|
7
7
|
import { SimpleAllowList as y } from "./SimpleAllowList.js";
|
|
8
8
|
const L = s;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../generated-CMQ6ZC2_.cjs"),u=require("@wagmi/core"),r=require("viem"),A=require("../deployments-Ho4PnGCS.cjs"),i=require("../Deployable/DeployableTargetWithRBAC.cjs"),h=require("../errors.cjs"),w=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6118fe806100bd5f395ff3fe60806040526004361061014a575f3560e01c806354d1f13d116100b5578063e66708291161006e578063e66708291461040a578063ec87621c14610432578063f04e283e1461045c578063f2fde38b14610478578063fe9fbb8014610494578063fee81cf4146104d05761014a565b806354d1f13d1461033e578063715018a61461034857806375b238fc1461035257806380fd60051461037c5780638da5cb5b146103a4578063e3f756de146103ce5761014a565b80632de94807116101075780632de94807146102325780633abb06041461026e5780634359d28a14610296578063439fab91146102be5780634a4ee7b1146102e6578063514e62fc146103025761014a565b806301ffc9a71461014e578063183a4f6e1461018a5780631c10893f146101a65780631cd64df4146101c257806325692962146101fe57806328d6183b14610208575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f919061116e565b61050c565b60405161018191906111b3565b60405180910390f35b6101a4600480360381019061019f91906111ff565b610585565b005b6101c060048036038101906101bb9190611284565b610592565b005b3480156101cd575f80fd5b506101e860048036038101906101e39190611284565b6105a8565b6040516101f591906111b3565b60405180910390f35b6102066105be565b005b348015610213575f80fd5b5061021c61060f565b60405161022991906112d1565b60405180910390f35b34801561023d575f80fd5b50610258600480360381019061025391906112ea565b610636565b6040516102659190611324565b60405180910390f35b348015610279575f80fd5b50610294600480360381019061028f91906113f3565b61064f565b005b3480156102a1575f80fd5b506102bc60048036038101906102b791906113f3565b61078f565b005b3480156102c9575f80fd5b506102e460048036038101906102df91906114c6565b61089d565b005b61030060048036038101906102fb9190611284565b6109ba565b005b34801561030d575f80fd5b5061032860048036038101906103239190611284565b6109d0565b60405161033591906111b3565b60405180910390f35b6103466109e7565b005b610350610a20565b005b34801561035d575f80fd5b50610366610a33565b6040516103739190611324565b60405180910390f35b348015610387575f80fd5b506103a2600480360381019061039d9190611566565b610a38565b005b3480156103af575f80fd5b506103b8610aee565b6040516103c591906115f3565b60405180910390f35b3480156103d9575f80fd5b506103f460048036038101906103ef919061160c565b610b16565b60405161040191906111b3565b60405180910390f35b348015610415575f80fd5b50610430600480360381019061042b9190611566565b610b69565b005b34801561043d575f80fd5b50610446610c1f565b6040516104539190611324565b60405180910390f35b610476600480360381019061047191906112ea565b610c24565b005b610492600480360381019061048d91906112ea565b610c62565b005b34801561049f575f80fd5b506104ba60048036038101906104b591906112ea565b610c8b565b6040516104c791906111b3565b60405180910390f35b3480156104db575f80fd5b506104f660048036038101906104f191906112ea565b610cde565b6040516105039190611324565b60405180910390f35b5f7f1392d798000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e575061057d82610cf7565b5b9050919050565b61058f3382610d70565b50565b61059a610d7f565b6105a48282610db6565b5050565b5f81826105b485610636565b1614905092915050565b5f6105c7610dc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f1392d79800000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b61065833610c8b565b61068e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181905084849050146106cd576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610788578282828181106106ed576106ec611669565b5b905060200201602081019061070291906116c0565b5f8087878581811061071757610716611669565b5b905060200201602081019061072c91906112ea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106cf565b5050505050565b600261079a81610dd0565b8282905085859050146107d9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610895575f8484838181106107fa576107f9611669565b5b905060200201602081019061080f91906116c0565b905060011515811515036108545761084f87878481811061083357610832611669565b5b905060200201602081019061084891906112ea565b6001610db6565b610887565b61088687878481811061086a57610869611669565b5b905060200201602081019061087f91906112ea565b6001610d70565b5b5080806001019150506107db565b505050505050565b5f6108a6610e05565b905080546003825580156108d85760018160011c14303b106108cf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906108ea919061186e565b915091506108f782610e2e565b5f5b815181101561097d5760015f8084848151811061091957610918611669565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506108f9565b50505080156109b5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6109c2610d7f565b6109cc8282610d70565b5050565b5f80826109dc85610636565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a28610d7f565b610a315f610f04565b565b600281565b6002610a4381610dd0565b828290508585905014610a82576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ae657610ad9868683818110610aa557610aa4611669565b5b9050602002016020810190610aba91906112ea565b858584818110610acd57610acc611669565b5b90506020020135610d70565b8080600101915050610a84565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b6002610b7481610dd0565b828290508585905014610bb3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610c1757610c0a868683818110610bd657610bd5611669565b5b9050602002016020810190610beb91906112ea565b858584818110610bfe57610bfd611669565b5b90506020020135610db6565b8080600101915050610bb5565b505050505050565b600181565b610c2c610d7f565b63389a75e1600c52805f526020600c208054421115610c5257636f5e88185f526004601cfd5b5f815550610c5f81610f04565b50565b610c6a610d7f565b8060601b610c7f57637448fbae5f526004601cfd5b610c8881610f04565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff16610cab610aee565b73ffffffffffffffffffffffffffffffffffffffff161480610cd75750610cd68260026001176109d0565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d695750610d6882610fca565b5b9050919050565b610d7b82825f611043565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610db4576382b429005f526004601cfd5b565b610dc282826001611043565b5050565b5f6202a300905090565b638b78c6d819543314610e0257638b78c6d8600c52335f52806020600c205416610e01576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e3661109b565b15610eae577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e7057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f01565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610f0c61109b565b15610f71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610fc7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061103c575061103b8261109f565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361106557848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61114d81611119565b8114611157575f80fd5b50565b5f8135905061116881611144565b92915050565b5f6020828403121561118357611182611111565b5b5f6111908482850161115a565b91505092915050565b5f8115159050919050565b6111ad81611199565b82525050565b5f6020820190506111c65f8301846111a4565b92915050565b5f819050919050565b6111de816111cc565b81146111e8575f80fd5b50565b5f813590506111f9816111d5565b92915050565b5f6020828403121561121457611213611111565b5b5f611221848285016111eb565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6112538261122a565b9050919050565b61126381611249565b811461126d575f80fd5b50565b5f8135905061127e8161125a565b92915050565b5f806040838503121561129a57611299611111565b5b5f6112a785828601611270565b92505060206112b8858286016111eb565b9150509250929050565b6112cb81611119565b82525050565b5f6020820190506112e45f8301846112c2565b92915050565b5f602082840312156112ff576112fe611111565b5b5f61130c84828501611270565b91505092915050565b61131e816111cc565b82525050565b5f6020820190506113375f830184611315565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261135e5761135d61133d565b5b8235905067ffffffffffffffff81111561137b5761137a611341565b5b60208301915083602082028301111561139757611396611345565b5b9250929050565b5f8083601f8401126113b3576113b261133d565b5b8235905067ffffffffffffffff8111156113d0576113cf611341565b5b6020830191508360208202830111156113ec576113eb611345565b5b9250929050565b5f805f806040858703121561140b5761140a611111565b5b5f85013567ffffffffffffffff81111561142857611427611115565b5b61143487828801611349565b9450945050602085013567ffffffffffffffff81111561145757611456611115565b5b6114638782880161139e565b925092505092959194509250565b5f8083601f8401126114865761148561133d565b5b8235905067ffffffffffffffff8111156114a3576114a2611341565b5b6020830191508360018202830111156114bf576114be611345565b5b9250929050565b5f80602083850312156114dc576114db611111565b5b5f83013567ffffffffffffffff8111156114f9576114f8611115565b5b61150585828601611471565b92509250509250929050565b5f8083601f8401126115265761152561133d565b5b8235905067ffffffffffffffff81111561154357611542611341565b5b60208301915083602082028301111561155f5761155e611345565b5b9250929050565b5f805f806040858703121561157e5761157d611111565b5b5f85013567ffffffffffffffff81111561159b5761159a611115565b5b6115a787828801611349565b9450945050602085013567ffffffffffffffff8111156115ca576115c9611115565b5b6115d687828801611511565b925092505092959194509250565b6115ed81611249565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f805f6040848603121561162357611622611111565b5b5f61163086828701611270565b935050602084013567ffffffffffffffff81111561165157611650611115565b5b61165d86828701611471565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61169f81611199565b81146116a9575f80fd5b50565b5f813590506116ba81611696565b92915050565b5f602082840312156116d5576116d4611111565b5b5f6116e2848285016116ac565b91505092915050565b5f6116f58261122a565b9050919050565b611705816116eb565b811461170f575f80fd5b50565b5f81359050611720816116fc565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61176c82611726565b810181811067ffffffffffffffff8211171561178b5761178a611736565b5b80604052505050565b5f61179d611108565b90506117a98282611763565b919050565b5f67ffffffffffffffff8211156117c8576117c7611736565b5b602082029050602081019050919050565b5f6117eb6117e6846117ae565b611794565b9050808382526020820190506020840283018581111561180e5761180d611345565b5b835b8181101561183757806118238882611270565b845260208401935050602081019050611810565b5050509392505050565b5f82601f8301126118555761185461133d565b5b81356118658482602086016117d9565b91505092915050565b5f806040838503121561188457611883611111565b5b5f61189185828601611712565b925050602083013567ffffffffffffffff8111156118b2576118b1611115565b5b6118be85828601611841565b915050925092905056fea264697066735822122091e8a0de4adbff77d65af082b61e1fd26d8ba4b387e5432257d8ebb874a0fbd664736f6c634300081a0033",g=i.Roles.MANAGER,t=class t extends i.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=d.A}async owner(f){return await d.Sg(this._config,{...this.optionallyAttachAccount(),...f,address:this.assertValidAddress(),args:[]})}async isAllowed(f,e){return await d.xg(this._config,{address:this.assertValidAddress(),args:[f,r.zeroHash],...this.optionallyAttachAccount(),...e})}async setAllowed(f,e,b){return await this.awaitResult(this.setAllowedRaw(f,e,b))}async setAllowedRaw(f,e,b){const{request:a,result:c}=await d.sM(this._config,{address:this.assertValidAddress(),args:[f,e],...this.optionallyAttachAccount(),...b});return{hash:await d.$g(this._config,a),result:c}}buildParameters(f,e){var c;const[b,a]=this.validateDeploymentConfig(f,e);if(!b.owner||b.owner===r.zeroAddress){const s=a.account?a.account.address:a.config?u.getAccount(a.config).address:(c=this._account)==null?void 0:c.address;if(s)b.owner=s;else throw new h.DeployableUnknownOwnerProvidedError}return{abi:d.A,bytecode:y,args:[n(b)],...this.optionallyAttachAccount(a.account)}}};t.bases={...A.SimpleAllowList},t.registryType=w.RegistryType.ALLOW_LIST;let o=t;function n({owner:l,allowed:f}){return r.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"allowed"}],[l,f])}exports.simpleAllowListAbi=d.A;exports.LIST_MANAGER_ROLE=g;exports.SimpleAllowList=o;exports.prepareSimpleAllowListPayload=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../generated-B0tk-c9b.cjs"),u=require("@wagmi/core"),r=require("viem"),A=require("../deployments-CMdF5uEC.cjs"),i=require("../Deployable/DeployableTargetWithRBAC.cjs"),h=require("../errors.cjs"),w=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6118fe806100bd5f395ff3fe60806040526004361061014a575f3560e01c806354d1f13d116100b5578063e66708291161006e578063e66708291461040a578063ec87621c14610432578063f04e283e1461045c578063f2fde38b14610478578063fe9fbb8014610494578063fee81cf4146104d05761014a565b806354d1f13d1461033e578063715018a61461034857806375b238fc1461035257806380fd60051461037c5780638da5cb5b146103a4578063e3f756de146103ce5761014a565b80632de94807116101075780632de94807146102325780633abb06041461026e5780634359d28a14610296578063439fab91146102be5780634a4ee7b1146102e6578063514e62fc146103025761014a565b806301ffc9a71461014e578063183a4f6e1461018a5780631c10893f146101a65780631cd64df4146101c257806325692962146101fe57806328d6183b14610208575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f919061116e565b61050c565b60405161018191906111b3565b60405180910390f35b6101a4600480360381019061019f91906111ff565b610585565b005b6101c060048036038101906101bb9190611284565b610592565b005b3480156101cd575f80fd5b506101e860048036038101906101e39190611284565b6105a8565b6040516101f591906111b3565b60405180910390f35b6102066105be565b005b348015610213575f80fd5b5061021c61060f565b60405161022991906112d1565b60405180910390f35b34801561023d575f80fd5b50610258600480360381019061025391906112ea565b610636565b6040516102659190611324565b60405180910390f35b348015610279575f80fd5b50610294600480360381019061028f91906113f3565b61064f565b005b3480156102a1575f80fd5b506102bc60048036038101906102b791906113f3565b61078f565b005b3480156102c9575f80fd5b506102e460048036038101906102df91906114c6565b61089d565b005b61030060048036038101906102fb9190611284565b6109ba565b005b34801561030d575f80fd5b5061032860048036038101906103239190611284565b6109d0565b60405161033591906111b3565b60405180910390f35b6103466109e7565b005b610350610a20565b005b34801561035d575f80fd5b50610366610a33565b6040516103739190611324565b60405180910390f35b348015610387575f80fd5b506103a2600480360381019061039d9190611566565b610a38565b005b3480156103af575f80fd5b506103b8610aee565b6040516103c591906115f3565b60405180910390f35b3480156103d9575f80fd5b506103f460048036038101906103ef919061160c565b610b16565b60405161040191906111b3565b60405180910390f35b348015610415575f80fd5b50610430600480360381019061042b9190611566565b610b69565b005b34801561043d575f80fd5b50610446610c1f565b6040516104539190611324565b60405180910390f35b610476600480360381019061047191906112ea565b610c24565b005b610492600480360381019061048d91906112ea565b610c62565b005b34801561049f575f80fd5b506104ba60048036038101906104b591906112ea565b610c8b565b6040516104c791906111b3565b60405180910390f35b3480156104db575f80fd5b506104f660048036038101906104f191906112ea565b610cde565b6040516105039190611324565b60405180910390f35b5f7f1392d798000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e575061057d82610cf7565b5b9050919050565b61058f3382610d70565b50565b61059a610d7f565b6105a48282610db6565b5050565b5f81826105b485610636565b1614905092915050565b5f6105c7610dc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f1392d79800000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b61065833610c8b565b61068e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181905084849050146106cd576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610788578282828181106106ed576106ec611669565b5b905060200201602081019061070291906116c0565b5f8087878581811061071757610716611669565b5b905060200201602081019061072c91906112ea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106cf565b5050505050565b600261079a81610dd0565b8282905085859050146107d9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610895575f8484838181106107fa576107f9611669565b5b905060200201602081019061080f91906116c0565b905060011515811515036108545761084f87878481811061083357610832611669565b5b905060200201602081019061084891906112ea565b6001610db6565b610887565b61088687878481811061086a57610869611669565b5b905060200201602081019061087f91906112ea565b6001610d70565b5b5080806001019150506107db565b505050505050565b5f6108a6610e05565b905080546003825580156108d85760018160011c14303b106108cf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906108ea919061186e565b915091506108f782610e2e565b5f5b815181101561097d5760015f8084848151811061091957610918611669565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506108f9565b50505080156109b5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6109c2610d7f565b6109cc8282610d70565b5050565b5f80826109dc85610636565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a28610d7f565b610a315f610f04565b565b600281565b6002610a4381610dd0565b828290508585905014610a82576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ae657610ad9868683818110610aa557610aa4611669565b5b9050602002016020810190610aba91906112ea565b858584818110610acd57610acc611669565b5b90506020020135610d70565b8080600101915050610a84565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b6002610b7481610dd0565b828290508585905014610bb3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610c1757610c0a868683818110610bd657610bd5611669565b5b9050602002016020810190610beb91906112ea565b858584818110610bfe57610bfd611669565b5b90506020020135610db6565b8080600101915050610bb5565b505050505050565b600181565b610c2c610d7f565b63389a75e1600c52805f526020600c208054421115610c5257636f5e88185f526004601cfd5b5f815550610c5f81610f04565b50565b610c6a610d7f565b8060601b610c7f57637448fbae5f526004601cfd5b610c8881610f04565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff16610cab610aee565b73ffffffffffffffffffffffffffffffffffffffff161480610cd75750610cd68260026001176109d0565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d695750610d6882610fca565b5b9050919050565b610d7b82825f611043565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610db4576382b429005f526004601cfd5b565b610dc282826001611043565b5050565b5f6202a300905090565b638b78c6d819543314610e0257638b78c6d8600c52335f52806020600c205416610e01576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e3661109b565b15610eae577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e7057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f01565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610f0c61109b565b15610f71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610fc7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061103c575061103b8261109f565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361106557848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61114d81611119565b8114611157575f80fd5b50565b5f8135905061116881611144565b92915050565b5f6020828403121561118357611182611111565b5b5f6111908482850161115a565b91505092915050565b5f8115159050919050565b6111ad81611199565b82525050565b5f6020820190506111c65f8301846111a4565b92915050565b5f819050919050565b6111de816111cc565b81146111e8575f80fd5b50565b5f813590506111f9816111d5565b92915050565b5f6020828403121561121457611213611111565b5b5f611221848285016111eb565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6112538261122a565b9050919050565b61126381611249565b811461126d575f80fd5b50565b5f8135905061127e8161125a565b92915050565b5f806040838503121561129a57611299611111565b5b5f6112a785828601611270565b92505060206112b8858286016111eb565b9150509250929050565b6112cb81611119565b82525050565b5f6020820190506112e45f8301846112c2565b92915050565b5f602082840312156112ff576112fe611111565b5b5f61130c84828501611270565b91505092915050565b61131e816111cc565b82525050565b5f6020820190506113375f830184611315565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261135e5761135d61133d565b5b8235905067ffffffffffffffff81111561137b5761137a611341565b5b60208301915083602082028301111561139757611396611345565b5b9250929050565b5f8083601f8401126113b3576113b261133d565b5b8235905067ffffffffffffffff8111156113d0576113cf611341565b5b6020830191508360208202830111156113ec576113eb611345565b5b9250929050565b5f805f806040858703121561140b5761140a611111565b5b5f85013567ffffffffffffffff81111561142857611427611115565b5b61143487828801611349565b9450945050602085013567ffffffffffffffff81111561145757611456611115565b5b6114638782880161139e565b925092505092959194509250565b5f8083601f8401126114865761148561133d565b5b8235905067ffffffffffffffff8111156114a3576114a2611341565b5b6020830191508360018202830111156114bf576114be611345565b5b9250929050565b5f80602083850312156114dc576114db611111565b5b5f83013567ffffffffffffffff8111156114f9576114f8611115565b5b61150585828601611471565b92509250509250929050565b5f8083601f8401126115265761152561133d565b5b8235905067ffffffffffffffff81111561154357611542611341565b5b60208301915083602082028301111561155f5761155e611345565b5b9250929050565b5f805f806040858703121561157e5761157d611111565b5b5f85013567ffffffffffffffff81111561159b5761159a611115565b5b6115a787828801611349565b9450945050602085013567ffffffffffffffff8111156115ca576115c9611115565b5b6115d687828801611511565b925092505092959194509250565b6115ed81611249565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f805f6040848603121561162357611622611111565b5b5f61163086828701611270565b935050602084013567ffffffffffffffff81111561165157611650611115565b5b61165d86828701611471565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61169f81611199565b81146116a9575f80fd5b50565b5f813590506116ba81611696565b92915050565b5f602082840312156116d5576116d4611111565b5b5f6116e2848285016116ac565b91505092915050565b5f6116f58261122a565b9050919050565b611705816116eb565b811461170f575f80fd5b50565b5f81359050611720816116fc565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61176c82611726565b810181811067ffffffffffffffff8211171561178b5761178a611736565b5b80604052505050565b5f61179d611108565b90506117a98282611763565b919050565b5f67ffffffffffffffff8211156117c8576117c7611736565b5b602082029050602081019050919050565b5f6117eb6117e6846117ae565b611794565b9050808382526020820190506020840283018581111561180e5761180d611345565b5b835b8181101561183757806118238882611270565b845260208401935050602081019050611810565b5050509392505050565b5f82601f8301126118555761185461133d565b5b81356118658482602086016117d9565b91505092915050565b5f806040838503121561188457611883611111565b5b5f61189185828601611712565b925050602083013567ffffffffffffffff8111156118b2576118b1611115565b5b6118be85828601611841565b915050925092905056fea264697066735822122091e8a0de4adbff77d65af082b61e1fd26d8ba4b387e5432257d8ebb874a0fbd664736f6c634300081a0033",p=i.Roles.MANAGER,t=class t extends i.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=d.A}async owner(f){return await d.AO(this._config,{...this.optionallyAttachAccount(),...f,address:this.assertValidAddress(),args:[]})}async isAllowed(f,e){return await d.wO(this._config,{address:this.assertValidAddress(),args:[f,r.zeroHash],...this.optionallyAttachAccount(),...e})}async setAllowed(f,e,b){return await this.awaitResult(this.setAllowedRaw(f,e,b))}async setAllowedRaw(f,e,b){const{request:a,result:c}=await d.ZO(this._config,{address:this.assertValidAddress(),args:[f,e],...this.optionallyAttachAccount(),...b});return{hash:await d.BO(this._config,a),result:c}}buildParameters(f,e){var c;const[b,a]=this.validateDeploymentConfig(f,e);if(!b.owner||b.owner===r.zeroAddress){const s=a.account?a.account.address:a.config?u.getAccount(a.config).address:(c=this._account)==null?void 0:c.address;if(s)b.owner=s;else throw new h.DeployableUnknownOwnerProvidedError}return{abi:d.A,bytecode:y,args:[n(b)],...this.optionallyAttachAccount(a.account)}}};t.bases={...A.SimpleAllowList},t.registryType=w.RegistryType.ALLOW_LIST;let o=t;function n({owner:l,allowed:f}){return r.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"allowed"}],[l,f])}exports.simpleAllowListAbi=d.A;exports.LIST_MANAGER_ROLE=p;exports.SimpleAllowList=o;exports.prepareSimpleAllowListPayload=n;
|
|
2
2
|
//# sourceMappingURL=SimpleAllowList.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleAllowList.cjs","sources":["../../src/AllowLists/SimpleAllowList.ts"],"sourcesContent":["import {\n readSimpleAllowListIsAllowed,\n readSimpleAllowListOwner,\n simpleAllowListAbi,\n simulateSimpleAllowListSetAllowed,\n writeSimpleAllowListSetAllowed,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleAllowList.sol/SimpleAllowList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { SimpleAllowList as SimpleAllowListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DeployableTargetWithRBAC,\n Roles,\n} from '../Deployable/DeployableTargetWithRBAC';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleAllowListAbi };\n\n/**\n * Object representation of a {@link SimpleAllowList} initialization payload.\n *\n * @export\n * @interface SimpleAllowListPayload\n * @typedef {SimpleAllowListPayload}\n */\nexport interface SimpleAllowListPayload {\n /**\n * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of allowed addresses.\n *\n * @type {Address[]}\n */\n allowed: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleAllowList` event types.\n *\n * @export\n * @typedef {SimpleAllowListLog}\n * @template {ContractEventName<\n * typeof simpleAllowListAbi\n * >} [event=ContractEventName<typeof simpleAllowListAbi>]\n */\nexport type SimpleAllowListLog<\n event extends ContractEventName<\n typeof simpleAllowListAbi\n > = ContractEventName<typeof simpleAllowListAbi>,\n> = GenericLog<typeof simpleAllowListAbi, event>;\n\n/**\n * A constant representing the list manager's role\n *\n * @deprecated use {@link Roles} instead\n * @type {1n}\n */\nexport const LIST_MANAGER_ROLE = Roles.MANAGER;\n/**\n * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses\n *\n * @export\n * @class SimpleAllowList\n * @typedef {SimpleAllowList}\n * @extends {DeployableTargetWithRBAC<SimpleAllowListPayload>}\n */\nexport class SimpleAllowList extends DeployableTargetWithRBAC<\n SimpleAllowListPayload,\n typeof simpleAllowListAbi\n> {\n public override readonly abi = simpleAllowListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleAllowListBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Retrieves the owner\n *\n * @public\n * @async\n * @param {?ReadParams<typeof simpleAllowListAbi, 'owner'>} [params]\n * @returns {Promise<Address>} - The address of the owner\n */\n public async owner(\n params?: ReadParams<typeof simpleAllowListAbi, 'owner'>,\n ): Promise<Address> {\n return await readSimpleAllowListOwner(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n address: this.assertValidAddress(),\n args: [],\n });\n }\n\n /**\n * Check if a user is authorized.\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ): Promise<boolean> {\n return await readSimpleAllowListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<void>}\n */\n public async setAllowed(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n return await this.awaitResult(\n this.setAllowedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<void>}\n */\n public async setAllowedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n const { request, result } = await simulateSimpleAllowListSetAllowed(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleAllowListSetAllowed(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleAllowListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleAllowListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleAllowListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleAllowListPayload} param0\n * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n * @param {Address[]} param0.allowed - List of allowed addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleAllowListPayload({\n owner,\n allowed,\n}: SimpleAllowListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'allowed' },\n ],\n [owner, allowed],\n );\n}\n"],"names":["LIST_MANAGER_ROLE","Roles","_SimpleAllowList","DeployableTargetWithRBAC","simpleAllowListAbi","params","readSimpleAllowListOwner","address","readSimpleAllowListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleAllowListSetAllowed","writeSimpleAllowListSetAllowed","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleAllowListPayload","SimpleAllowListBases","RegistryType","SimpleAllowList","encodeAbiParameters"],"mappings":"2raA+EaA,EAAoBC,EAAM,MAAA,QAS1BC,EAAN,MAAMA,UAAwBC,EAAAA,wBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,MACXC,EACkB,CACX,OAAA,MAAMC,EAAAA,GAAy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uB,MAAiC,CACtD,GAAIyB,EAAA,eAAA,EASNzB,EAAuB,aAA6B0B,EAAa,aAAA,WAtB5D,IAAMC,EAAN3B,EAkKA,SAASwB,EAA8B,CAC5C,MAAAL,EACA,QAAAV,CACF,EAA2B,CAClB,OAAAmB,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,YAAa,KAAM,SAAU,CACvC,EACA,CAACT,EAAOV,CAAO,CAAA,CAEnB"}
|
|
1
|
+
{"version":3,"file":"SimpleAllowList.cjs","sources":["../../src/AllowLists/SimpleAllowList.ts"],"sourcesContent":["import {\n readSimpleAllowListIsAllowed,\n readSimpleAllowListOwner,\n simpleAllowListAbi,\n simulateSimpleAllowListSetAllowed,\n writeSimpleAllowListSetAllowed,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleAllowList.sol/SimpleAllowList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { SimpleAllowList as SimpleAllowListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DeployableTargetWithRBAC,\n Roles,\n} from '../Deployable/DeployableTargetWithRBAC';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleAllowListAbi };\n\n/**\n * Object representation of a {@link SimpleAllowList} initialization payload.\n *\n * @export\n * @interface SimpleAllowListPayload\n * @typedef {SimpleAllowListPayload}\n */\nexport interface SimpleAllowListPayload {\n /**\n * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of allowed addresses.\n *\n * @type {Address[]}\n */\n allowed: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleAllowList` event types.\n *\n * @export\n * @typedef {SimpleAllowListLog}\n * @template {ContractEventName<\n * typeof simpleAllowListAbi\n * >} [event=ContractEventName<typeof simpleAllowListAbi>]\n */\nexport type SimpleAllowListLog<\n event extends ContractEventName<\n typeof simpleAllowListAbi\n > = ContractEventName<typeof simpleAllowListAbi>,\n> = GenericLog<typeof simpleAllowListAbi, event>;\n\n/**\n * A constant representing the list manager's role\n *\n * @deprecated use {@link Roles} instead\n * @type {1n}\n */\nexport const LIST_MANAGER_ROLE = Roles.MANAGER;\n/**\n * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses\n *\n * @export\n * @class SimpleAllowList\n * @typedef {SimpleAllowList}\n * @extends {DeployableTargetWithRBAC<SimpleAllowListPayload>}\n */\nexport class SimpleAllowList extends DeployableTargetWithRBAC<\n SimpleAllowListPayload,\n typeof simpleAllowListAbi\n> {\n public override readonly abi = simpleAllowListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleAllowListBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Retrieves the owner\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the owner\n */\n public async owner(\n params?: ReadParams<typeof simpleAllowListAbi, 'owner'>,\n ): Promise<Address> {\n return await readSimpleAllowListOwner(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n address: this.assertValidAddress(),\n args: [],\n });\n }\n\n /**\n * Check if a user is authorized.\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ): Promise<boolean> {\n return await readSimpleAllowListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams} [params]\n * @returns {Promise<void>}\n */\n public async setAllowed(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n return await this.awaitResult(\n this.setAllowedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAllowedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n const { request, result } = await simulateSimpleAllowListSetAllowed(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleAllowListSetAllowed(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleAllowListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleAllowListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleAllowListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleAllowListPayload} param0\n * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n * @param {Address[]} param0.allowed - List of allowed addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleAllowListPayload({\n owner,\n allowed,\n}: SimpleAllowListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'allowed' },\n ],\n [owner, allowed],\n );\n}\n"],"names":["LIST_MANAGER_ROLE","Roles","_SimpleAllowList","DeployableTargetWithRBAC","simpleAllowListAbi","params","readSimpleAllowListOwner","address","readSimpleAllowListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleAllowListSetAllowed","writeSimpleAllowListSetAllowed","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleAllowListPayload","SimpleAllowListBases","RegistryType","SimpleAllowList","encodeAbiParameters"],"mappings":"2raA+EaA,EAAoBC,EAAM,MAAA,QAS1BC,EAAN,MAAMA,UAAwBC,EAAAA,wBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,MACXC,EACkB,CACX,OAAA,MAAMC,EAAAA,GAAyB,KAAK,QAAS,CAClD,GAAG,KAAK,wBAAwB,EAEhC,GAAID,EACJ,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,CAAA,CACR,CACH,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A8B,CAC5C,MAAAL,EACA,QAAAV,CACF,EAA2B,CAClB,OAAAmB,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,YAAa,KAAM,SAAU,CACvC,EACA,CAACT,EAAOV,CAAO,CAAA,CAEnB"}
|
|
@@ -473,7 +473,7 @@ export declare class SimpleAllowList extends DeployableTargetWithRBAC<SimpleAllo
|
|
|
473
473
|
*
|
|
474
474
|
* @public
|
|
475
475
|
* @async
|
|
476
|
-
* @param {?ReadParams
|
|
476
|
+
* @param {?ReadParams} [params]
|
|
477
477
|
* @returns {Promise<Address>} - The address of the owner
|
|
478
478
|
*/
|
|
479
479
|
owner(params?: ReadParams<typeof simpleAllowListAbi, 'owner'>): Promise<Address>;
|
|
@@ -483,7 +483,7 @@ export declare class SimpleAllowList extends DeployableTargetWithRBAC<SimpleAllo
|
|
|
483
483
|
* @public
|
|
484
484
|
* @async
|
|
485
485
|
* @param {Address} address - The address of the user
|
|
486
|
-
* @param {?ReadParams
|
|
486
|
+
* @param {?ReadParams} [params]
|
|
487
487
|
* @returns {Promise<boolean>} - True if the user is authorized
|
|
488
488
|
*/
|
|
489
489
|
isAllowed(address: Address, params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>): Promise<boolean>;
|
|
@@ -495,7 +495,7 @@ export declare class SimpleAllowList extends DeployableTargetWithRBAC<SimpleAllo
|
|
|
495
495
|
* @async
|
|
496
496
|
* @param {Address[]} addresses - The list of users to update
|
|
497
497
|
* @param {boolean[]} allowed - The allowed status of each user
|
|
498
|
-
* @param {?ReadParams
|
|
498
|
+
* @param {?ReadParams} [params]
|
|
499
499
|
* @returns {Promise<void>}
|
|
500
500
|
*/
|
|
501
501
|
setAllowed(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>): Promise<void>;
|
|
@@ -507,8 +507,8 @@ export declare class SimpleAllowList extends DeployableTargetWithRBAC<SimpleAllo
|
|
|
507
507
|
* @async
|
|
508
508
|
* @param {Address[]} addresses - The list of users to update
|
|
509
509
|
* @param {boolean[]} allowed - The allowed status of each user
|
|
510
|
-
* @param {?ReadParams
|
|
511
|
-
* @returns {Promise<void>}
|
|
510
|
+
* @param {?ReadParams} [params]
|
|
511
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
512
512
|
*/
|
|
513
513
|
setAllowedRaw(addresses: Address[], allowed: boolean[], params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>): Promise<{
|
|
514
514
|
hash: `0x${string}`;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as s, a4 as i, a5 as n, a6 as l, a7 as h } from "../generated-B7VaSah4.js";
|
|
2
2
|
import { getAccount as A } from "@wagmi/core";
|
|
3
|
-
import { zeroHash as p, zeroAddress as
|
|
4
|
-
import { S as m } from "../deployments-
|
|
3
|
+
import { zeroHash as p, zeroAddress as w, encodeAbiParameters as u } from "viem";
|
|
4
|
+
import { S as m } from "../deployments-BM42vImE.js";
|
|
5
5
|
import { Roles as y, DeployableTargetWithRBAC as g } from "../Deployable/DeployableTargetWithRBAC.js";
|
|
6
6
|
import { DeployableUnknownOwnerProvidedError as R } from "../errors.js";
|
|
7
|
-
import { RegistryType as
|
|
8
|
-
const L = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6118fe806100bd5f395ff3fe60806040526004361061014a575f3560e01c806354d1f13d116100b5578063e66708291161006e578063e66708291461040a578063ec87621c14610432578063f04e283e1461045c578063f2fde38b14610478578063fe9fbb8014610494578063fee81cf4146104d05761014a565b806354d1f13d1461033e578063715018a61461034857806375b238fc1461035257806380fd60051461037c5780638da5cb5b146103a4578063e3f756de146103ce5761014a565b80632de94807116101075780632de94807146102325780633abb06041461026e5780634359d28a14610296578063439fab91146102be5780634a4ee7b1146102e6578063514e62fc146103025761014a565b806301ffc9a71461014e578063183a4f6e1461018a5780631c10893f146101a65780631cd64df4146101c257806325692962146101fe57806328d6183b14610208575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f919061116e565b61050c565b60405161018191906111b3565b60405180910390f35b6101a4600480360381019061019f91906111ff565b610585565b005b6101c060048036038101906101bb9190611284565b610592565b005b3480156101cd575f80fd5b506101e860048036038101906101e39190611284565b6105a8565b6040516101f591906111b3565b60405180910390f35b6102066105be565b005b348015610213575f80fd5b5061021c61060f565b60405161022991906112d1565b60405180910390f35b34801561023d575f80fd5b50610258600480360381019061025391906112ea565b610636565b6040516102659190611324565b60405180910390f35b348015610279575f80fd5b50610294600480360381019061028f91906113f3565b61064f565b005b3480156102a1575f80fd5b506102bc60048036038101906102b791906113f3565b61078f565b005b3480156102c9575f80fd5b506102e460048036038101906102df91906114c6565b61089d565b005b61030060048036038101906102fb9190611284565b6109ba565b005b34801561030d575f80fd5b5061032860048036038101906103239190611284565b6109d0565b60405161033591906111b3565b60405180910390f35b6103466109e7565b005b610350610a20565b005b34801561035d575f80fd5b50610366610a33565b6040516103739190611324565b60405180910390f35b348015610387575f80fd5b506103a2600480360381019061039d9190611566565b610a38565b005b3480156103af575f80fd5b506103b8610aee565b6040516103c591906115f3565b60405180910390f35b3480156103d9575f80fd5b506103f460048036038101906103ef919061160c565b610b16565b60405161040191906111b3565b60405180910390f35b348015610415575f80fd5b50610430600480360381019061042b9190611566565b610b69565b005b34801561043d575f80fd5b50610446610c1f565b6040516104539190611324565b60405180910390f35b610476600480360381019061047191906112ea565b610c24565b005b610492600480360381019061048d91906112ea565b610c62565b005b34801561049f575f80fd5b506104ba60048036038101906104b591906112ea565b610c8b565b6040516104c791906111b3565b60405180910390f35b3480156104db575f80fd5b506104f660048036038101906104f191906112ea565b610cde565b6040516105039190611324565b60405180910390f35b5f7f1392d798000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e575061057d82610cf7565b5b9050919050565b61058f3382610d70565b50565b61059a610d7f565b6105a48282610db6565b5050565b5f81826105b485610636565b1614905092915050565b5f6105c7610dc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f1392d79800000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b61065833610c8b565b61068e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181905084849050146106cd576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610788578282828181106106ed576106ec611669565b5b905060200201602081019061070291906116c0565b5f8087878581811061071757610716611669565b5b905060200201602081019061072c91906112ea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106cf565b5050505050565b600261079a81610dd0565b8282905085859050146107d9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610895575f8484838181106107fa576107f9611669565b5b905060200201602081019061080f91906116c0565b905060011515811515036108545761084f87878481811061083357610832611669565b5b905060200201602081019061084891906112ea565b6001610db6565b610887565b61088687878481811061086a57610869611669565b5b905060200201602081019061087f91906112ea565b6001610d70565b5b5080806001019150506107db565b505050505050565b5f6108a6610e05565b905080546003825580156108d85760018160011c14303b106108cf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906108ea919061186e565b915091506108f782610e2e565b5f5b815181101561097d5760015f8084848151811061091957610918611669565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506108f9565b50505080156109b5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6109c2610d7f565b6109cc8282610d70565b5050565b5f80826109dc85610636565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a28610d7f565b610a315f610f04565b565b600281565b6002610a4381610dd0565b828290508585905014610a82576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ae657610ad9868683818110610aa557610aa4611669565b5b9050602002016020810190610aba91906112ea565b858584818110610acd57610acc611669565b5b90506020020135610d70565b8080600101915050610a84565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b6002610b7481610dd0565b828290508585905014610bb3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610c1757610c0a868683818110610bd657610bd5611669565b5b9050602002016020810190610beb91906112ea565b858584818110610bfe57610bfd611669565b5b90506020020135610db6565b8080600101915050610bb5565b505050505050565b600181565b610c2c610d7f565b63389a75e1600c52805f526020600c208054421115610c5257636f5e88185f526004601cfd5b5f815550610c5f81610f04565b50565b610c6a610d7f565b8060601b610c7f57637448fbae5f526004601cfd5b610c8881610f04565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff16610cab610aee565b73ffffffffffffffffffffffffffffffffffffffff161480610cd75750610cd68260026001176109d0565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d695750610d6882610fca565b5b9050919050565b610d7b82825f611043565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610db4576382b429005f526004601cfd5b565b610dc282826001611043565b5050565b5f6202a300905090565b638b78c6d819543314610e0257638b78c6d8600c52335f52806020600c205416610e01576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e3661109b565b15610eae577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e7057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f01565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610f0c61109b565b15610f71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610fc7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061103c575061103b8261109f565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361106557848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61114d81611119565b8114611157575f80fd5b50565b5f8135905061116881611144565b92915050565b5f6020828403121561118357611182611111565b5b5f6111908482850161115a565b91505092915050565b5f8115159050919050565b6111ad81611199565b82525050565b5f6020820190506111c65f8301846111a4565b92915050565b5f819050919050565b6111de816111cc565b81146111e8575f80fd5b50565b5f813590506111f9816111d5565b92915050565b5f6020828403121561121457611213611111565b5b5f611221848285016111eb565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6112538261122a565b9050919050565b61126381611249565b811461126d575f80fd5b50565b5f8135905061127e8161125a565b92915050565b5f806040838503121561129a57611299611111565b5b5f6112a785828601611270565b92505060206112b8858286016111eb565b9150509250929050565b6112cb81611119565b82525050565b5f6020820190506112e45f8301846112c2565b92915050565b5f602082840312156112ff576112fe611111565b5b5f61130c84828501611270565b91505092915050565b61131e816111cc565b82525050565b5f6020820190506113375f830184611315565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261135e5761135d61133d565b5b8235905067ffffffffffffffff81111561137b5761137a611341565b5b60208301915083602082028301111561139757611396611345565b5b9250929050565b5f8083601f8401126113b3576113b261133d565b5b8235905067ffffffffffffffff8111156113d0576113cf611341565b5b6020830191508360208202830111156113ec576113eb611345565b5b9250929050565b5f805f806040858703121561140b5761140a611111565b5b5f85013567ffffffffffffffff81111561142857611427611115565b5b61143487828801611349565b9450945050602085013567ffffffffffffffff81111561145757611456611115565b5b6114638782880161139e565b925092505092959194509250565b5f8083601f8401126114865761148561133d565b5b8235905067ffffffffffffffff8111156114a3576114a2611341565b5b6020830191508360018202830111156114bf576114be611345565b5b9250929050565b5f80602083850312156114dc576114db611111565b5b5f83013567ffffffffffffffff8111156114f9576114f8611115565b5b61150585828601611471565b92509250509250929050565b5f8083601f8401126115265761152561133d565b5b8235905067ffffffffffffffff81111561154357611542611341565b5b60208301915083602082028301111561155f5761155e611345565b5b9250929050565b5f805f806040858703121561157e5761157d611111565b5b5f85013567ffffffffffffffff81111561159b5761159a611115565b5b6115a787828801611349565b9450945050602085013567ffffffffffffffff8111156115ca576115c9611115565b5b6115d687828801611511565b925092505092959194509250565b6115ed81611249565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f805f6040848603121561162357611622611111565b5b5f61163086828701611270565b935050602084013567ffffffffffffffff81111561165157611650611115565b5b61165d86828701611471565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61169f81611199565b81146116a9575f80fd5b50565b5f813590506116ba81611696565b92915050565b5f602082840312156116d5576116d4611111565b5b5f6116e2848285016116ac565b91505092915050565b5f6116f58261122a565b9050919050565b611705816116eb565b811461170f575f80fd5b50565b5f81359050611720816116fc565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61176c82611726565b810181811067ffffffffffffffff8211171561178b5761178a611736565b5b80604052505050565b5f61179d611108565b90506117a98282611763565b919050565b5f67ffffffffffffffff8211156117c8576117c7611736565b5b602082029050602081019050919050565b5f6117eb6117e6846117ae565b611794565b9050808382526020820190506020840283018581111561180e5761180d611345565b5b835b8181101561183757806118238882611270565b845260208401935050602081019050611810565b5050509392505050565b5f82601f8301126118555761185461133d565b5b81356118658482602086016117d9565b91505092915050565b5f806040838503121561188457611883611111565b5b5f61189185828601611712565b925050602083013567ffffffffffffffff8111156118b2576118b1611115565b5b6118be85828601611841565b915050925092905056fea264697066735822122091e8a0de4adbff77d65af082b61e1fd26d8ba4b387e5432257d8ebb874a0fbd664736f6c634300081a0033", V = y.MANAGER, c = class c extends g {
|
|
7
|
+
import { RegistryType as O } from "../utils.js";
|
|
8
|
+
const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6118fe806100bd5f395ff3fe60806040526004361061014a575f3560e01c806354d1f13d116100b5578063e66708291161006e578063e66708291461040a578063ec87621c14610432578063f04e283e1461045c578063f2fde38b14610478578063fe9fbb8014610494578063fee81cf4146104d05761014a565b806354d1f13d1461033e578063715018a61461034857806375b238fc1461035257806380fd60051461037c5780638da5cb5b146103a4578063e3f756de146103ce5761014a565b80632de94807116101075780632de94807146102325780633abb06041461026e5780634359d28a14610296578063439fab91146102be5780634a4ee7b1146102e6578063514e62fc146103025761014a565b806301ffc9a71461014e578063183a4f6e1461018a5780631c10893f146101a65780631cd64df4146101c257806325692962146101fe57806328d6183b14610208575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f919061116e565b61050c565b60405161018191906111b3565b60405180910390f35b6101a4600480360381019061019f91906111ff565b610585565b005b6101c060048036038101906101bb9190611284565b610592565b005b3480156101cd575f80fd5b506101e860048036038101906101e39190611284565b6105a8565b6040516101f591906111b3565b60405180910390f35b6102066105be565b005b348015610213575f80fd5b5061021c61060f565b60405161022991906112d1565b60405180910390f35b34801561023d575f80fd5b50610258600480360381019061025391906112ea565b610636565b6040516102659190611324565b60405180910390f35b348015610279575f80fd5b50610294600480360381019061028f91906113f3565b61064f565b005b3480156102a1575f80fd5b506102bc60048036038101906102b791906113f3565b61078f565b005b3480156102c9575f80fd5b506102e460048036038101906102df91906114c6565b61089d565b005b61030060048036038101906102fb9190611284565b6109ba565b005b34801561030d575f80fd5b5061032860048036038101906103239190611284565b6109d0565b60405161033591906111b3565b60405180910390f35b6103466109e7565b005b610350610a20565b005b34801561035d575f80fd5b50610366610a33565b6040516103739190611324565b60405180910390f35b348015610387575f80fd5b506103a2600480360381019061039d9190611566565b610a38565b005b3480156103af575f80fd5b506103b8610aee565b6040516103c591906115f3565b60405180910390f35b3480156103d9575f80fd5b506103f460048036038101906103ef919061160c565b610b16565b60405161040191906111b3565b60405180910390f35b348015610415575f80fd5b50610430600480360381019061042b9190611566565b610b69565b005b34801561043d575f80fd5b50610446610c1f565b6040516104539190611324565b60405180910390f35b610476600480360381019061047191906112ea565b610c24565b005b610492600480360381019061048d91906112ea565b610c62565b005b34801561049f575f80fd5b506104ba60048036038101906104b591906112ea565b610c8b565b6040516104c791906111b3565b60405180910390f35b3480156104db575f80fd5b506104f660048036038101906104f191906112ea565b610cde565b6040516105039190611324565b60405180910390f35b5f7f1392d798000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e575061057d82610cf7565b5b9050919050565b61058f3382610d70565b50565b61059a610d7f565b6105a48282610db6565b5050565b5f81826105b485610636565b1614905092915050565b5f6105c7610dc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f1392d79800000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b61065833610c8b565b61068e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181905084849050146106cd576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610788578282828181106106ed576106ec611669565b5b905060200201602081019061070291906116c0565b5f8087878581811061071757610716611669565b5b905060200201602081019061072c91906112ea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106cf565b5050505050565b600261079a81610dd0565b8282905085859050146107d9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610895575f8484838181106107fa576107f9611669565b5b905060200201602081019061080f91906116c0565b905060011515811515036108545761084f87878481811061083357610832611669565b5b905060200201602081019061084891906112ea565b6001610db6565b610887565b61088687878481811061086a57610869611669565b5b905060200201602081019061087f91906112ea565b6001610d70565b5b5080806001019150506107db565b505050505050565b5f6108a6610e05565b905080546003825580156108d85760018160011c14303b106108cf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906108ea919061186e565b915091506108f782610e2e565b5f5b815181101561097d5760015f8084848151811061091957610918611669565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506108f9565b50505080156109b5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6109c2610d7f565b6109cc8282610d70565b5050565b5f80826109dc85610636565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a28610d7f565b610a315f610f04565b565b600281565b6002610a4381610dd0565b828290508585905014610a82576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ae657610ad9868683818110610aa557610aa4611669565b5b9050602002016020810190610aba91906112ea565b858584818110610acd57610acc611669565b5b90506020020135610d70565b8080600101915050610a84565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b6002610b7481610dd0565b828290508585905014610bb3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610c1757610c0a868683818110610bd657610bd5611669565b5b9050602002016020810190610beb91906112ea565b858584818110610bfe57610bfd611669565b5b90506020020135610db6565b8080600101915050610bb5565b505050505050565b600181565b610c2c610d7f565b63389a75e1600c52805f526020600c208054421115610c5257636f5e88185f526004601cfd5b5f815550610c5f81610f04565b50565b610c6a610d7f565b8060601b610c7f57637448fbae5f526004601cfd5b610c8881610f04565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff16610cab610aee565b73ffffffffffffffffffffffffffffffffffffffff161480610cd75750610cd68260026001176109d0565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d695750610d6882610fca565b5b9050919050565b610d7b82825f611043565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610db4576382b429005f526004601cfd5b565b610dc282826001611043565b5050565b5f6202a300905090565b638b78c6d819543314610e0257638b78c6d8600c52335f52806020600c205416610e01576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e3661109b565b15610eae577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e7057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f01565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610f0c61109b565b15610f71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610fc7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061103c575061103b8261109f565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361106557848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61114d81611119565b8114611157575f80fd5b50565b5f8135905061116881611144565b92915050565b5f6020828403121561118357611182611111565b5b5f6111908482850161115a565b91505092915050565b5f8115159050919050565b6111ad81611199565b82525050565b5f6020820190506111c65f8301846111a4565b92915050565b5f819050919050565b6111de816111cc565b81146111e8575f80fd5b50565b5f813590506111f9816111d5565b92915050565b5f6020828403121561121457611213611111565b5b5f611221848285016111eb565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6112538261122a565b9050919050565b61126381611249565b811461126d575f80fd5b50565b5f8135905061127e8161125a565b92915050565b5f806040838503121561129a57611299611111565b5b5f6112a785828601611270565b92505060206112b8858286016111eb565b9150509250929050565b6112cb81611119565b82525050565b5f6020820190506112e45f8301846112c2565b92915050565b5f602082840312156112ff576112fe611111565b5b5f61130c84828501611270565b91505092915050565b61131e816111cc565b82525050565b5f6020820190506113375f830184611315565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261135e5761135d61133d565b5b8235905067ffffffffffffffff81111561137b5761137a611341565b5b60208301915083602082028301111561139757611396611345565b5b9250929050565b5f8083601f8401126113b3576113b261133d565b5b8235905067ffffffffffffffff8111156113d0576113cf611341565b5b6020830191508360208202830111156113ec576113eb611345565b5b9250929050565b5f805f806040858703121561140b5761140a611111565b5b5f85013567ffffffffffffffff81111561142857611427611115565b5b61143487828801611349565b9450945050602085013567ffffffffffffffff81111561145757611456611115565b5b6114638782880161139e565b925092505092959194509250565b5f8083601f8401126114865761148561133d565b5b8235905067ffffffffffffffff8111156114a3576114a2611341565b5b6020830191508360018202830111156114bf576114be611345565b5b9250929050565b5f80602083850312156114dc576114db611111565b5b5f83013567ffffffffffffffff8111156114f9576114f8611115565b5b61150585828601611471565b92509250509250929050565b5f8083601f8401126115265761152561133d565b5b8235905067ffffffffffffffff81111561154357611542611341565b5b60208301915083602082028301111561155f5761155e611345565b5b9250929050565b5f805f806040858703121561157e5761157d611111565b5b5f85013567ffffffffffffffff81111561159b5761159a611115565b5b6115a787828801611349565b9450945050602085013567ffffffffffffffff8111156115ca576115c9611115565b5b6115d687828801611511565b925092505092959194509250565b6115ed81611249565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f805f6040848603121561162357611622611111565b5b5f61163086828701611270565b935050602084013567ffffffffffffffff81111561165157611650611115565b5b61165d86828701611471565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61169f81611199565b81146116a9575f80fd5b50565b5f813590506116ba81611696565b92915050565b5f602082840312156116d5576116d4611111565b5b5f6116e2848285016116ac565b91505092915050565b5f6116f58261122a565b9050919050565b611705816116eb565b811461170f575f80fd5b50565b5f81359050611720816116fc565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61176c82611726565b810181811067ffffffffffffffff8211171561178b5761178a611736565b5b80604052505050565b5f61179d611108565b90506117a98282611763565b919050565b5f67ffffffffffffffff8211156117c8576117c7611736565b5b602082029050602081019050919050565b5f6117eb6117e6846117ae565b611794565b9050808382526020820190506020840283018581111561180e5761180d611345565b5b835b8181101561183757806118238882611270565b845260208401935050602081019050611810565b5050509392505050565b5f82601f8301126118555761185461133d565b5b81356118658482602086016117d9565b91505092915050565b5f806040838503121561188457611883611111565b5b5f61189185828601611712565b925050602083013567ffffffffffffffff8111156118b2576118b1611115565b5b6118be85828601611841565b915050925092905056fea264697066735822122091e8a0de4adbff77d65af082b61e1fd26d8ba4b387e5432257d8ebb874a0fbd664736f6c634300081a0033", z = y.MANAGER, c = class c extends g {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this.abi =
|
|
10
|
+
super(...arguments), this.abi = s;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves the owner
|
|
14
14
|
*
|
|
15
15
|
* @public
|
|
16
16
|
* @async
|
|
17
|
-
* @param {?ReadParams
|
|
17
|
+
* @param {?ReadParams} [params]
|
|
18
18
|
* @returns {Promise<Address>} - The address of the owner
|
|
19
19
|
*/
|
|
20
20
|
async owner(f) {
|
|
@@ -32,7 +32,7 @@ const L = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
32
32
|
* @public
|
|
33
33
|
* @async
|
|
34
34
|
* @param {Address} address - The address of the user
|
|
35
|
-
* @param {?ReadParams
|
|
35
|
+
* @param {?ReadParams} [params]
|
|
36
36
|
* @returns {Promise<boolean>} - True if the user is authorized
|
|
37
37
|
*/
|
|
38
38
|
async isAllowed(f, a) {
|
|
@@ -52,7 +52,7 @@ const L = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
52
52
|
* @async
|
|
53
53
|
* @param {Address[]} addresses - The list of users to update
|
|
54
54
|
* @param {boolean[]} allowed - The allowed status of each user
|
|
55
|
-
* @param {?ReadParams
|
|
55
|
+
* @param {?ReadParams} [params]
|
|
56
56
|
* @returns {Promise<void>}
|
|
57
57
|
*/
|
|
58
58
|
async setAllowed(f, a, b) {
|
|
@@ -68,8 +68,8 @@ const L = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
68
68
|
* @async
|
|
69
69
|
* @param {Address[]} addresses - The list of users to update
|
|
70
70
|
* @param {boolean[]} allowed - The allowed status of each user
|
|
71
|
-
* @param {?ReadParams
|
|
72
|
-
* @returns {Promise<void>}
|
|
71
|
+
* @param {?ReadParams} [params]
|
|
72
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
73
73
|
*/
|
|
74
74
|
async setAllowedRaw(f, a, b) {
|
|
75
75
|
const { request: e, result: d } = await l(
|
|
@@ -98,30 +98,30 @@ const L = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
98
98
|
f,
|
|
99
99
|
a
|
|
100
100
|
);
|
|
101
|
-
if (!b.owner || b.owner ===
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
b.owner =
|
|
101
|
+
if (!b.owner || b.owner === w) {
|
|
102
|
+
const t = e.account ? e.account.address : e.config ? A(e.config).address : (d = this._account) == null ? void 0 : d.address;
|
|
103
|
+
if (t)
|
|
104
|
+
b.owner = t;
|
|
105
105
|
else
|
|
106
106
|
throw new R();
|
|
107
107
|
}
|
|
108
108
|
return {
|
|
109
|
-
abi:
|
|
110
|
-
bytecode:
|
|
111
|
-
args: [
|
|
109
|
+
abi: s,
|
|
110
|
+
bytecode: _,
|
|
111
|
+
args: [L(b)],
|
|
112
112
|
...this.optionallyAttachAccount(e.account)
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
c.bases = {
|
|
117
117
|
...m
|
|
118
|
-
}, c.registryType =
|
|
118
|
+
}, c.registryType = O.ALLOW_LIST;
|
|
119
119
|
let r = c;
|
|
120
|
-
function
|
|
120
|
+
function L({
|
|
121
121
|
owner: o,
|
|
122
122
|
allowed: f
|
|
123
123
|
}) {
|
|
124
|
-
return
|
|
124
|
+
return u(
|
|
125
125
|
[
|
|
126
126
|
{ type: "address", name: "owner" },
|
|
127
127
|
{ type: "address[]", name: "allowed" }
|
|
@@ -130,9 +130,9 @@ function T({
|
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
export {
|
|
133
|
-
|
|
133
|
+
z as LIST_MANAGER_ROLE,
|
|
134
134
|
r as SimpleAllowList,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
L as prepareSimpleAllowListPayload,
|
|
136
|
+
s as simpleAllowListAbi
|
|
137
137
|
};
|
|
138
138
|
//# sourceMappingURL=SimpleAllowList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleAllowList.js","sources":["../../src/AllowLists/SimpleAllowList.ts"],"sourcesContent":["import {\n readSimpleAllowListIsAllowed,\n readSimpleAllowListOwner,\n simpleAllowListAbi,\n simulateSimpleAllowListSetAllowed,\n writeSimpleAllowListSetAllowed,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleAllowList.sol/SimpleAllowList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { SimpleAllowList as SimpleAllowListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DeployableTargetWithRBAC,\n Roles,\n} from '../Deployable/DeployableTargetWithRBAC';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleAllowListAbi };\n\n/**\n * Object representation of a {@link SimpleAllowList} initialization payload.\n *\n * @export\n * @interface SimpleAllowListPayload\n * @typedef {SimpleAllowListPayload}\n */\nexport interface SimpleAllowListPayload {\n /**\n * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of allowed addresses.\n *\n * @type {Address[]}\n */\n allowed: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleAllowList` event types.\n *\n * @export\n * @typedef {SimpleAllowListLog}\n * @template {ContractEventName<\n * typeof simpleAllowListAbi\n * >} [event=ContractEventName<typeof simpleAllowListAbi>]\n */\nexport type SimpleAllowListLog<\n event extends ContractEventName<\n typeof simpleAllowListAbi\n > = ContractEventName<typeof simpleAllowListAbi>,\n> = GenericLog<typeof simpleAllowListAbi, event>;\n\n/**\n * A constant representing the list manager's role\n *\n * @deprecated use {@link Roles} instead\n * @type {1n}\n */\nexport const LIST_MANAGER_ROLE = Roles.MANAGER;\n/**\n * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses\n *\n * @export\n * @class SimpleAllowList\n * @typedef {SimpleAllowList}\n * @extends {DeployableTargetWithRBAC<SimpleAllowListPayload>}\n */\nexport class SimpleAllowList extends DeployableTargetWithRBAC<\n SimpleAllowListPayload,\n typeof simpleAllowListAbi\n> {\n public override readonly abi = simpleAllowListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleAllowListBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Retrieves the owner\n *\n * @public\n * @async\n * @param {?ReadParams<typeof simpleAllowListAbi, 'owner'>} [params]\n * @returns {Promise<Address>} - The address of the owner\n */\n public async owner(\n params?: ReadParams<typeof simpleAllowListAbi, 'owner'>,\n ): Promise<Address> {\n return await readSimpleAllowListOwner(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n address: this.assertValidAddress(),\n args: [],\n });\n }\n\n /**\n * Check if a user is authorized.\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ): Promise<boolean> {\n return await readSimpleAllowListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<void>}\n */\n public async setAllowed(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n return await this.awaitResult(\n this.setAllowedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<void>}\n */\n public async setAllowedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n const { request, result } = await simulateSimpleAllowListSetAllowed(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleAllowListSetAllowed(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleAllowListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleAllowListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleAllowListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleAllowListPayload} param0\n * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n * @param {Address[]} param0.allowed - List of allowed addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleAllowListPayload({\n owner,\n allowed,\n}: SimpleAllowListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'allowed' },\n ],\n [owner, allowed],\n );\n}\n"],"names":["LIST_MANAGER_ROLE","Roles","_SimpleAllowList","DeployableTargetWithRBAC","simpleAllowListAbi","params","readSimpleAllowListOwner","address","readSimpleAllowListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleAllowListSetAllowed","writeSimpleAllowListSetAllowed","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleAllowListPayload","SimpleAllowListBases","RegistryType","SimpleAllowList","encodeAbiParameters"],"mappings":";;;;;;;s4ZA+EaA,IAAoBC,EAAM,SAS1BC,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,MACXC,GACkB;AACX,WAAA,MAAMC,EAAyB,KAAK,SAAS;AAAA,MAClD,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAID;AAAA,MACJ,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA,IAAA,CACR;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,UACXE,GACAF,GACkB;AACX,WAAA,MAAMG,EAA6B,KAAK,SAAS;AAAA,MACtD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,GAASE,CAAQ;AAAA,MACxB,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GA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AAAA,IAAA;AAAA,EAEnD;AACF;AA5IEjB,EAAuB,QAAiC;AAAA,EACtD,GAAIyB;AAAA,GASNzB,EAAuB,eAA6B0B,EAAa;AAtB5D,IAAMC,IAAN3B;AAkKA,SAASwB,EAA8B;AAAA,EAC5C,OAAAL;AAAA,EACA,SAAAV;AACF,GAA2B;AAClB,SAAAmB;AAAA,IACL;AAAA,MACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,aAAa,MAAM,UAAU;AAAA,IACvC;AAAA,IACA,CAACT,GAAOV,CAAO;AAAA,EAAA;AAEnB;"}
|
|
1
|
+
{"version":3,"file":"SimpleAllowList.js","sources":["../../src/AllowLists/SimpleAllowList.ts"],"sourcesContent":["import {\n readSimpleAllowListIsAllowed,\n readSimpleAllowListOwner,\n simpleAllowListAbi,\n simulateSimpleAllowListSetAllowed,\n writeSimpleAllowListSetAllowed,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleAllowList.sol/SimpleAllowList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { SimpleAllowList as SimpleAllowListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DeployableTargetWithRBAC,\n Roles,\n} from '../Deployable/DeployableTargetWithRBAC';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleAllowListAbi };\n\n/**\n * Object representation of a {@link SimpleAllowList} initialization payload.\n *\n * @export\n * @interface SimpleAllowListPayload\n * @typedef {SimpleAllowListPayload}\n */\nexport interface SimpleAllowListPayload {\n /**\n * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of allowed addresses.\n *\n * @type {Address[]}\n */\n allowed: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleAllowList` event types.\n *\n * @export\n * @typedef {SimpleAllowListLog}\n * @template {ContractEventName<\n * typeof simpleAllowListAbi\n * >} [event=ContractEventName<typeof simpleAllowListAbi>]\n */\nexport type SimpleAllowListLog<\n event extends ContractEventName<\n typeof simpleAllowListAbi\n > = ContractEventName<typeof simpleAllowListAbi>,\n> = GenericLog<typeof simpleAllowListAbi, event>;\n\n/**\n * A constant representing the list manager's role\n *\n * @deprecated use {@link Roles} instead\n * @type {1n}\n */\nexport const LIST_MANAGER_ROLE = Roles.MANAGER;\n/**\n * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses\n *\n * @export\n * @class SimpleAllowList\n * @typedef {SimpleAllowList}\n * @extends {DeployableTargetWithRBAC<SimpleAllowListPayload>}\n */\nexport class SimpleAllowList extends DeployableTargetWithRBAC<\n SimpleAllowListPayload,\n typeof simpleAllowListAbi\n> {\n public override readonly abi = simpleAllowListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleAllowListBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Retrieves the owner\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the owner\n */\n public async owner(\n params?: ReadParams<typeof simpleAllowListAbi, 'owner'>,\n ): Promise<Address> {\n return await readSimpleAllowListOwner(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n address: this.assertValidAddress(),\n args: [],\n });\n }\n\n /**\n * Check if a user is authorized.\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ): Promise<boolean> {\n return await readSimpleAllowListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams} [params]\n * @returns {Promise<void>}\n */\n public async setAllowed(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n return await this.awaitResult(\n this.setAllowedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The allowed status of each user\n * @param {?ReadParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAllowedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n const { request, result } = await simulateSimpleAllowListSetAllowed(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleAllowListSetAllowed(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleAllowListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleAllowListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleAllowListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleAllowListPayload} param0\n * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n * @param {Address[]} param0.allowed - List of allowed addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleAllowListPayload({\n owner,\n allowed,\n}: SimpleAllowListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'allowed' },\n ],\n [owner, allowed],\n );\n}\n"],"names":["LIST_MANAGER_ROLE","Roles","_SimpleAllowList","DeployableTargetWithRBAC","simpleAllowListAbi","params","readSimpleAllowListOwner","address","readSimpleAllowListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleAllowListSetAllowed","writeSimpleAllowListSetAllowed","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleAllowListPayload","SimpleAllowListBases","RegistryType","SimpleAllowList","encodeAbiParameters"],"mappings":";;;;;;;s4ZA+EaA,IAAoBC,EAAM,SAS1BC,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,MACXC,GACkB;AACX,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AA,IAAA;AAEF,QAAI,CAACC,EAAQ,SAASA,EAAQ,UAAUE,GAAa;AACnD,YAAMC,IAAQF,EAAQ,UAClBA,EAAQ,QAAQ,UAChBA,EAAQ,SACNG,EAAWH,EAAQ,MAAM,EAAE,WAC3BI,IAAA,KAAK,aAAL,gBAAAA,EAAe;AACrB,UAAIF;AACF,QAAAH,EAAQ,QAAQG;AAAA;AAEhB,cAAM,IAAIG,EAAoC;AAAA,IAElD;AACO,WAAA;AAAA,MACL,KAAKpB;AAAAA,MACL,UAAAqB;AAAA,MACA,MAAM,CAACC,EAA8BR,CAAO,CAAC;AAAA,MAC7C,GAAG,KAAK,wBAAwBC,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AA5IEjB,EAAuB,QAAiC;AAAA,EACtD,GAAIyB;AAAA,GASNzB,EAAuB,eAA6B0B,EAAa;AAtB5D,IAAMC,IAAN3B;AAkKA,SAASwB,EAA8B;AAAA,EAC5C,OAAAL;AAAA,EACA,SAAAV;AACF,GAA2B;AAClB,SAAAmB;AAAA,IACL;AAAA,MACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,aAAa,MAAM,UAAU;AAAA,IACvC;AAAA,IACA,CAACT,GAAOV,CAAO;AAAA,EAAA;AAEnB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../generated-B0tk-c9b.cjs"),e=require("../SimpleDenyList-BwfNjRsg.cjs");require("@wagmi/core");require("viem");require("../deployments-CMdF5uEC.cjs");require("../Deployable/DeployableTargetWithRBAC.cjs");require("../errors.cjs");require("../utils.cjs");exports.simpleDenyListAbi=r.I;exports.SimpleDenyList=e.SimpleDenyList;exports.prepareSimpleDenyListPayload=e.prepareSimpleDenyListPayload;
|
|
2
2
|
//# sourceMappingURL=SimpleDenyList.cjs.map
|