@seedprotocol/publish 0.4.29 → 0.4.31

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +6 -2
  3. package/dist/config-B4_sw4Ey.js +442 -0
  4. package/dist/config-B4_sw4Ey.js.map +1 -0
  5. package/dist/config-BcAZza3G.js +432 -0
  6. package/dist/config-BcAZza3G.js.map +1 -0
  7. package/dist/config-BtwOzQP0.js +471 -0
  8. package/dist/config-BtwOzQP0.js.map +1 -0
  9. package/dist/config-CJkIBxtE.js +432 -0
  10. package/dist/config-CJkIBxtE.js.map +1 -0
  11. package/dist/config-DBOagqZ1.js +432 -0
  12. package/dist/config-DBOagqZ1.js.map +1 -0
  13. package/dist/config-Ds5V_P5K.js +557 -0
  14. package/dist/config-Ds5V_P5K.js.map +1 -0
  15. package/dist/config-MpeHT6rf.js +535 -0
  16. package/dist/config-MpeHT6rf.js.map +1 -0
  17. package/dist/config-_R8orn1f.js +454 -0
  18. package/dist/config-_R8orn1f.js.map +1 -0
  19. package/dist/config.d.ts +8 -0
  20. package/dist/config.d.ts.map +1 -1
  21. package/dist/errors.d.ts +3 -2
  22. package/dist/errors.d.ts.map +1 -1
  23. package/dist/helpers/ensureEip7702ModularAccountReady.d.ts.map +1 -1
  24. package/dist/helpers/ensureExecutorModule.d.ts +2 -1
  25. package/dist/helpers/ensureExecutorModule.d.ts.map +1 -1
  26. package/dist/helpers/ensureManagedAccountEasConfigured.d.ts +2 -1
  27. package/dist/helpers/ensureManagedAccountEasConfigured.d.ts.map +1 -1
  28. package/dist/helpers/ensureManagedAccountReady.d.ts +3 -2
  29. package/dist/helpers/ensureManagedAccountReady.d.ts.map +1 -1
  30. package/dist/helpers/ensureManagedSignerSessionKey.d.ts +9 -0
  31. package/dist/helpers/ensureManagedSignerSessionKey.d.ts.map +1 -0
  32. package/dist/helpers/ensureModularPublishBootstrap.d.ts +7 -0
  33. package/dist/helpers/ensureModularPublishBootstrap.d.ts.map +1 -0
  34. package/dist/helpers/ensureSmartWalletThenPublish.d.ts +4 -3
  35. package/dist/helpers/ensureSmartWalletThenPublish.d.ts.map +1 -1
  36. package/dist/helpers/thirdweb.d.ts +18 -1
  37. package/dist/helpers/thirdweb.d.ts.map +1 -1
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +5334 -5883
  41. package/dist/index.js.map +1 -1
  42. package/dist/react/ConnectButton.d.ts.map +1 -1
  43. package/dist/services/publish/actors/createAttestations.d.ts.map +1 -1
  44. package/dist/services/publish/index.d.ts.map +1 -1
  45. package/dist/worker-BCxmY47A.js +69 -0
  46. package/dist/worker-BCxmY47A.js.map +1 -0
  47. package/dist/worker-CaUA-aJd.js +69 -0
  48. package/dist/worker-CaUA-aJd.js.map +1 -0
  49. package/dist/worker-D9Pq_HWb.js +69 -0
  50. package/dist/worker-D9Pq_HWb.js.map +1 -0
  51. package/dist/worker-DFRFhbL9.js +69 -0
  52. package/dist/worker-DFRFhbL9.js.map +1 -0
  53. package/dist/worker-DFc2aG0v.js +69 -0
  54. package/dist/worker-DFc2aG0v.js.map +1 -0
  55. package/dist/worker-DL5ecOQf.js +69 -0
  56. package/dist/worker-DL5ecOQf.js.map +1 -0
  57. package/dist/worker-OeOnFu0v.js +69 -0
  58. package/dist/worker-OeOnFu0v.js.map +1 -0
  59. package/dist/worker-TgcK7QlX.js +69 -0
  60. package/dist/worker-TgcK7QlX.js.map +1 -0
  61. package/package.json +6 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-BtwOzQP0.js","names":[],"sources":["../src/helpers/constants.ts","../src/helpers/thirdweb/11155420/0x76f47d88bfaf670f5208911181fcdc0e160cb16d.ts","../src/helpers/thirdweb.ts","../src/helpers/easDirect.ts","../src/helpers/resolveRevokeAccount.ts","../src/services/revoke/revokeAttestations.ts","../src/config.ts"],"sourcesContent":["/**\n * Constants for the publish package.\n */\n/** EAS Schema Registry on Optimism Sepolia (chain 11155420) */\nexport const SCHEMA_REGISTRY_ADDRESS =\n '0x4200000000000000000000000000000000000020' as const\n\n/** Schema #1 (Name a Schema) - universal UID for naming attestations */\nexport const EAS_SCHEMA_NAME_ATTESTATION_UID =\n '0x44d562ac1d7cd77e232978687fea027ace48f719cf1d58c7888e509663bb87fc' as const\n\n/** Thirdweb ManagedAccount factory on Optimism Sepolia (chain 11155420) */\nexport const THIRDWEB_ACCOUNT_FACTORY_ADDRESS =\n '0x76f47d88bfaf670f5208911181fcdc0e160cb16d' as const\n\n/** EAS contract address on Optimism Sepolia (chain 11155420) */\nexport const EAS_CONTRACT_ADDRESS =\n '0x4200000000000000000000000000000000000021' as const\n\n/**\n * Optimism Sepolia address of the deployment the **`multiPublish` Thirdweb ABI** was generated from\n * (`helpers/thirdweb/11155420/0xcd8c945872df8e664e55cf8885c85ea3ea8f2148`).\n *\n * **Do not use as the transaction `to` for user publishes.** Runtime `multiPublish` targets the\n * publisher’s deployed ManagedAccount (non-modular), `managedAddress` (modular), or is not used\n * when attesting via direct EAS (EOA path).\n */\nexport const MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA =\n '0xcd8c945872df8e664e55cf8885c85ea3ea8f2148' as const\n\n/**\n * @deprecated Misleading name: this is the ABI reference deployment, not a shared on-chain router.\n * Use {@link MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA}.\n */\nexport const SEED_PROTOCOL_CONTRACT_ADDRESS_OP_SEPOLIA =\n MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA\n\nexport const PublishMachineStates = {\n SUCCESS: 'success',\n FAILURE: 'failure',\n} as const\n\n/** States that run for a long time without snapshot changes; need periodic saves. */\nexport const LONG_RUNNING_PUBLISH_STATES = [\n 'pollingForConfirmation',\n 'uploadingData',\n 'uploadingViaBundler',\n 'uploadingViaBundlerPhase2',\n] as const\n\nexport const PERIODIC_SAVE_INTERVAL_MS = 30_000\n","import {\n prepareEvent,\n prepareContractCall,\n readContract,\n type BaseTransactionOptions,\n type AbiParameterToPrimitiveType,\n} from \"thirdweb\";\n\n/**\n* Contract events\n*/\n\n/**\n * Represents the filters for the \"AccountCreated\" event.\n */\nexport type AccountCreatedEventFilters = Partial<{\n account: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\",\"indexed\":true}>\naccountAdmin: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"accountAdmin\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the AccountCreated event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { accountCreatedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * accountCreatedEvent({\n * account: ...,\n * accountAdmin: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function accountCreatedEvent(filters: AccountCreatedEventFilters = {}) {\n return prepareEvent({\n signature: \"event AccountCreated(address indexed account, address indexed accountAdmin)\",\n filters,\n });\n};\n \n\n\n\n/**\n * Creates an event object for the ContractURIUpdated event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { contractURIUpdatedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * contractURIUpdatedEvent()\n * ],\n * });\n * ```\n */ \nexport function contractURIUpdatedEvent() {\n return prepareEvent({\n signature: \"event ContractURIUpdated(string prevURI, string newURI)\",\n });\n};\n \n\n/**\n * Represents the filters for the \"ExtensionAdded\" event.\n */\nexport type ExtensionAddedEventFilters = Partial<{\n name: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"name\",\"indexed\":true}>\nimplementation: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"implementation\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the ExtensionAdded event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { extensionAddedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * extensionAddedEvent({\n * name: ...,\n * implementation: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function extensionAddedEvent(filters: ExtensionAddedEventFilters = {}) {\n return prepareEvent({\n signature: \"event ExtensionAdded(string indexed name, address indexed implementation, ((string name, string metadataURI, address implementation) metadata, (bytes4 functionSelector, string functionSignature)[] functions) extension)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"ExtensionRemoved\" event.\n */\nexport type ExtensionRemovedEventFilters = Partial<{\n name: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"name\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the ExtensionRemoved event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { extensionRemovedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * extensionRemovedEvent({\n * name: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function extensionRemovedEvent(filters: ExtensionRemovedEventFilters = {}) {\n return prepareEvent({\n signature: \"event ExtensionRemoved(string indexed name, ((string name, string metadataURI, address implementation) metadata, (bytes4 functionSelector, string functionSignature)[] functions) extension)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"ExtensionReplaced\" event.\n */\nexport type ExtensionReplacedEventFilters = Partial<{\n name: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"name\",\"indexed\":true}>\nimplementation: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"implementation\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the ExtensionReplaced event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { extensionReplacedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * extensionReplacedEvent({\n * name: ...,\n * implementation: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function extensionReplacedEvent(filters: ExtensionReplacedEventFilters = {}) {\n return prepareEvent({\n signature: \"event ExtensionReplaced(string indexed name, address indexed implementation, ((string name, string metadataURI, address implementation) metadata, (bytes4 functionSelector, string functionSignature)[] functions) extension)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"FunctionDisabled\" event.\n */\nexport type FunctionDisabledEventFilters = Partial<{\n name: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"name\",\"indexed\":true}>\nfunctionSelector: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"functionSelector\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the FunctionDisabled event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { functionDisabledEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * functionDisabledEvent({\n * name: ...,\n * functionSelector: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function functionDisabledEvent(filters: FunctionDisabledEventFilters = {}) {\n return prepareEvent({\n signature: \"event FunctionDisabled(string indexed name, bytes4 indexed functionSelector, (string name, string metadataURI, address implementation) extMetadata)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"FunctionEnabled\" event.\n */\nexport type FunctionEnabledEventFilters = Partial<{\n name: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"name\",\"indexed\":true}>\nfunctionSelector: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"functionSelector\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the FunctionEnabled event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { functionEnabledEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * functionEnabledEvent({\n * name: ...,\n * functionSelector: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function functionEnabledEvent(filters: FunctionEnabledEventFilters = {}) {\n return prepareEvent({\n signature: \"event FunctionEnabled(string indexed name, bytes4 indexed functionSelector, (bytes4 functionSelector, string functionSignature) extFunction, (string name, string metadataURI, address implementation) extMetadata)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"RoleAdminChanged\" event.\n */\nexport type RoleAdminChangedEventFilters = Partial<{\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\",\"indexed\":true}>\npreviousAdminRole: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"previousAdminRole\",\"indexed\":true}>\nnewAdminRole: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"newAdminRole\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the RoleAdminChanged event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { roleAdminChangedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * roleAdminChangedEvent({\n * role: ...,\n * previousAdminRole: ...,\n * newAdminRole: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function roleAdminChangedEvent(filters: RoleAdminChangedEventFilters = {}) {\n return prepareEvent({\n signature: \"event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"RoleGranted\" event.\n */\nexport type RoleGrantedEventFilters = Partial<{\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\",\"indexed\":true}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\",\"indexed\":true}>\nsender: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"sender\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the RoleGranted event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { roleGrantedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * roleGrantedEvent({\n * role: ...,\n * account: ...,\n * sender: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function roleGrantedEvent(filters: RoleGrantedEventFilters = {}) {\n return prepareEvent({\n signature: \"event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"RoleRevoked\" event.\n */\nexport type RoleRevokedEventFilters = Partial<{\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\",\"indexed\":true}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\",\"indexed\":true}>\nsender: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"sender\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the RoleRevoked event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { roleRevokedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * roleRevokedEvent({\n * role: ...,\n * account: ...,\n * sender: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function roleRevokedEvent(filters: RoleRevokedEventFilters = {}) {\n return prepareEvent({\n signature: \"event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"SignerAdded\" event.\n */\nexport type SignerAddedEventFilters = Partial<{\n account: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\",\"indexed\":true}>\nsigner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"signer\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the SignerAdded event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { signerAddedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * signerAddedEvent({\n * account: ...,\n * signer: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function signerAddedEvent(filters: SignerAddedEventFilters = {}) {\n return prepareEvent({\n signature: \"event SignerAdded(address indexed account, address indexed signer)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"SignerRemoved\" event.\n */\nexport type SignerRemovedEventFilters = Partial<{\n account: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\",\"indexed\":true}>\nsigner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"signer\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the SignerRemoved event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { signerRemovedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * signerRemovedEvent({\n * account: ...,\n * signer: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function signerRemovedEvent(filters: SignerRemovedEventFilters = {}) {\n return prepareEvent({\n signature: \"event SignerRemoved(address indexed account, address indexed signer)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"AdminUpdated\" event.\n */\nexport type AdminUpdatedEventFilters = Partial<{\n signer: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"signer\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the AdminUpdated event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { adminUpdatedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * adminUpdatedEvent({\n * signer: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function adminUpdatedEvent(filters: AdminUpdatedEventFilters = {}) {\n return prepareEvent({\n signature: \"event AdminUpdated(address indexed signer, bool isAdmin)\",\n filters,\n });\n};\n \n\n/**\n * Represents the filters for the \"SignerPermissionsUpdated\" event.\n */\nexport type SignerPermissionsUpdatedEventFilters = Partial<{\n authorizingSigner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"authorizingSigner\",\"indexed\":true}>\ntargetSigner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"targetSigner\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the SignerPermissionsUpdated event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { signerPermissionsUpdatedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * signerPermissionsUpdatedEvent({\n * authorizingSigner: ...,\n * targetSigner: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function signerPermissionsUpdatedEvent(filters: SignerPermissionsUpdatedEventFilters = {}) {\n return prepareEvent({\n signature: \"event SignerPermissionsUpdated(address indexed authorizingSigner, address indexed targetSigner, (address signer, uint8 isAdmin, address[] approvedTargets, uint256 nativeTokenLimitPerTransaction, uint128 permissionStartTimestamp, uint128 permissionEndTimestamp, uint128 reqValidityStartTimestamp, uint128 reqValidityEndTimestamp, bytes32 uid) permissions)\",\n filters,\n });\n};\n \n\n\n\n/**\n * Creates an event object for the CreatedAttestation event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { createdAttestationEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * createdAttestationEvent()\n * ],\n * });\n * ```\n */ \nexport function createdAttestationEvent() {\n return prepareEvent({\n signature: \"event CreatedAttestation((bytes32 schemaUid, bytes32 attestationUid) result)\",\n });\n};\n \n\n\n\n/**\n * Creates an event object for the EIP712DomainChanged event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { eIP712DomainChangedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * eIP712DomainChangedEvent()\n * ],\n * });\n * ```\n */ \nexport function eIP712DomainChangedEvent() {\n return prepareEvent({\n signature: \"event EIP712DomainChanged()\",\n });\n};\n \n\n\n\n/**\n * Creates an event object for the Initialized event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { initializedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * initializedEvent()\n * ],\n * });\n * ```\n */ \nexport function initializedEvent() {\n return prepareEvent({\n signature: \"event Initialized(uint8 version)\",\n });\n};\n \n\n\n\n/**\n * Creates an event object for the Log event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { logEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * logEvent()\n * ],\n * });\n * ```\n */ \nexport function logEvent() {\n return prepareEvent({\n signature: \"event Log(string message)\",\n });\n};\n \n\n/**\n * Represents the filters for the \"OwnershipTransferred\" event.\n */\nexport type OwnershipTransferredEventFilters = Partial<{\n previousOwner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"previousOwner\",\"indexed\":true}>\nnewOwner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"newOwner\",\"indexed\":true}>\n}>;\n\n/**\n * Creates an event object for the OwnershipTransferred event.\n * @param filters - Optional filters to apply to the event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { ownershipTransferredEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * ownershipTransferredEvent({\n * previousOwner: ...,\n * newOwner: ...,\n * })\n * ],\n * });\n * ```\n */ \nexport function ownershipTransferredEvent(filters: OwnershipTransferredEventFilters = {}) {\n return prepareEvent({\n signature: \"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)\",\n filters,\n });\n};\n \n\n\n\n/**\n * Creates an event object for the SeedPublished event.\n * @returns The prepared event object.\n * @example\n * ```\n * import { getContractEvents } from \"thirdweb\";\n * import { seedPublishedEvent } from \"TODO\";\n * \n * const events = await getContractEvents({\n * contract,\n * events: [\n * seedPublishedEvent()\n * ],\n * });\n * ```\n */ \nexport function seedPublishedEvent() {\n return prepareEvent({\n signature: \"event SeedPublished(bytes returnedDataFromEAS)\",\n });\n};\n \n\n/**\n* Contract read functions\n*/\n\n\n\n/**\n * Calls the \"DEFAULT_ADMIN_ROLE\" function on the contract.\n * @param options - The options for the DEFAULT_ADMIN_ROLE function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { DEFAULT_ADMIN_ROLE } from \"TODO\";\n * \n * const result = await DEFAULT_ADMIN_ROLE();\n * \n * ```\n */\nexport async function DEFAULT_ADMIN_ROLE(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xa217fddf\",\n [],\n [\n {\n \"type\": \"bytes32\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"accountImplementation\" function on the contract.\n * @param options - The options for the accountImplementation function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { accountImplementation } from \"TODO\";\n * \n * const result = await accountImplementation();\n * \n * ```\n */\nexport async function accountImplementation(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x11464fbe\",\n [],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"contractURI\" function on the contract.\n * @param options - The options for the contractURI function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { contractURI } from \"TODO\";\n * \n * const result = await contractURI();\n * \n * ```\n */\nexport async function contractURI(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xe8a3d485\",\n [],\n [\n {\n \"type\": \"string\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"defaultExtensions\" function on the contract.\n * @param options - The options for the defaultExtensions function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { defaultExtensions } from \"TODO\";\n * \n * const result = await defaultExtensions();\n * \n * ```\n */\nexport async function defaultExtensions(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x463c4864\",\n [],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"entrypoint\" function on the contract.\n * @param options - The options for the entrypoint function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { entrypoint } from \"TODO\";\n * \n * const result = await entrypoint();\n * \n * ```\n */\nexport async function entrypoint(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xa65d69d4\",\n [],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: []\n });\n};\n\n\n/**\n * Represents the parameters for the \"getAccounts\" function.\n */\nexport type GetAccountsParams = {\n start: AbiParameterToPrimitiveType<{\"type\":\"uint256\",\"name\":\"_start\"}>\nend: AbiParameterToPrimitiveType<{\"type\":\"uint256\",\"name\":\"_end\"}>\n};\n\n/**\n * Calls the \"getAccounts\" function on the contract.\n * @param options - The options for the getAccounts function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAccounts } from \"TODO\";\n * \n * const result = await getAccounts({\n * start: ...,\n * end: ...,\n * });\n * \n * ```\n */\nexport async function getAccounts(\n options: BaseTransactionOptions<GetAccountsParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xe68a7c3b\",\n [\n {\n \"type\": \"uint256\",\n \"name\": \"_start\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"_end\"\n }\n ],\n [\n {\n \"type\": \"address[]\",\n \"name\": \"accounts\"\n }\n ]\n],\n params: [options.start, options.end]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getAccountsOfSigner\" function.\n */\nexport type GetAccountsOfSignerParams = {\n signer: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"signer\"}>\n};\n\n/**\n * Calls the \"getAccountsOfSigner\" function on the contract.\n * @param options - The options for the getAccountsOfSigner function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAccountsOfSigner } from \"TODO\";\n * \n * const result = await getAccountsOfSigner({\n * signer: ...,\n * });\n * \n * ```\n */\nexport async function getAccountsOfSigner(\n options: BaseTransactionOptions<GetAccountsOfSignerParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x0e6254fd\",\n [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n }\n ],\n [\n {\n \"type\": \"address[]\",\n \"name\": \"accounts\"\n }\n ]\n],\n params: [options.signer]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getAddress\" function.\n */\nexport type GetAddressParams = {\n adminSigner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_adminSigner\"}>\ndata: AbiParameterToPrimitiveType<{\"type\":\"bytes\",\"name\":\"_data\"}>\n};\n\n/**\n * Calls the \"getAddress\" function on the contract.\n * @param options - The options for the getAddress function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAddress } from \"TODO\";\n * \n * const result = await getAddress({\n * adminSigner: ...,\n * data: ...,\n * });\n * \n * ```\n */\nexport async function getAddress(\n options: BaseTransactionOptions<GetAddressParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x8878ed33\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_adminSigner\"\n },\n {\n \"type\": \"bytes\",\n \"name\": \"_data\"\n }\n ],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: [options.adminSigner, options.data]\n });\n};\n\n\n\n\n/**\n * Calls the \"getAllAccounts\" function on the contract.\n * @param options - The options for the getAllAccounts function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAllAccounts } from \"TODO\";\n * \n * const result = await getAllAccounts();\n * \n * ```\n */\nexport async function getAllAccounts(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x08e93d0a\",\n [],\n [\n {\n \"type\": \"address[]\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"getAllExtensions\" function on the contract.\n * @param options - The options for the getAllExtensions function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAllExtensions } from \"TODO\";\n * \n * const result = await getAllExtensions();\n * \n * ```\n */\nexport async function getAllExtensions(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x4a00cc48\",\n [],\n [\n {\n \"type\": \"tuple[]\",\n \"name\": \"allExtensions\",\n \"components\": [\n {\n \"type\": \"tuple\",\n \"name\": \"metadata\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"name\"\n },\n {\n \"type\": \"string\",\n \"name\": \"metadataURI\"\n },\n {\n \"type\": \"address\",\n \"name\": \"implementation\"\n }\n ]\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"functions\",\n \"components\": [\n {\n \"type\": \"bytes4\",\n \"name\": \"functionSelector\"\n },\n {\n \"type\": \"string\",\n \"name\": \"functionSignature\"\n }\n ]\n }\n ]\n }\n ]\n],\n params: []\n });\n};\n\n\n/**\n * Represents the parameters for the \"getExtension\" function.\n */\nexport type GetExtensionParams = {\n extensionName: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"extensionName\"}>\n};\n\n/**\n * Calls the \"getExtension\" function on the contract.\n * @param options - The options for the getExtension function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getExtension } from \"TODO\";\n * \n * const result = await getExtension({\n * extensionName: ...,\n * });\n * \n * ```\n */\nexport async function getExtension(\n options: BaseTransactionOptions<GetExtensionParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xc22707ee\",\n [\n {\n \"type\": \"string\",\n \"name\": \"extensionName\"\n }\n ],\n [\n {\n \"type\": \"tuple\",\n \"components\": [\n {\n \"type\": \"tuple\",\n \"name\": \"metadata\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"name\"\n },\n {\n \"type\": \"string\",\n \"name\": \"metadataURI\"\n },\n {\n \"type\": \"address\",\n \"name\": \"implementation\"\n }\n ]\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"functions\",\n \"components\": [\n {\n \"type\": \"bytes4\",\n \"name\": \"functionSelector\"\n },\n {\n \"type\": \"string\",\n \"name\": \"functionSignature\"\n }\n ]\n }\n ]\n }\n ]\n],\n params: [options.extensionName]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getImplementationForFunction\" function.\n */\nexport type GetImplementationForFunctionParams = {\n functionSelector: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"_functionSelector\"}>\n};\n\n/**\n * Calls the \"getImplementationForFunction\" function on the contract.\n * @param options - The options for the getImplementationForFunction function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getImplementationForFunction } from \"TODO\";\n * \n * const result = await getImplementationForFunction({\n * functionSelector: ...,\n * });\n * \n * ```\n */\nexport async function getImplementationForFunction(\n options: BaseTransactionOptions<GetImplementationForFunctionParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xce0b6013\",\n [\n {\n \"type\": \"bytes4\",\n \"name\": \"_functionSelector\"\n }\n ],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: [options.functionSelector]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getMetadataForFunction\" function.\n */\nexport type GetMetadataForFunctionParams = {\n functionSelector: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"functionSelector\"}>\n};\n\n/**\n * Calls the \"getMetadataForFunction\" function on the contract.\n * @param options - The options for the getMetadataForFunction function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getMetadataForFunction } from \"TODO\";\n * \n * const result = await getMetadataForFunction({\n * functionSelector: ...,\n * });\n * \n * ```\n */\nexport async function getMetadataForFunction(\n options: BaseTransactionOptions<GetMetadataForFunctionParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xa0dbaefd\",\n [\n {\n \"type\": \"bytes4\",\n \"name\": \"functionSelector\"\n }\n ],\n [\n {\n \"type\": \"tuple\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"name\"\n },\n {\n \"type\": \"string\",\n \"name\": \"metadataURI\"\n },\n {\n \"type\": \"address\",\n \"name\": \"implementation\"\n }\n ]\n }\n ]\n],\n params: [options.functionSelector]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getRoleAdmin\" function.\n */\nexport type GetRoleAdminParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\n};\n\n/**\n * Calls the \"getRoleAdmin\" function on the contract.\n * @param options - The options for the getRoleAdmin function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getRoleAdmin } from \"TODO\";\n * \n * const result = await getRoleAdmin({\n * role: ...,\n * });\n * \n * ```\n */\nexport async function getRoleAdmin(\n options: BaseTransactionOptions<GetRoleAdminParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x248a9ca3\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n }\n ],\n [\n {\n \"type\": \"bytes32\"\n }\n ]\n],\n params: [options.role]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getRoleMember\" function.\n */\nexport type GetRoleMemberParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\nindex: AbiParameterToPrimitiveType<{\"type\":\"uint256\",\"name\":\"index\"}>\n};\n\n/**\n * Calls the \"getRoleMember\" function on the contract.\n * @param options - The options for the getRoleMember function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getRoleMember } from \"TODO\";\n * \n * const result = await getRoleMember({\n * role: ...,\n * index: ...,\n * });\n * \n * ```\n */\nexport async function getRoleMember(\n options: BaseTransactionOptions<GetRoleMemberParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x9010d07c\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"index\"\n }\n ],\n [\n {\n \"type\": \"address\",\n \"name\": \"member\"\n }\n ]\n],\n params: [options.role, options.index]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getRoleMemberCount\" function.\n */\nexport type GetRoleMemberCountParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\n};\n\n/**\n * Calls the \"getRoleMemberCount\" function on the contract.\n * @param options - The options for the getRoleMemberCount function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getRoleMemberCount } from \"TODO\";\n * \n * const result = await getRoleMemberCount({\n * role: ...,\n * });\n * \n * ```\n */\nexport async function getRoleMemberCount(\n options: BaseTransactionOptions<GetRoleMemberCountParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xca15c873\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n }\n ],\n [\n {\n \"type\": \"uint256\",\n \"name\": \"count\"\n }\n ]\n],\n params: [options.role]\n });\n};\n\n\n/**\n * Represents the parameters for the \"hasRole\" function.\n */\nexport type HasRoleParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\"}>\n};\n\n/**\n * Calls the \"hasRole\" function on the contract.\n * @param options - The options for the hasRole function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { hasRole } from \"TODO\";\n * \n * const result = await hasRole({\n * role: ...,\n * account: ...,\n * });\n * \n * ```\n */\nexport async function hasRole(\n options: BaseTransactionOptions<HasRoleParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x91d14854\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n },\n {\n \"type\": \"address\",\n \"name\": \"account\"\n }\n ],\n [\n {\n \"type\": \"bool\"\n }\n ]\n],\n params: [options.role, options.account]\n });\n};\n\n\n/**\n * Represents the parameters for the \"hasRoleWithSwitch\" function.\n */\nexport type HasRoleWithSwitchParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\"}>\n};\n\n/**\n * Calls the \"hasRoleWithSwitch\" function on the contract.\n * @param options - The options for the hasRoleWithSwitch function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { hasRoleWithSwitch } from \"TODO\";\n * \n * const result = await hasRoleWithSwitch({\n * role: ...,\n * account: ...,\n * });\n * \n * ```\n */\nexport async function hasRoleWithSwitch(\n options: BaseTransactionOptions<HasRoleWithSwitchParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xa32fa5b3\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n },\n {\n \"type\": \"address\",\n \"name\": \"account\"\n }\n ],\n [\n {\n \"type\": \"bool\"\n }\n ]\n],\n params: [options.role, options.account]\n });\n};\n\n\n/**\n * Represents the parameters for the \"isRegistered\" function.\n */\nexport type IsRegisteredParams = {\n account: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_account\"}>\n};\n\n/**\n * Calls the \"isRegistered\" function on the contract.\n * @param options - The options for the isRegistered function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { isRegistered } from \"TODO\";\n * \n * const result = await isRegistered({\n * account: ...,\n * });\n * \n * ```\n */\nexport async function isRegistered(\n options: BaseTransactionOptions<IsRegisteredParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xc3c5a547\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_account\"\n }\n ],\n [\n {\n \"type\": \"bool\"\n }\n ]\n],\n params: [options.account]\n });\n};\n\n\n\n\n/**\n * Calls the \"totalAccounts\" function on the contract.\n * @param options - The options for the totalAccounts function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { totalAccounts } from \"TODO\";\n * \n * const result = await totalAccounts();\n * \n * ```\n */\nexport async function totalAccounts(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x58451f97\",\n [],\n [\n {\n \"type\": \"uint256\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"getAllActiveSigners\" function on the contract.\n * @param options - The options for the getAllActiveSigners function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAllActiveSigners } from \"TODO\";\n * \n * const result = await getAllActiveSigners();\n * \n * ```\n */\nexport async function getAllActiveSigners(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x8b52d723\",\n [],\n [\n {\n \"type\": \"tuple[]\",\n \"name\": \"signers\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n },\n {\n \"type\": \"address[]\",\n \"name\": \"approvedTargets\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"nativeTokenLimitPerTransaction\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"startTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"endTimestamp\"\n }\n ]\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"getAllAdmins\" function on the contract.\n * @param options - The options for the getAllAdmins function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAllAdmins } from \"TODO\";\n * \n * const result = await getAllAdmins();\n * \n * ```\n */\nexport async function getAllAdmins(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xe9523c97\",\n [],\n [\n {\n \"type\": \"address[]\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"getAllSigners\" function on the contract.\n * @param options - The options for the getAllSigners function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getAllSigners } from \"TODO\";\n * \n * const result = await getAllSigners();\n * \n * ```\n */\nexport async function getAllSigners(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xd42f2f35\",\n [],\n [\n {\n \"type\": \"tuple[]\",\n \"name\": \"signers\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n },\n {\n \"type\": \"address[]\",\n \"name\": \"approvedTargets\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"nativeTokenLimitPerTransaction\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"startTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"endTimestamp\"\n }\n ]\n }\n ]\n],\n params: []\n });\n};\n\n\n/**\n * Represents the parameters for the \"getMessageHash\" function.\n */\nexport type GetMessageHashParams = {\n hash: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"_hash\"}>\n};\n\n/**\n * Calls the \"getMessageHash\" function on the contract.\n * @param options - The options for the getMessageHash function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getMessageHash } from \"TODO\";\n * \n * const result = await getMessageHash({\n * hash: ...,\n * });\n * \n * ```\n */\nexport async function getMessageHash(\n options: BaseTransactionOptions<GetMessageHashParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x399b77da\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"_hash\"\n }\n ],\n [\n {\n \"type\": \"bytes32\"\n }\n ]\n],\n params: [options.hash]\n });\n};\n\n\n/**\n * Represents the parameters for the \"getPermissionsForSigner\" function.\n */\nexport type GetPermissionsForSignerParams = {\n signer: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"signer\"}>\n};\n\n/**\n * Calls the \"getPermissionsForSigner\" function on the contract.\n * @param options - The options for the getPermissionsForSigner function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getPermissionsForSigner } from \"TODO\";\n * \n * const result = await getPermissionsForSigner({\n * signer: ...,\n * });\n * \n * ```\n */\nexport async function getPermissionsForSigner(\n options: BaseTransactionOptions<GetPermissionsForSignerParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xf15d424e\",\n [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n }\n ],\n [\n {\n \"type\": \"tuple\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n },\n {\n \"type\": \"address[]\",\n \"name\": \"approvedTargets\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"nativeTokenLimitPerTransaction\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"startTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"endTimestamp\"\n }\n ]\n }\n ]\n],\n params: [options.signer]\n });\n};\n\n\n/**\n * Represents the parameters for the \"isActiveSigner\" function.\n */\nexport type IsActiveSignerParams = {\n signer: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"signer\"}>\n};\n\n/**\n * Calls the \"isActiveSigner\" function on the contract.\n * @param options - The options for the isActiveSigner function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { isActiveSigner } from \"TODO\";\n * \n * const result = await isActiveSigner({\n * signer: ...,\n * });\n * \n * ```\n */\nexport async function isActiveSigner(\n options: BaseTransactionOptions<IsActiveSignerParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x7dff5a79\",\n [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n }\n ],\n [\n {\n \"type\": \"bool\"\n }\n ]\n],\n params: [options.signer]\n });\n};\n\n\n/**\n * Represents the parameters for the \"isAdmin\" function.\n */\nexport type IsAdminParams = {\n account: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_account\"}>\n};\n\n/**\n * Calls the \"isAdmin\" function on the contract.\n * @param options - The options for the isAdmin function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { isAdmin } from \"TODO\";\n * \n * const result = await isAdmin({\n * account: ...,\n * });\n * \n * ```\n */\nexport async function isAdmin(\n options: BaseTransactionOptions<IsAdminParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x24d7806c\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_account\"\n }\n ],\n [\n {\n \"type\": \"bool\"\n }\n ]\n],\n params: [options.account]\n });\n};\n\n\n/**\n * Represents the parameters for the \"isValidSignature\" function.\n */\nexport type IsValidSignatureParams = {\n hash: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"_hash\"}>\nsignature: AbiParameterToPrimitiveType<{\"type\":\"bytes\",\"name\":\"_signature\"}>\n};\n\n/**\n * Calls the \"isValidSignature\" function on the contract.\n * @param options - The options for the isValidSignature function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { isValidSignature } from \"TODO\";\n * \n * const result = await isValidSignature({\n * hash: ...,\n * signature: ...,\n * });\n * \n * ```\n */\nexport async function isValidSignature(\n options: BaseTransactionOptions<IsValidSignatureParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x1626ba7e\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"_hash\"\n },\n {\n \"type\": \"bytes\",\n \"name\": \"_signature\"\n }\n ],\n [\n {\n \"type\": \"bytes4\",\n \"name\": \"magicValue\"\n }\n ]\n],\n params: [options.hash, options.signature]\n });\n};\n\n\n/**\n * Represents the parameters for the \"supportsInterface\" function.\n */\nexport type SupportsInterfaceParams = {\n interfaceId: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"interfaceId\"}>\n};\n\n/**\n * Calls the \"supportsInterface\" function on the contract.\n * @param options - The options for the supportsInterface function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { supportsInterface } from \"TODO\";\n * \n * const result = await supportsInterface({\n * interfaceId: ...,\n * });\n * \n * ```\n */\nexport async function supportsInterface(\n options: BaseTransactionOptions<SupportsInterfaceParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x01ffc9a7\",\n [\n {\n \"type\": \"bytes4\",\n \"name\": \"interfaceId\"\n }\n ],\n [\n {\n \"type\": \"bool\"\n }\n ]\n],\n params: [options.interfaceId]\n });\n};\n\n\n/**\n * Represents the parameters for the \"verifySignerPermissionRequest\" function.\n */\nexport type VerifySignerPermissionRequestParams = {\n req: AbiParameterToPrimitiveType<{\"type\":\"tuple\",\"name\":\"req\",\"components\":[{\"type\":\"address\",\"name\":\"signer\"},{\"type\":\"uint8\",\"name\":\"isAdmin\"},{\"type\":\"address[]\",\"name\":\"approvedTargets\"},{\"type\":\"uint256\",\"name\":\"nativeTokenLimitPerTransaction\"},{\"type\":\"uint128\",\"name\":\"permissionStartTimestamp\"},{\"type\":\"uint128\",\"name\":\"permissionEndTimestamp\"},{\"type\":\"uint128\",\"name\":\"reqValidityStartTimestamp\"},{\"type\":\"uint128\",\"name\":\"reqValidityEndTimestamp\"},{\"type\":\"bytes32\",\"name\":\"uid\"}]}>\nsignature: AbiParameterToPrimitiveType<{\"type\":\"bytes\",\"name\":\"signature\"}>\n};\n\n/**\n * Calls the \"verifySignerPermissionRequest\" function on the contract.\n * @param options - The options for the verifySignerPermissionRequest function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { verifySignerPermissionRequest } from \"TODO\";\n * \n * const result = await verifySignerPermissionRequest({\n * req: ...,\n * signature: ...,\n * });\n * \n * ```\n */\nexport async function verifySignerPermissionRequest(\n options: BaseTransactionOptions<VerifySignerPermissionRequestParams>\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xa9082d84\",\n [\n {\n \"type\": \"tuple\",\n \"name\": \"req\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n },\n {\n \"type\": \"uint8\",\n \"name\": \"isAdmin\"\n },\n {\n \"type\": \"address[]\",\n \"name\": \"approvedTargets\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"nativeTokenLimitPerTransaction\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"permissionStartTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"permissionEndTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"reqValidityStartTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"reqValidityEndTimestamp\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"uid\"\n }\n ]\n },\n {\n \"type\": \"bytes\",\n \"name\": \"signature\"\n }\n ],\n [\n {\n \"type\": \"bool\",\n \"name\": \"success\"\n },\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n }\n ]\n],\n params: [options.req, options.signature]\n });\n};\n\n\n\n\n/**\n * Calls the \"eip712Domain\" function on the contract.\n * @param options - The options for the eip712Domain function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { eip712Domain } from \"TODO\";\n * \n * const result = await eip712Domain();\n * \n * ```\n */\nexport async function eip712Domain(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x84b0196e\",\n [],\n [\n {\n \"type\": \"bytes1\",\n \"name\": \"fields\"\n },\n {\n \"type\": \"string\",\n \"name\": \"name\"\n },\n {\n \"type\": \"string\",\n \"name\": \"version\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"chainId\"\n },\n {\n \"type\": \"address\",\n \"name\": \"verifyingContract\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"salt\"\n },\n {\n \"type\": \"uint256[]\",\n \"name\": \"extensions\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"getEas\" function on the contract.\n * @param options - The options for the getEas function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { getEas } from \"TODO\";\n * \n * const result = await getEas();\n * \n * ```\n */\nexport async function getEas(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0xd5f5127d\",\n [],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: []\n });\n};\n\n\n\n\n/**\n * Calls the \"owner\" function on the contract.\n * @param options - The options for the owner function.\n * @returns The parsed result of the function call.\n * @example\n * ```\n * import { owner } from \"TODO\";\n * \n * const result = await owner();\n * \n * ```\n */\nexport async function owner(\n options: BaseTransactionOptions\n) {\n return readContract({\n contract: options.contract,\n method: [\n \"0x8da5cb5b\",\n [],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: []\n });\n};\n\n\n/**\n* Contract write functions\n*/\n\n/**\n * Represents the parameters for the \"_disableFunctionInExtension\" function.\n */\nexport type _disableFunctionInExtensionParams = {\n extensionName: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"_extensionName\"}>\nfunctionSelector: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"_functionSelector\"}>\n};\n\n/**\n * Calls the \"_disableFunctionInExtension\" function on the contract.\n * @param options - The options for the \"_disableFunctionInExtension\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { _disableFunctionInExtension } from \"TODO\";\n * \n * const transaction = _disableFunctionInExtension({\n * extensionName: ...,\n * functionSelector: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function _disableFunctionInExtension(\n options: BaseTransactionOptions<_disableFunctionInExtensionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x429eed80\",\n [\n {\n \"type\": \"string\",\n \"name\": \"_extensionName\"\n },\n {\n \"type\": \"bytes4\",\n \"name\": \"_functionSelector\"\n }\n ],\n []\n],\n params: [options.extensionName, options.functionSelector]\n });\n};\n\n\n/**\n * Represents the parameters for the \"addExtension\" function.\n */\nexport type AddExtensionParams = {\n extension: AbiParameterToPrimitiveType<{\"type\":\"tuple\",\"name\":\"_extension\",\"components\":[{\"type\":\"tuple\",\"name\":\"metadata\",\"components\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"metadataURI\"},{\"type\":\"address\",\"name\":\"implementation\"}]},{\"type\":\"tuple[]\",\"name\":\"functions\",\"components\":[{\"type\":\"bytes4\",\"name\":\"functionSelector\"},{\"type\":\"string\",\"name\":\"functionSignature\"}]}]}>\n};\n\n/**\n * Calls the \"addExtension\" function on the contract.\n * @param options - The options for the \"addExtension\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { addExtension } from \"TODO\";\n * \n * const transaction = addExtension({\n * extension: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function addExtension(\n options: BaseTransactionOptions<AddExtensionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xe05688fe\",\n [\n {\n \"type\": \"tuple\",\n \"name\": \"_extension\",\n \"components\": [\n {\n \"type\": \"tuple\",\n \"name\": \"metadata\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"name\"\n },\n {\n \"type\": \"string\",\n \"name\": \"metadataURI\"\n },\n {\n \"type\": \"address\",\n \"name\": \"implementation\"\n }\n ]\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"functions\",\n \"components\": [\n {\n \"type\": \"bytes4\",\n \"name\": \"functionSelector\"\n },\n {\n \"type\": \"string\",\n \"name\": \"functionSignature\"\n }\n ]\n }\n ]\n }\n ],\n []\n],\n params: [options.extension]\n });\n};\n\n\n/**\n * Represents the parameters for the \"createAccount\" function.\n */\nexport type CreateAccountParams = {\n admin: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_admin\"}>\ndata: AbiParameterToPrimitiveType<{\"type\":\"bytes\",\"name\":\"_data\"}>\n};\n\n/**\n * Calls the \"createAccount\" function on the contract.\n * @param options - The options for the \"createAccount\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { createAccount } from \"TODO\";\n * \n * const transaction = createAccount({\n * admin: ...,\n * data: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function createAccount(\n options: BaseTransactionOptions<CreateAccountParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xd8fd8f44\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_admin\"\n },\n {\n \"type\": \"bytes\",\n \"name\": \"_data\"\n }\n ],\n [\n {\n \"type\": \"address\"\n }\n ]\n],\n params: [options.admin, options.data]\n });\n};\n\n\n/**\n * Represents the parameters for the \"disableFunctionInExtension\" function.\n */\nexport type DisableFunctionInExtensionParams = {\n extensionName: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"_extensionName\"}>\nfunctionSelector: AbiParameterToPrimitiveType<{\"type\":\"bytes4\",\"name\":\"_functionSelector\"}>\n};\n\n/**\n * Calls the \"disableFunctionInExtension\" function on the contract.\n * @param options - The options for the \"disableFunctionInExtension\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { disableFunctionInExtension } from \"TODO\";\n * \n * const transaction = disableFunctionInExtension({\n * extensionName: ...,\n * functionSelector: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function disableFunctionInExtension(\n options: BaseTransactionOptions<DisableFunctionInExtensionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x512cf914\",\n [\n {\n \"type\": \"string\",\n \"name\": \"_extensionName\"\n },\n {\n \"type\": \"bytes4\",\n \"name\": \"_functionSelector\"\n }\n ],\n []\n],\n params: [options.extensionName, options.functionSelector]\n });\n};\n\n\n/**\n * Represents the parameters for the \"enableFunctionInExtension\" function.\n */\nexport type EnableFunctionInExtensionParams = {\n extensionName: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"_extensionName\"}>\nfunction: AbiParameterToPrimitiveType<{\"type\":\"tuple\",\"name\":\"_function\",\"components\":[{\"type\":\"bytes4\",\"name\":\"functionSelector\"},{\"type\":\"string\",\"name\":\"functionSignature\"}]}>\n};\n\n/**\n * Calls the \"enableFunctionInExtension\" function on the contract.\n * @param options - The options for the \"enableFunctionInExtension\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { enableFunctionInExtension } from \"TODO\";\n * \n * const transaction = enableFunctionInExtension({\n * extensionName: ...,\n * function: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function enableFunctionInExtension(\n options: BaseTransactionOptions<EnableFunctionInExtensionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x8856a113\",\n [\n {\n \"type\": \"string\",\n \"name\": \"_extensionName\"\n },\n {\n \"type\": \"tuple\",\n \"name\": \"_function\",\n \"components\": [\n {\n \"type\": \"bytes4\",\n \"name\": \"functionSelector\"\n },\n {\n \"type\": \"string\",\n \"name\": \"functionSignature\"\n }\n ]\n }\n ],\n []\n],\n params: [options.extensionName, options.function]\n });\n};\n\n\n/**\n * Represents the parameters for the \"grantRole\" function.\n */\nexport type GrantRoleParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\"}>\n};\n\n/**\n * Calls the \"grantRole\" function on the contract.\n * @param options - The options for the \"grantRole\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { grantRole } from \"TODO\";\n * \n * const transaction = grantRole({\n * role: ...,\n * account: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function grantRole(\n options: BaseTransactionOptions<GrantRoleParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x2f2ff15d\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n },\n {\n \"type\": \"address\",\n \"name\": \"account\"\n }\n ],\n []\n],\n params: [options.role, options.account]\n });\n};\n\n\n/**\n * Represents the parameters for the \"multicall\" function.\n */\nexport type MulticallParams = {\n data: AbiParameterToPrimitiveType<{\"type\":\"bytes[]\",\"name\":\"data\"}>\n};\n\n/**\n * Calls the \"multicall\" function on the contract.\n * @param options - The options for the \"multicall\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { multicall } from \"TODO\";\n * \n * const transaction = multicall({\n * data: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function multicall(\n options: BaseTransactionOptions<MulticallParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xac9650d8\",\n [\n {\n \"type\": \"bytes[]\",\n \"name\": \"data\"\n }\n ],\n [\n {\n \"type\": \"bytes[]\",\n \"name\": \"results\"\n }\n ]\n],\n params: [options.data]\n });\n};\n\n\n/**\n * Represents the parameters for the \"onRegister\" function.\n */\nexport type OnRegisterParams = {\n salt: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"_salt\"}>\n};\n\n/**\n * Calls the \"onRegister\" function on the contract.\n * @param options - The options for the \"onRegister\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { onRegister } from \"TODO\";\n * \n * const transaction = onRegister({\n * salt: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function onRegister(\n options: BaseTransactionOptions<OnRegisterParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x83a03f8c\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"_salt\"\n }\n ],\n []\n],\n params: [options.salt]\n });\n};\n\n\n/**\n * Represents the parameters for the \"onSignerAdded\" function.\n */\nexport type OnSignerAddedParams = {\n signer: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_signer\"}>\nsalt: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"_salt\"}>\n};\n\n/**\n * Calls the \"onSignerAdded\" function on the contract.\n * @param options - The options for the \"onSignerAdded\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { onSignerAdded } from \"TODO\";\n * \n * const transaction = onSignerAdded({\n * signer: ...,\n * salt: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function onSignerAdded(\n options: BaseTransactionOptions<OnSignerAddedParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x0b61e12b\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_signer\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"_salt\"\n }\n ],\n []\n],\n params: [options.signer, options.salt]\n });\n};\n\n\n/**\n * Represents the parameters for the \"onSignerRemoved\" function.\n */\nexport type OnSignerRemovedParams = {\n signer: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_signer\"}>\nsalt: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"_salt\"}>\n};\n\n/**\n * Calls the \"onSignerRemoved\" function on the contract.\n * @param options - The options for the \"onSignerRemoved\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { onSignerRemoved } from \"TODO\";\n * \n * const transaction = onSignerRemoved({\n * signer: ...,\n * salt: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function onSignerRemoved(\n options: BaseTransactionOptions<OnSignerRemovedParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x9387a380\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_signer\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"_salt\"\n }\n ],\n []\n],\n params: [options.signer, options.salt]\n });\n};\n\n\n/**\n * Represents the parameters for the \"removeExtension\" function.\n */\nexport type RemoveExtensionParams = {\n extensionName: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"_extensionName\"}>\n};\n\n/**\n * Calls the \"removeExtension\" function on the contract.\n * @param options - The options for the \"removeExtension\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { removeExtension } from \"TODO\";\n * \n * const transaction = removeExtension({\n * extensionName: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function removeExtension(\n options: BaseTransactionOptions<RemoveExtensionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xee7d2adf\",\n [\n {\n \"type\": \"string\",\n \"name\": \"_extensionName\"\n }\n ],\n []\n],\n params: [options.extensionName]\n });\n};\n\n\n/**\n * Represents the parameters for the \"renounceRole\" function.\n */\nexport type RenounceRoleParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\"}>\n};\n\n/**\n * Calls the \"renounceRole\" function on the contract.\n * @param options - The options for the \"renounceRole\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { renounceRole } from \"TODO\";\n * \n * const transaction = renounceRole({\n * role: ...,\n * account: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function renounceRole(\n options: BaseTransactionOptions<RenounceRoleParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x36568abe\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n },\n {\n \"type\": \"address\",\n \"name\": \"account\"\n }\n ],\n []\n],\n params: [options.role, options.account]\n });\n};\n\n\n/**\n * Represents the parameters for the \"replaceExtension\" function.\n */\nexport type ReplaceExtensionParams = {\n extension: AbiParameterToPrimitiveType<{\"type\":\"tuple\",\"name\":\"_extension\",\"components\":[{\"type\":\"tuple\",\"name\":\"metadata\",\"components\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"metadataURI\"},{\"type\":\"address\",\"name\":\"implementation\"}]},{\"type\":\"tuple[]\",\"name\":\"functions\",\"components\":[{\"type\":\"bytes4\",\"name\":\"functionSelector\"},{\"type\":\"string\",\"name\":\"functionSignature\"}]}]}>\n};\n\n/**\n * Calls the \"replaceExtension\" function on the contract.\n * @param options - The options for the \"replaceExtension\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { replaceExtension } from \"TODO\";\n * \n * const transaction = replaceExtension({\n * extension: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function replaceExtension(\n options: BaseTransactionOptions<ReplaceExtensionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xc0562f6d\",\n [\n {\n \"type\": \"tuple\",\n \"name\": \"_extension\",\n \"components\": [\n {\n \"type\": \"tuple\",\n \"name\": \"metadata\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"name\"\n },\n {\n \"type\": \"string\",\n \"name\": \"metadataURI\"\n },\n {\n \"type\": \"address\",\n \"name\": \"implementation\"\n }\n ]\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"functions\",\n \"components\": [\n {\n \"type\": \"bytes4\",\n \"name\": \"functionSelector\"\n },\n {\n \"type\": \"string\",\n \"name\": \"functionSignature\"\n }\n ]\n }\n ]\n }\n ],\n []\n],\n params: [options.extension]\n });\n};\n\n\n/**\n * Represents the parameters for the \"revokeRole\" function.\n */\nexport type RevokeRoleParams = {\n role: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"role\"}>\naccount: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"account\"}>\n};\n\n/**\n * Calls the \"revokeRole\" function on the contract.\n * @param options - The options for the \"revokeRole\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { revokeRole } from \"TODO\";\n * \n * const transaction = revokeRole({\n * role: ...,\n * account: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function revokeRole(\n options: BaseTransactionOptions<RevokeRoleParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xd547741f\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"role\"\n },\n {\n \"type\": \"address\",\n \"name\": \"account\"\n }\n ],\n []\n],\n params: [options.role, options.account]\n });\n};\n\n\n/**\n * Represents the parameters for the \"setContractURI\" function.\n */\nexport type SetContractURIParams = {\n uri: AbiParameterToPrimitiveType<{\"type\":\"string\",\"name\":\"_uri\"}>\n};\n\n/**\n * Calls the \"setContractURI\" function on the contract.\n * @param options - The options for the \"setContractURI\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { setContractURI } from \"TODO\";\n * \n * const transaction = setContractURI({\n * uri: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function setContractURI(\n options: BaseTransactionOptions<SetContractURIParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x938e3d7b\",\n [\n {\n \"type\": \"string\",\n \"name\": \"_uri\"\n }\n ],\n []\n],\n params: [options.uri]\n });\n};\n\n\n\n\n/**\n * Calls the \"addDeposit\" function on the contract.\n * @param options - The options for the \"addDeposit\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { addDeposit } from \"TODO\";\n * \n * const transaction = addDeposit();\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function addDeposit(\n options: BaseTransactionOptions\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x4a58db19\",\n [],\n []\n],\n params: []\n });\n};\n\n\n/**\n * Represents the parameters for the \"execute\" function.\n */\nexport type ExecuteParams = {\n target: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_target\"}>\nvalue: AbiParameterToPrimitiveType<{\"type\":\"uint256\",\"name\":\"_value\"}>\ncalldata: AbiParameterToPrimitiveType<{\"type\":\"bytes\",\"name\":\"_calldata\"}>\n};\n\n/**\n * Calls the \"execute\" function on the contract.\n * @param options - The options for the \"execute\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { execute } from \"TODO\";\n * \n * const transaction = execute({\n * target: ...,\n * value: ...,\n * calldata: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function execute(\n options: BaseTransactionOptions<ExecuteParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xb61d27f6\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_target\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"_value\"\n },\n {\n \"type\": \"bytes\",\n \"name\": \"_calldata\"\n }\n ],\n []\n],\n params: [options.target, options.value, options.calldata]\n });\n};\n\n\n/**\n * Represents the parameters for the \"executeBatch\" function.\n */\nexport type ExecuteBatchParams = {\n target: AbiParameterToPrimitiveType<{\"type\":\"address[]\",\"name\":\"_target\"}>\nvalue: AbiParameterToPrimitiveType<{\"type\":\"uint256[]\",\"name\":\"_value\"}>\ncalldata: AbiParameterToPrimitiveType<{\"type\":\"bytes[]\",\"name\":\"_calldata\"}>\n};\n\n/**\n * Calls the \"executeBatch\" function on the contract.\n * @param options - The options for the \"executeBatch\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { executeBatch } from \"TODO\";\n * \n * const transaction = executeBatch({\n * target: ...,\n * value: ...,\n * calldata: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function executeBatch(\n options: BaseTransactionOptions<ExecuteBatchParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x47e1da2a\",\n [\n {\n \"type\": \"address[]\",\n \"name\": \"_target\"\n },\n {\n \"type\": \"uint256[]\",\n \"name\": \"_value\"\n },\n {\n \"type\": \"bytes[]\",\n \"name\": \"_calldata\"\n }\n ],\n []\n],\n params: [options.target, options.value, options.calldata]\n });\n};\n\n\n/**\n * Represents the parameters for the \"onERC1155BatchReceived\" function.\n */\nexport type OnERC1155BatchReceivedParams = {\n arg_0: AbiParameterToPrimitiveType<{\"type\":\"address\"}>\narg_1: AbiParameterToPrimitiveType<{\"type\":\"address\"}>\narg_2: AbiParameterToPrimitiveType<{\"type\":\"uint256[]\"}>\narg_3: AbiParameterToPrimitiveType<{\"type\":\"uint256[]\"}>\narg_4: AbiParameterToPrimitiveType<{\"type\":\"bytes\"}>\n};\n\n/**\n * Calls the \"onERC1155BatchReceived\" function on the contract.\n * @param options - The options for the \"onERC1155BatchReceived\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { onERC1155BatchReceived } from \"TODO\";\n * \n * const transaction = onERC1155BatchReceived({\n * arg_0: ...,\n * arg_1: ...,\n * arg_2: ...,\n * arg_3: ...,\n * arg_4: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function onERC1155BatchReceived(\n options: BaseTransactionOptions<OnERC1155BatchReceivedParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xbc197c81\",\n [\n {\n \"type\": \"address\"\n },\n {\n \"type\": \"address\"\n },\n {\n \"type\": \"uint256[]\"\n },\n {\n \"type\": \"uint256[]\"\n },\n {\n \"type\": \"bytes\"\n }\n ],\n [\n {\n \"type\": \"bytes4\"\n }\n ]\n],\n params: [options.arg_0, options.arg_1, options.arg_2, options.arg_3, options.arg_4]\n });\n};\n\n\n/**\n * Represents the parameters for the \"onERC1155Received\" function.\n */\nexport type OnERC1155ReceivedParams = {\n arg_0: AbiParameterToPrimitiveType<{\"type\":\"address\"}>\narg_1: AbiParameterToPrimitiveType<{\"type\":\"address\"}>\narg_2: AbiParameterToPrimitiveType<{\"type\":\"uint256\"}>\narg_3: AbiParameterToPrimitiveType<{\"type\":\"uint256\"}>\narg_4: AbiParameterToPrimitiveType<{\"type\":\"bytes\"}>\n};\n\n/**\n * Calls the \"onERC1155Received\" function on the contract.\n * @param options - The options for the \"onERC1155Received\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { onERC1155Received } from \"TODO\";\n * \n * const transaction = onERC1155Received({\n * arg_0: ...,\n * arg_1: ...,\n * arg_2: ...,\n * arg_3: ...,\n * arg_4: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function onERC1155Received(\n options: BaseTransactionOptions<OnERC1155ReceivedParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xf23a6e61\",\n [\n {\n \"type\": \"address\"\n },\n {\n \"type\": \"address\"\n },\n {\n \"type\": \"uint256\"\n },\n {\n \"type\": \"uint256\"\n },\n {\n \"type\": \"bytes\"\n }\n ],\n [\n {\n \"type\": \"bytes4\"\n }\n ]\n],\n params: [options.arg_0, options.arg_1, options.arg_2, options.arg_3, options.arg_4]\n });\n};\n\n\n/**\n * Represents the parameters for the \"onERC721Received\" function.\n */\nexport type OnERC721ReceivedParams = {\n arg_0: AbiParameterToPrimitiveType<{\"type\":\"address\"}>\narg_1: AbiParameterToPrimitiveType<{\"type\":\"address\"}>\narg_2: AbiParameterToPrimitiveType<{\"type\":\"uint256\"}>\narg_3: AbiParameterToPrimitiveType<{\"type\":\"bytes\"}>\n};\n\n/**\n * Calls the \"onERC721Received\" function on the contract.\n * @param options - The options for the \"onERC721Received\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { onERC721Received } from \"TODO\";\n * \n * const transaction = onERC721Received({\n * arg_0: ...,\n * arg_1: ...,\n * arg_2: ...,\n * arg_3: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function onERC721Received(\n options: BaseTransactionOptions<OnERC721ReceivedParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x150b7a02\",\n [\n {\n \"type\": \"address\"\n },\n {\n \"type\": \"address\"\n },\n {\n \"type\": \"uint256\"\n },\n {\n \"type\": \"bytes\"\n }\n ],\n [\n {\n \"type\": \"bytes4\"\n }\n ]\n],\n params: [options.arg_0, options.arg_1, options.arg_2, options.arg_3]\n });\n};\n\n\n/**\n * Represents the parameters for the \"setPermissionsForSigner\" function.\n */\nexport type SetPermissionsForSignerParams = {\n req: AbiParameterToPrimitiveType<{\"type\":\"tuple\",\"name\":\"_req\",\"components\":[{\"type\":\"address\",\"name\":\"signer\"},{\"type\":\"uint8\",\"name\":\"isAdmin\"},{\"type\":\"address[]\",\"name\":\"approvedTargets\"},{\"type\":\"uint256\",\"name\":\"nativeTokenLimitPerTransaction\"},{\"type\":\"uint128\",\"name\":\"permissionStartTimestamp\"},{\"type\":\"uint128\",\"name\":\"permissionEndTimestamp\"},{\"type\":\"uint128\",\"name\":\"reqValidityStartTimestamp\"},{\"type\":\"uint128\",\"name\":\"reqValidityEndTimestamp\"},{\"type\":\"bytes32\",\"name\":\"uid\"}]}>\nsignature: AbiParameterToPrimitiveType<{\"type\":\"bytes\",\"name\":\"_signature\"}>\n};\n\n/**\n * Calls the \"setPermissionsForSigner\" function on the contract.\n * @param options - The options for the \"setPermissionsForSigner\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { setPermissionsForSigner } from \"TODO\";\n * \n * const transaction = setPermissionsForSigner({\n * req: ...,\n * signature: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function setPermissionsForSigner(\n options: BaseTransactionOptions<SetPermissionsForSignerParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x5892e236\",\n [\n {\n \"type\": \"tuple\",\n \"name\": \"_req\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"signer\"\n },\n {\n \"type\": \"uint8\",\n \"name\": \"isAdmin\"\n },\n {\n \"type\": \"address[]\",\n \"name\": \"approvedTargets\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"nativeTokenLimitPerTransaction\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"permissionStartTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"permissionEndTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"reqValidityStartTimestamp\"\n },\n {\n \"type\": \"uint128\",\n \"name\": \"reqValidityEndTimestamp\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"uid\"\n }\n ]\n },\n {\n \"type\": \"bytes\",\n \"name\": \"_signature\"\n }\n ],\n []\n],\n params: [options.req, options.signature]\n });\n};\n\n\n/**\n * Represents the parameters for the \"withdrawDepositTo\" function.\n */\nexport type WithdrawDepositToParams = {\n withdrawAddress: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"withdrawAddress\"}>\namount: AbiParameterToPrimitiveType<{\"type\":\"uint256\",\"name\":\"amount\"}>\n};\n\n/**\n * Calls the \"withdrawDepositTo\" function on the contract.\n * @param options - The options for the \"withdrawDepositTo\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { withdrawDepositTo } from \"TODO\";\n * \n * const transaction = withdrawDepositTo({\n * withdrawAddress: ...,\n * amount: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function withdrawDepositTo(\n options: BaseTransactionOptions<WithdrawDepositToParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x4d44560d\",\n [\n {\n \"type\": \"address\",\n \"name\": \"withdrawAddress\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"amount\"\n }\n ],\n []\n],\n params: [options.withdrawAddress, options.amount]\n });\n};\n\n\n/**\n * Represents the parameters for the \"createSeed\" function.\n */\nexport type CreateSeedParams = {\n schemaUid: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"schemaUid\"}>\nrevocable: AbiParameterToPrimitiveType<{\"type\":\"bool\",\"name\":\"revocable\"}>\n};\n\n/**\n * Calls the \"createSeed\" function on the contract.\n * @param options - The options for the \"createSeed\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { createSeed } from \"TODO\";\n * \n * const transaction = createSeed({\n * schemaUid: ...,\n * revocable: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function createSeed(\n options: BaseTransactionOptions<CreateSeedParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x6240d6d9\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"schemaUid\"\n },\n {\n \"type\": \"bool\",\n \"name\": \"revocable\"\n }\n ],\n [\n {\n \"type\": \"bytes32\"\n }\n ]\n],\n params: [options.schemaUid, options.revocable]\n });\n};\n\n\n/**\n * Represents the parameters for the \"createVersion\" function.\n */\nexport type CreateVersionParams = {\n seedUid: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"seedUid\"}>\nversionSchemaUid: AbiParameterToPrimitiveType<{\"type\":\"bytes32\",\"name\":\"versionSchemaUid\"}>\n};\n\n/**\n * Calls the \"createVersion\" function on the contract.\n * @param options - The options for the \"createVersion\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { createVersion } from \"TODO\";\n * \n * const transaction = createVersion({\n * seedUid: ...,\n * versionSchemaUid: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function createVersion(\n options: BaseTransactionOptions<CreateVersionParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x13e0c263\",\n [\n {\n \"type\": \"bytes32\",\n \"name\": \"seedUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"versionSchemaUid\"\n }\n ],\n [\n {\n \"type\": \"bytes32\"\n }\n ]\n],\n params: [options.seedUid, options.versionSchemaUid]\n });\n};\n\n\n/**\n * Represents the parameters for the \"initialize\" function.\n */\nexport type InitializeParams = {\n eas: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_eas\"}>\n};\n\n/**\n * Calls the \"initialize\" function on the contract.\n * @param options - The options for the \"initialize\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { initialize } from \"TODO\";\n * \n * const transaction = initialize({\n * eas: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function initialize(\n options: BaseTransactionOptions<InitializeParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xc4d66de8\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_eas\"\n }\n ],\n []\n],\n params: [options.eas]\n });\n};\n\n\n/**\n * Represents the parameters for the \"multiPublish\" function.\n */\nexport type MultiPublishParams = {\n requests: AbiParameterToPrimitiveType<{\"type\":\"tuple[]\",\"name\":\"requests\",\"components\":[{\"type\":\"string\",\"name\":\"localId\"},{\"type\":\"bytes32\",\"name\":\"seedUid\"},{\"type\":\"bytes32\",\"name\":\"seedSchemaUid\"},{\"type\":\"bytes32\",\"name\":\"versionUid\"},{\"type\":\"bytes32\",\"name\":\"versionSchemaUid\"},{\"type\":\"bool\",\"name\":\"seedIsRevocable\"},{\"type\":\"tuple[]\",\"name\":\"listOfAttestations\",\"components\":[{\"type\":\"bytes32\",\"name\":\"schema\"},{\"type\":\"tuple[]\",\"name\":\"data\",\"components\":[{\"type\":\"address\",\"name\":\"recipient\"},{\"type\":\"uint64\",\"name\":\"expirationTime\"},{\"type\":\"bool\",\"name\":\"revocable\"},{\"type\":\"bytes32\",\"name\":\"refUID\"},{\"type\":\"bytes\",\"name\":\"data\"},{\"type\":\"uint256\",\"name\":\"value\"}]}]},{\"type\":\"tuple[]\",\"name\":\"propertiesToUpdate\",\"components\":[{\"type\":\"string\",\"name\":\"publishLocalId\"},{\"type\":\"bytes32\",\"name\":\"propertySchemaUid\"}]}]}>\n};\n\n/**\n * Calls the \"multiPublish\" function on the contract.\n * @param options - The options for the \"multiPublish\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { multiPublish } from \"TODO\";\n * \n * const transaction = multiPublish({\n * requests: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function multiPublish(\n options: BaseTransactionOptions<MultiPublishParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x31e19cb8\",\n [\n {\n \"type\": \"tuple[]\",\n \"name\": \"requests\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"localId\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"seedUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"seedSchemaUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"versionUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"versionSchemaUid\"\n },\n {\n \"type\": \"bool\",\n \"name\": \"seedIsRevocable\"\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"listOfAttestations\",\n \"components\": [\n {\n \"type\": \"bytes32\",\n \"name\": \"schema\"\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"data\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"recipient\"\n },\n {\n \"type\": \"uint64\",\n \"name\": \"expirationTime\"\n },\n {\n \"type\": \"bool\",\n \"name\": \"revocable\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"refUID\"\n },\n {\n \"type\": \"bytes\",\n \"name\": \"data\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"value\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"propertiesToUpdate\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"publishLocalId\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"propertySchemaUid\"\n }\n ]\n }\n ]\n }\n ],\n [\n {\n \"type\": \"bytes32[]\"\n }\n ]\n],\n params: [options.requests]\n });\n};\n\n\n/**\n * Represents the parameters for the \"publish\" function.\n */\nexport type PublishParams = {\n request: AbiParameterToPrimitiveType<{\"type\":\"tuple\",\"name\":\"request\",\"components\":[{\"type\":\"string\",\"name\":\"localId\"},{\"type\":\"bytes32\",\"name\":\"seedUid\"},{\"type\":\"bytes32\",\"name\":\"seedSchemaUid\"},{\"type\":\"bytes32\",\"name\":\"versionUid\"},{\"type\":\"bytes32\",\"name\":\"versionSchemaUid\"},{\"type\":\"bool\",\"name\":\"seedIsRevocable\"},{\"type\":\"tuple[]\",\"name\":\"listOfAttestations\",\"components\":[{\"type\":\"bytes32\",\"name\":\"schema\"},{\"type\":\"tuple[]\",\"name\":\"data\",\"components\":[{\"type\":\"address\",\"name\":\"recipient\"},{\"type\":\"uint64\",\"name\":\"expirationTime\"},{\"type\":\"bool\",\"name\":\"revocable\"},{\"type\":\"bytes32\",\"name\":\"refUID\"},{\"type\":\"bytes\",\"name\":\"data\"},{\"type\":\"uint256\",\"name\":\"value\"}]}]},{\"type\":\"tuple[]\",\"name\":\"propertiesToUpdate\",\"components\":[{\"type\":\"string\",\"name\":\"publishLocalId\"},{\"type\":\"bytes32\",\"name\":\"propertySchemaUid\"}]}]}>\n};\n\n/**\n * Calls the \"publish\" function on the contract.\n * @param options - The options for the \"publish\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { publish } from \"TODO\";\n * \n * const transaction = publish({\n * request: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function publish(\n options: BaseTransactionOptions<PublishParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xb71308c5\",\n [\n {\n \"type\": \"tuple\",\n \"name\": \"request\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"localId\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"seedUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"seedSchemaUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"versionUid\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"versionSchemaUid\"\n },\n {\n \"type\": \"bool\",\n \"name\": \"seedIsRevocable\"\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"listOfAttestations\",\n \"components\": [\n {\n \"type\": \"bytes32\",\n \"name\": \"schema\"\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"data\",\n \"components\": [\n {\n \"type\": \"address\",\n \"name\": \"recipient\"\n },\n {\n \"type\": \"uint64\",\n \"name\": \"expirationTime\"\n },\n {\n \"type\": \"bool\",\n \"name\": \"revocable\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"refUID\"\n },\n {\n \"type\": \"bytes\",\n \"name\": \"data\"\n },\n {\n \"type\": \"uint256\",\n \"name\": \"value\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"tuple[]\",\n \"name\": \"propertiesToUpdate\",\n \"components\": [\n {\n \"type\": \"string\",\n \"name\": \"publishLocalId\"\n },\n {\n \"type\": \"bytes32\",\n \"name\": \"propertySchemaUid\"\n }\n ]\n }\n ]\n }\n ],\n [\n {\n \"type\": \"bytes32\"\n },\n {\n \"type\": \"bytes32\"\n }\n ]\n],\n params: [options.request]\n });\n};\n\n\n\n\n/**\n * Calls the \"renounceOwnership\" function on the contract.\n * @param options - The options for the \"renounceOwnership\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { renounceOwnership } from \"TODO\";\n * \n * const transaction = renounceOwnership();\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function renounceOwnership(\n options: BaseTransactionOptions\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0x715018a6\",\n [],\n []\n],\n params: []\n });\n};\n\n\n/**\n * Represents the parameters for the \"setEas\" function.\n */\nexport type SetEasParams = {\n eas: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"_eas\"}>\n};\n\n/**\n * Calls the \"setEas\" function on the contract.\n * @param options - The options for the \"setEas\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { setEas } from \"TODO\";\n * \n * const transaction = setEas({\n * eas: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function setEas(\n options: BaseTransactionOptions<SetEasParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xb90b6e0d\",\n [\n {\n \"type\": \"address\",\n \"name\": \"_eas\"\n }\n ],\n [\n {\n \"type\": \"string\"\n }\n ]\n],\n params: [options.eas]\n });\n};\n\n\n/**\n * Represents the parameters for the \"transferOwnership\" function.\n */\nexport type TransferOwnershipParams = {\n newOwner: AbiParameterToPrimitiveType<{\"type\":\"address\",\"name\":\"newOwner\"}>\n};\n\n/**\n * Calls the \"transferOwnership\" function on the contract.\n * @param options - The options for the \"transferOwnership\" function.\n * @returns A prepared transaction object.\n * @example\n * ```\n * import { transferOwnership } from \"TODO\";\n * \n * const transaction = transferOwnership({\n * newOwner: ...,\n * });\n * \n * // Send the transaction\n * ...\n * \n * ```\n */\nexport function transferOwnership(\n options: BaseTransactionOptions<TransferOwnershipParams>\n) {\n return prepareContractCall({\n contract: options.contract,\n method: [\n \"0xf2fde38b\",\n [\n {\n \"type\": \"address\",\n \"name\": \"newOwner\"\n }\n ],\n []\n],\n params: [options.newOwner]\n });\n};\n\n\n","import { createThirdwebClient, deploySmartAccount, getContract, sendTransaction, } from 'thirdweb'\nimport { createWallet, Account, inAppWallet, type Wallet, } from 'thirdweb/wallets'\nimport { useActiveAccount } from 'thirdweb/react'\nimport { ThirdwebContract, } from 'thirdweb/contract'\nimport { isContractDeployed } from 'thirdweb/utils'\nimport { useEffect, useRef, useState, } from 'react'\nimport type { Chain } from 'thirdweb/chains'\nimport { optimismSepolia, } from 'thirdweb/chains'\nimport {\n getAddress as getFactoryAddress,\n} from './thirdweb/11155420/0x76f47d88bfaf670f5208911181fcdc0e160cb16d'\nimport { createAccount as createManagedAccountOnFactory } from './thirdweb/11155420/0x76f47d88bfaf670f5208911181fcdc0e160cb16d'\nimport debug from 'debug'\nimport { getPublishConfig } from '../config'\nimport { THIRDWEB_ACCOUNT_FACTORY_ADDRESS } from './constants'\n\nconst logger = debug('permaPress:helpers:thirdweb')\n\n/**\n * Custom storage for publish in-app wallets: same prefix for modular (EIP-7702) and managed (EIP-4337).\n * Uses `localStorage` so embedded-wallet session material survives app/tab restarts.\n */\nconst SEED_IN_APP_SESSION_PREFIX = 'seedProtocol:inAppPublish:'\n\nlet _publishInAppWalletStorage: {\n getItem: (key: string) => Promise<string | null>\n setItem: (key: string, value: string) => Promise<void>\n removeItem: (key: string) => Promise<void>\n} | null = null\n\nexport function getSharedPublishInAppWalletStorage() {\n if (!_publishInAppWalletStorage) {\n _publishInAppWalletStorage = {\n getItem: async (key) => {\n if (typeof window === 'undefined') return null\n return localStorage.getItem(SEED_IN_APP_SESSION_PREFIX + key)\n },\n setItem: async (key, value) => {\n if (typeof window === 'undefined') return\n localStorage.setItem(SEED_IN_APP_SESSION_PREFIX + key, value)\n },\n removeItem: async (key) => {\n if (typeof window === 'undefined') return\n localStorage.removeItem(SEED_IN_APP_SESSION_PREFIX + key)\n },\n }\n }\n return _publishInAppWalletStorage\n}\n\nlet _client: ReturnType<typeof createThirdwebClient> | null = null\n\nexport function getClient() {\n if (!_client) {\n const { thirdwebClientId } = getPublishConfig()\n _client = createThirdwebClient({ clientId: thirdwebClientId })\n }\n return _client\n}\n\nexport const wallets = [\n // embeddedWallet(),\n createWallet('io.metamask',),\n // createWallet(\"com.coinbase.wallet\"),\n // createWallet(\"me.rainbow\"),\n]\n\nexport const useLocalWalletAccount = () => {\n\n const [ localWalletAccount, setLocalWalletAccount, ] = useState<Account | null>(null,)\n const personalWallet = createWallet('io.metamask',)\n\n const isConnecting = useRef(false)\n\n useEffect(() => {\n const _getAccount = async (): Promise<void> => {\n // if ( isConnecting.current ) {\n // return\n // }\n // isConnecting.current = true\n\n // const personalAccount = await personalWallet.connect({ client, },)\n // if ( !personalAccount ) {\n // throw new Error('Failed to connect to personal account',)\n // }\n\n // setLocalWalletAccount(personalAccount,)\n // isConnecting.current = false\n }\n\n _getAccount()\n\n }, [],)\n\n return localWalletAccount\n\n}\n\nexport const useActiveSmartWalletContract = () => {\n const account = useActiveAccount()\n\n const [ contract, setContract, ] = useState<ThirdwebContract | null>(null,)\n\n useEffect(() => {\n if ( !account || !account.address ) {\n return\n }\n\n setContract(getContract({\n client: getClient(),\n chain : optimismSepolia,\n address : account.address,\n },),)\n\n }, [ account, ],)\n\n return contract\n}\n\nexport const getManagedAccountFactoryContract = () => {\n const { thirdwebAccountFactoryAddress } = getPublishConfig()\n const contract = getContract({\n client: getClient(),\n chain : optimismSepolia,\n address : thirdwebAccountFactoryAddress,\n },)\n\n return contract\n}\n\n/**\n * Returns the deterministic smart wallet address for an admin signer and optional data.\n */\nexport async function getSmartWalletAddressForAdmin (\n adminAddress: string,\n data: string = '0x',\n): Promise<string> {\n const factory = getManagedAccountFactoryContract()\n return getFactoryAddress({\n contract : factory,\n adminSigner : adminAddress,\n data : data as `0x${string}`,\n },) as Promise<string>\n}\n\n/**\n * Returns true if the given address has contract bytecode deployed (e.g. a ManagedAccount).\n */\nexport async function isSmartWalletDeployed ( smartWalletAddress: string, ): Promise<boolean> {\n const contract = getContract({\n client: getClient(),\n chain : optimismSepolia,\n address : smartWalletAddress,\n },)\n return isContractDeployed(contract,)\n}\n\nconst DEFAULT_DEPLOY_POLL_ATTEMPTS = 5\nconst DEFAULT_DEPLOY_POLL_INTERVAL_MS = 6_000\n\n/** Polls chain bytecode until the smart account is deployed or attempts are exhausted. */\nexport async function pollSmartWalletDeployed(\n smartWalletAddress: string,\n attempts: number = DEFAULT_DEPLOY_POLL_ATTEMPTS,\n intervalMs: number = DEFAULT_DEPLOY_POLL_INTERVAL_MS,\n): Promise<boolean> {\n for (let i = 0; i < attempts; i++) {\n if (await isSmartWalletDeployed(smartWalletAddress)) {\n return true\n }\n if (i < attempts - 1) {\n await new Promise<void>((resolve) => {\n setTimeout(resolve, intervalMs)\n })\n }\n }\n return false\n}\n\n/**\n * Resolves the smart wallet address and account to use for publish.\n * If the user has no connected account or no deployed ManagedAccount, returns needsDeploy.\n *\n * When using EIP4337 (in-app wallet with account abstraction), account.address is already\n * the smart wallet address. We detect that case and use it directly instead of deriving\n * via getSmartWalletAddressForAdmin (which assumes account.address is the EOA admin).\n */\nexport async function resolveSmartWalletForPublish (\n account: Account | null,\n): Promise<{ address: string; account: Account } | { needsDeploy: true }> {\n if ( !account ) {\n return { needsDeploy: true }\n }\n // If account.address is already a deployed smart wallet (e.g. from EIP4337), use it directly\n const accountIsDeployedSmartWallet = await isSmartWalletDeployed(account.address,)\n if ( accountIsDeployedSmartWallet ) {\n return { address: account.address, account }\n }\n // Otherwise derive smart wallet from EOA admin (e.g. MetaMask)\n const smartWalletAddress = await getSmartWalletAddressForAdmin(account.address,)\n const deployed = await isSmartWalletDeployed(smartWalletAddress,)\n if ( deployed ) {\n return { address: smartWalletAddress, account }\n }\n return { needsDeploy: true }\n}\n\n/** External wallets (MetaMask, Rainbow) for the deploy flow only; no account abstraction. */\nexport const ExternalWalletsForDeploy = [\n createWallet('io.metamask',),\n createWallet('me.rainbow',),\n]\n\nexport const deploySmartWalletContract = async ( localAccount: Account, ) => {\n const accountContract = getContract({\n client: getClient(),\n chain : optimismSepolia,\n address : localAccount.address,\n },)\n const result = await deploySmartAccount({\n smartAccount : localAccount,\n chain : optimismSepolia,\n client : getClient(),\n accountContract,\n },)\n logger('deploySmartAccount result:', result,)\n return result\n}\n\n/**\n * Deploys a ManagedAccount by calling the Thirdweb factory `createAccount`.\n * Prefer the modular EIP-7702 in-app wallet as `signingAccount` (sponsorGas); it is more reliable\n * than `deploySmartAccount` on the counterfactual EIP-4337 managed wallet (UserOp factory deploy).\n */\nexport async function deployManagedAccountViaFactory(params: {\n adminAddress: string\n signingAccount: Account\n data?: `0x${string}`\n}): Promise<void> {\n const factory = getManagedAccountFactoryContract()\n const tx = createManagedAccountOnFactory({\n contract: factory,\n admin: params.adminAddress as `0x${string}`,\n data: (params.data ?? '0x') as `0x${string}`,\n })\n await sendTransaction({\n account: params.signingAccount,\n transaction: tx,\n })\n}\n\nexport const appMetadata = {\n name: \"Seed Protocol\",\n description: \"Seed Protocol\",\n url: \"https://seedprotocol.io\",\n}\n\n/**\n * Connects the managed account wallet (EIP4337 in-app wallet) and returns its address.\n * Use this when you need the connected managed account address for publish flows.\n *\n * @param chain - The chain to connect to (defaults to optimismSepolia)\n * @returns The connected managed account's address\n * @throws Error if the managed account cannot be connected or retrieved\n */\nexport async function getConnectedManagedAccountAddress(\n chain: Chain = optimismSepolia\n): Promise<string> {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({ client: getClient(), chain })\n const managedAccount = managedAccountWallet.getAccount()\n if (!managedAccount) {\n throw new Error('Failed to get managed account')\n }\n return managedAccount.address\n}\n\n/**\n * Returns the connected account for transaction signing (e.g. revoke).\n * Uses the modular account wallet. Returns null if not connected.\n */\nexport async function getConnectedAccount(): Promise<Account | null> {\n try {\n const wallet = getModularAccountWallet()\n await wallet.autoConnect({ client: getClient(), chain: optimismSepolia })\n const account = wallet.getAccount()\n return account ?? null\n } catch {\n return null\n }\n}\n\n/**\n * Same as {@link getConnectedAccount}: the in-app modular wallet (EIP-7702) on Optimism Sepolia.\n * Prefer this name at modular publish entry points for clarity.\n */\nexport async function getConnectedModularAccount(): Promise<Account | null> {\n return getConnectedAccount()\n}\n\n/** Single instance so Thirdweb session, Connect UI, and `autoConnect` share one wallet object. */\nlet _managedInAppWallet: Wallet | null = null\n\nexport const getManagedAccountWallet = () => {\n if (!_managedInAppWallet) {\n _managedInAppWallet = inAppWallet({\n storage: getSharedPublishInAppWalletStorage(),\n auth: {\n options: [\n \"farcaster\",\n \"email\",\n \"passkey\",\n \"phone\",\n ],\n },\n executionMode: {\n mode: 'EIP4337',\n smartAccount: {\n chain: optimismSepolia,\n factoryAddress: THIRDWEB_ACCOUNT_FACTORY_ADDRESS,\n gasless: true,\n },\n },\n // executionMode: {\n // mode: 'EIP4337',\n // smartAccount: {\n // chain: optimismSepolia,\n // factoryAddress: thirdwebAccountFactoryAddress,\n // gasless: true,\n // overrides: {\n // // Custom paymaster that passes through but lets you modify the UserOp\n // paymaster: async (userOp) => {\n\n // const hexifyBigInts: any = (obj: any) => {\n // if (typeof obj === \"bigint\") return `0x${obj.toString(16)}`;\n // if (Array.isArray(obj)) return obj.map(hexifyBigInts);\n // if (obj && typeof obj === \"object\") {\n // return Object.fromEntries(\n // Object.entries(obj).map(([k, v]) => [k, hexifyBigInts(v)])\n // );\n // }\n // return obj;\n // };\n\n // const chainIdHex = `0x${optimismSepolia.id.toString(16)}`;\n\n // // Increase callGasLimit before sending to paymaster\n // const modifiedUserOp = hexifyBigInts({\n // ...userOp,\n // callGasLimit: BigInt(8000000), // Double it, or set a fixed value\n // });\n\n // console.log(\"[SmartWallet Paymaster]\", getPublishConfig().thirdwebClientId);\n \n // // Call thirdweb's default paymaster endpoint\n // const response = await fetch(\n // `https://${optimismSepolia.id}.bundler.thirdweb.com/v2`,\n // {\n // method: \"POST\",\n // headers: { \n // \"Content-Type\": \"application/json\",\n // \"X-Client-Id\": getPublishConfig().thirdwebClientId,\n // },\n // body: JSON.stringify({\n // id: 1,\n // jsonrpc: \"2.0\",\n // method: \"pm_sponsorUserOperation\",\n // params: [modifiedUserOp, '0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789', chainIdHex],\n // }),\n // }\n // );\n \n // const data = await response.json();\n // console.log(\"[SmartWallet Paymaster Response]\", data);\n // return {\n // paymasterAndData: data.result.paymasterAndData,\n // preVerificationGas: data.result.preVerificationGas,\n // verificationGasLimit: data.result.verificationGasLimit,\n // callGasLimit: data.result.callGasLimit,\n // };\n // },\n // execute: (accountContract, transaction) => {\n // // Log the gas that was set on the transaction\n // console.log(\"[SmartWallet Execute]\", {\n // gas: transaction.gas,\n // to: transaction.to,\n // dataLength: transaction.data?.length,\n // });\n \n // // Return the default execute call — don't change behavior,\n // // just observe what's being passed through\n // return prepareContractCall({\n // contract: accountContract,\n // method: \"function execute(address, uint256, bytes)\",\n // params: [\n // transaction.to ?? \"\",\n // transaction.value ?? 0n,\n // transaction.data ?? \"0x\",\n // ],\n // gas: transaction.gas, // Pass through whatever was set\n // });\n // },\n // },\n // }\n // }\n })\n }\n return _managedInAppWallet\n}\n\n/** Single instance (pairs with {@link getManagedAccountWallet} for two execution modes, same Thirdweb client). */\nlet _modularInAppWallet: Wallet | null = null\n\nexport const getModularAccountWallet = () => {\n if (!_modularInAppWallet) {\n _modularInAppWallet = inAppWallet({\n storage: getSharedPublishInAppWalletStorage(),\n auth: {\n options: [\n \"farcaster\",\n \"email\",\n \"passkey\",\n \"phone\",\n ],\n },\n executionMode: {\n mode: 'EIP7702',\n sponsorGas: true,\n \n },\n })\n }\n return _modularInAppWallet\n}\n\nlet _walletsForConnectButton: Wallet[] | null = null\n\nexport const getWalletsForConnectButton = () => {\n if (!_walletsForConnectButton) {\n _walletsForConnectButton = getPublishConfig().useModularExecutor\n ? [getModularAccountWallet()]\n : [getManagedAccountWallet()]\n }\n return _walletsForConnectButton\n}","import { getContract, prepareContractCall, prepareEvent, parseEventLogs } from 'thirdweb'\nimport type { ThirdwebClient } from 'thirdweb'\nimport type { Chain } from 'thirdweb/chains'\nimport { encodeAbiParameters } from 'viem'\nimport { getPublishConfig } from '~/config'\n\n/**\n * EAS contract custom errors. Included so viem can decode revert data instead of\n * throwing AbiErrorSignatureNotFoundError (e.g. for AccessDenied 0x4ca88867).\n */\nconst EAS_ERRORS_ABI = [\n { type: 'error' as const, name: 'AccessDenied', inputs: [] },\n { type: 'error' as const, name: 'AlreadyRevoked', inputs: [] },\n { type: 'error' as const, name: 'InvalidRevocation', inputs: [] },\n { type: 'error' as const, name: 'InvalidRevocations', inputs: [] },\n { type: 'error' as const, name: 'InvalidSchema', inputs: [] },\n { type: 'error' as const, name: 'Irrevocable', inputs: [] },\n { type: 'error' as const, name: 'NotFound', inputs: [] },\n { type: 'error' as const, name: 'NotPayable', inputs: [] },\n { type: 'error' as const, name: 'InsufficientValue', inputs: [] },\n { type: 'error' as const, name: 'InvalidLength', inputs: [] },\n] as const\n\nconst attestedEvent = () =>\n prepareEvent({\n signature:\n 'event Attested(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID)',\n })\n\nconst ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as const\nconst ZERO_BYTES32 = ('0x' + '0'.repeat(64)) as `0x${string}`\n\nexport type EasAttestParams = {\n schema: `0x${string}`\n data: {\n recipient?: `0x${string}`\n expirationTime?: bigint\n revocable?: boolean\n refUID: `0x${string}`\n data: `0x${string}`\n value?: bigint\n }\n}\n\n/**\n * Prepares a single EAS attest call.\n * Used for Seed and Version attestations in the direct-to-EAS publish path.\n */\nexport function prepareEasAttest(\n client: ThirdwebClient,\n chain: Chain,\n params: EasAttestParams,\n) {\n const { easContractAddress } = getPublishConfig()\n const contract = getContract({\n client,\n chain,\n address: easContractAddress as `0x${string}`,\n })\n\n return prepareContractCall({\n contract,\n method:\n 'function attest((bytes32 schema,(address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint256 value) data) request) payable returns (bytes32)' as const,\n params: [\n {\n schema: params.schema,\n data: {\n recipient: (params.data.recipient ?? ZERO_ADDRESS) as `0x${string}`,\n expirationTime: params.data.expirationTime ?? 0n,\n revocable: params.data.revocable ?? true,\n refUID: params.data.refUID,\n data: params.data.data,\n value: params.data.value ?? 0n,\n },\n },\n ],\n })\n}\n\nexport type MultiAttestationRequest = {\n schema: `0x${string}`\n data: Array<{\n recipient: `0x${string}`\n expirationTime: bigint\n revocable: boolean\n refUID: `0x${string}`\n data: `0x${string}`\n value: bigint\n }>\n}\n\n/**\n * Prepares an EAS multiAttest call for batch attestations.\n * Used for property attestations in the direct-to-EAS publish path.\n */\nexport function prepareEasMultiAttest(\n client: ThirdwebClient,\n chain: Chain,\n requests: MultiAttestationRequest[],\n) {\n const { easContractAddress } = getPublishConfig()\n const contract = getContract({\n client,\n chain,\n address: easContractAddress as `0x${string}`,\n })\n\n return prepareContractCall({\n contract,\n method:\n 'function multiAttest((bytes32 schema,(address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint256 value)[] data)[] requests) payable returns (bytes32[])' as const,\n params: [requests],\n } as Parameters<typeof prepareContractCall>[0])\n}\n\n/**\n * Encodes a bytes32 value for Seed/Version attestation data.\n * Equivalent to Solidity abi.encode(bytes32).\n */\nexport function encodeBytes32(value: `0x${string}`): `0x${string}` {\n return encodeAbiParameters([{ type: 'bytes32' }], [value]) as `0x${string}`\n}\n\n/**\n * Extracts the attestation UID from an EAS attest transaction receipt.\n * Parses the Attested event from the receipt logs.\n */\nexport function getAttestationUidFromReceipt(\n receipt: { logs?: Array<{ address?: string; data?: string; topics?: unknown[] }> },\n easContractAddress: string,\n): string | undefined {\n const all = getAttestedUidsFromReceipt(receipt, easContractAddress)\n return all[0]?.uid\n}\n\nexport type EasAttestedPair = { schemaUid: string; uid: string }\n\n/**\n * All `Attested` events from the EAS contract in this receipt, in log order.\n * Used after `multiAttest` to persist per-property attestation UIDs to SQLite.\n */\nexport function getAttestedUidsFromReceipt(\n receipt: { logs?: Array<{ address?: string; data?: string; topics?: unknown[] }> },\n easContractAddress: string,\n): EasAttestedPair[] {\n if (!receipt.logs?.length) return []\n const want = easContractAddress.toLowerCase()\n const logs = receipt.logs.filter((l) => l.address && l.address.toLowerCase() === want)\n if (!logs.length) return []\n try {\n const parsed = parseEventLogs({\n logs: logs as import('viem').Log[],\n events: [attestedEvent()],\n strict: false,\n })\n const out: EasAttestedPair[] = []\n for (const ev of parsed) {\n const uid = ev?.args?.uid as string | undefined\n const schemaUid = ev?.args?.schemaUID as string | undefined\n if (!uid || uid === ZERO_BYTES32) continue\n if (!schemaUid) continue\n out.push({ schemaUid, uid })\n }\n return out\n } catch {\n return []\n }\n}\n\nexport type MultiRevocationRequest = {\n schema: `0x${string}`\n data: Array<{\n uid: `0x${string}`\n value?: bigint\n }>\n}\n\n/**\n * Prepares an EAS multiRevoke call for batch revocation.\n */\nexport function prepareEasMultiRevoke(\n client: ThirdwebClient,\n chain: Chain,\n requests: MultiRevocationRequest[],\n) {\n const { easContractAddress } = getPublishConfig()\n const contract = getContract({\n client,\n chain,\n address: easContractAddress as `0x${string}`,\n abi: [...EAS_ERRORS_ABI],\n })\n\n return prepareContractCall({\n contract,\n method:\n 'function multiRevoke((bytes32 schema,(bytes32 uid,uint256 value)[] data)[] multiRequests) payable' as const,\n params: [\n requests.map((r) => ({\n schema: r.schema,\n data: r.data.map((d) => ({\n uid: d.uid,\n value: d.value ?? 0n,\n })),\n })),\n ],\n } as Parameters<typeof prepareContractCall>[0])\n}\n\nexport { ZERO_ADDRESS, ZERO_BYTES32 }\n","import type { Account } from 'thirdweb/wallets'\nimport { optimismSepolia } from 'thirdweb/chains'\nimport { getGetAdditionalSyncAddresses } from '@seedprotocol/sdk'\nimport {\n getClient,\n getSmartWalletAddressForAdmin,\n isSmartWalletDeployed,\n getManagedAccountWallet,\n} from '~/helpers/thirdweb'\n\n/**\n * Resolves which account to use for revoking attestations.\n * When the attester is the user's ManagedAccount (EIP4337) but they're connected\n * with a different wallet (e.g. EOA or modular account), attempts to use the\n * ManagedAccount wallet for the revoke.\n *\n * @param account - The currently connected account\n * @param attester - The attester address from the seed (publisher or attestationRaw.attester)\n * @returns The account to use for revoke\n * @throws If `attester` equals any address from {@link getGetAdditionalSyncAddresses}\n * (e.g. `modularAccountModuleContract` when `initPublish` registers it). Those addresses\n * cannot revoke via the app wallet’s EAS `multiRevoke` path today.\n */\nexport async function resolveRevokeAccount(params: {\n account: Account\n attester: string | null\n}): Promise<Account> {\n const { account, attester } = params\n\n if (!attester || account.address.toLowerCase() === attester.toLowerCase()) {\n return account\n }\n\n const additionalGetter = getGetAdditionalSyncAddresses()\n if (additionalGetter) {\n const additional = await additionalGetter()\n const attesterLower = attester.toLowerCase()\n if (additional?.some((a: string | undefined) => a?.toLowerCase() === attesterLower)) {\n throw new Error(\n 'Revocation not supported for items published via the modular executor.',\n )\n }\n }\n\n try {\n const derivedManagedAccount = await getSmartWalletAddressForAdmin(account.address)\n const attesterLower = attester.toLowerCase()\n const derivedLower = derivedManagedAccount.toLowerCase()\n\n if (attesterLower === derivedLower) {\n const deployed = await isSmartWalletDeployed(derivedManagedAccount)\n if (deployed) {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({\n client: getClient(),\n chain: optimismSepolia,\n })\n const managedAccount = managedAccountWallet.getAccount()\n if (managedAccount) {\n return managedAccount\n }\n }\n }\n } catch {\n // Fall through to return account; revoke attempt may fail with AccessDenied\n }\n\n return account\n}\n","import { getClient } from '~/helpers/thirdweb'\nimport { optimismSepolia } from 'thirdweb/chains'\nimport { sendTransaction, waitForReceipt } from 'thirdweb'\nimport { getConnectedAccount } from '~/helpers/thirdweb'\nimport { prepareEasMultiRevoke } from '~/helpers/easDirect'\nimport { resolveRevokeAccount } from '~/helpers/resolveRevokeAccount'\nimport {\n getVersionsForSeedUid,\n getMetadataAttestationUidsForSeedUid,\n getAttesterForSeed,\n updateSeedRevokedAt,\n VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA,\n isValidEasAttestationUid,\n} from '@seedprotocol/sdk'\n\n/**\n * Revokes the Seed attestation and all Version and metadata attestations on EAS.\n * Updates local DB with revokedAt timestamp.\n *\n * Order: metadata first, then versions, then seed (children before parents).\n */\nexport async function revokeAttestations(params: {\n seedLocalId: string\n seedUid: string\n seedSchemaUid: string\n}): Promise<void> {\n const { seedLocalId, seedUid, seedSchemaUid } = params\n\n const account = await getConnectedAccount()\n if (!account) {\n throw new Error('No wallet connected. Connect a wallet to revoke attestations.')\n }\n\n const attester = await getAttesterForSeed({ seedLocalId, seedUid })\n const revokeAccount = await resolveRevokeAccount({ account, attester })\n\n const client = getClient()\n\n // Collect attestation UIDs to revoke\n const [versionRows, metadataRows] = await Promise.all([\n getVersionsForSeedUid(seedUid),\n getMetadataAttestationUidsForSeedUid(seedUid),\n ])\n\n const versionUids = versionRows\n .map((r: { uid: string }) => r.uid)\n .filter((uid: string) => isValidEasAttestationUid(uid))\n const metadataBySchema = new Map<string, string[]>()\n for (const { uid, schemaUid } of metadataRows) {\n if (!isValidEasAttestationUid(uid)) continue\n const list = metadataBySchema.get(schemaUid) ?? []\n list.push(uid)\n metadataBySchema.set(schemaUid, list)\n }\n\n const requests: Array<{\n schema: `0x${string}`\n data: Array<{ uid: `0x${string}`; value?: bigint }>\n }> = []\n\n // Metadata attestations (group by schema)\n for (const [schemaUid, uids] of metadataBySchema) {\n if (uids.length > 0) {\n requests.push({\n schema: schemaUid as `0x${string}`,\n data: uids.map((uid: string) => ({ uid: uid as `0x${string}` })),\n })\n }\n }\n\n // Version attestations\n if (versionUids.length > 0) {\n requests.push({\n schema: VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA as `0x${string}`,\n data: versionUids.map((uid: string) => ({ uid: uid as `0x${string}` })),\n })\n }\n\n // Seed attestation\n requests.push({\n schema: seedSchemaUid as `0x${string}`,\n data: [{ uid: seedUid as `0x${string}` }],\n })\n\n // Execute multiRevoke in batches if needed (EAS may have limits)\n for (const req of requests) {\n if (req.data.length === 0) continue\n const multiRevokeTx = prepareEasMultiRevoke(client, optimismSepolia, [req])\n try {\n const result = await sendTransaction({ account: revokeAccount, transaction: multiRevokeTx })\n await waitForReceipt({\n client,\n chain: optimismSepolia,\n transactionHash: result.transactionHash,\n })\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err)\n // EAS AccessDenied: only the original attester can revoke (selector 0x4ca88867)\n if (msg.includes('AccessDenied') || msg.includes('0x4ca88867')) {\n throw new Error(\n 'Only the original attester can revoke attestations. Connect the wallet that published this item.',\n )\n }\n // AlreadyRevoked: attestation was already revoked (e.g. double-click, stale UI)\n if (msg.includes('AlreadyRevoked')) {\n continue\n }\n throw err\n }\n }\n\n const revokedAt = Math.floor(Date.now() / 1000)\n await updateSeedRevokedAt({ seedLocalId, revokedAt })\n}\n","import {\n DEFAULT_ARWEAVE_GRAPHQL_URL,\n setAdditionalSyncAddresses,\n setGetPublisherForNewSeeds,\n setRevokeExecutor,\n type TransactionTag,\n} from '@seedprotocol/sdk'\nimport { getConnectedManagedAccountAddress } from './helpers/thirdweb'\nimport { optimismSepolia } from 'thirdweb/chains'\nimport { revokeAttestations } from './services/revoke/revokeAttestations'\nimport {\n THIRDWEB_ACCOUNT_FACTORY_ADDRESS,\n EAS_CONTRACT_ADDRESS,\n} from './helpers/constants'\nimport { ethers } from 'ethers'\n\n/** Serialized upload item for Arweave signing (input to callback or used internally with JWK) */\nexport interface SerializedPublishUpload {\n versionLocalId: string\n itemPropertyName: string\n transactionJson: Record<string, unknown>\n}\n\n/** Result from Arweave signing (signed transaction + metadata) */\nexport interface ArweaveTransactionInfoResult {\n transaction: Record<string, unknown> & { chunks?: unknown }\n versionId: string\n modelName: string\n}\n\n/** Result from DataItem signing (compatible shape for createAttestations) */\nexport interface ArweaveDataItemInfoResult {\n transaction: { id: string }\n versionId?: string\n modelName?: string\n}\n\nexport interface PublishConfig {\n thirdwebClientId: string\n /** Upload API base URL (e.g. from VITE_UPLOAD_API_BASE_URL or NEXT_PUBLIC_UPLOAD_API_BASE_URL). Also used for bundler when useArweaveBundler is true. */\n uploadApiBaseUrl: string\n /**\n * Optional origin for verifying uploads via `GET /api/upload/arweave/data/:id`.\n * Defaults to {@link uploadApiBaseUrl} (e.g. set `ARWEAVE_UPLOAD_API_BASE_URL` as `uploadApiBaseUrl`).\n */\n arweaveUploadVerificationBaseUrl?: string\n /**\n * Arweave gateway GraphQL URL for resolving L1 bundle tx ids after bundler upload.\n * Defaults to {@link DEFAULT_ARWEAVE_GRAPHQL_URL}.\n */\n arweaveGraphqlUrl?: string\n /**\n * Use integer indices instead of string localId/publishLocalId for multiPublish (gas-efficient).\n * Set to true when using the new contract that expects uint256 localIdIndex/publishLocalIdIndex.\n * Default: false (uses string-based payload for backward compatibility).\n */\n useIntegerLocalIds?: boolean\n /**\n * Bypass the SeedProtocol contract and call EAS attest/multiAttest directly from the user's wallet.\n * Default: false (uses contract multiPublish).\n */\n useDirectEas?: boolean\n /**\n * Optional IModularCore module to ensure is installed on the **ModularCore** account contract.\n * When set, onConnect / publish prep will check getInstalledModules and install if missing.\n * If the smart account is not ModularCore (no Router), install is skipped — typical for default EIP-4337 accounts.\n */\n modularAccountModuleContract?: string\n /** Optional module install data (default \"0x\"). Used with modularAccountModuleContract. */\n modularAccountModuleData?: string\n /**\n * Use the modular executor for multiPublish.\n * Default: false (uses the smart wallet executor).\n */\n useModularExecutor?: boolean\n /**\n * When true (and `useModularExecutor`), attempts to deploy / bootstrap the modular in-app wallet’s\n * EIP-7702 smart account on Optimism Sepolia via Thirdweb’s `deploySmartAccount` when bytecode is still empty.\n * When **undefined** and `useModularExecutor` is true, defaults to **true**. Set explicitly to **false** to surface\n * an error instead of auto-deploying.\n */\n autoDeployEip7702ModularAccount?: boolean\n /**\n * When true (and `useModularExecutor`), attempts to deploy the ManagedAccount via the factory\n * if it is not yet deployed on Optimism Sepolia. Default: false (surface `managed_not_ready` instead).\n */\n autoDeployManagedAccount?: boolean\n /**\n * Optional override for automatic ManagedAccount factory deploy when {@link autoDeployManagedAccount} is true.\n * When unset, uses Thirdweb `deploySmartAccount` on the managed EIP-4337 in-app wallet account.\n */\n deployManagedAccount?: (params: {\n managedAddress: string\n managedSigningAccount: import('thirdweb/wallets').Account\n }) => Promise<void>\n /**\n * Called when optional wallet setup steps fail after connect (e.g. executor module install).\n */\n onWalletSetupWarning?: (error: unknown) => void\n /**\n * EXPERIMENTAL: Use Arweave bundler for instant uploads instead of reimbursement + chunk upload.\n * When true, skips sendReimbursementRequest, pollForConfirmation, and chunk-by-chunk uploadData.\n * Uses uploadApiBaseUrl for the bundler endpoint. Not yet validated for production.\n */\n useArweaveBundler?: boolean\n /**\n * Tags appended to every Arweave upload after Content-SHA-256 / Content-Type (e.g. App-Name).\n * Merged at publish time with {@link CreatePublishOptions.arweaveUploadTags} as\n * `[...config, ...options]`.\n */\n arweaveUploadTags?: TransactionTag[]\n /**\n * Default Html embedded data-URI policy for publishes when not overridden per {@link CreatePublishOptions}.\n * Default behavior when unset: `materialize`.\n */\n htmlEmbeddedDataUriPolicy?: import('./types').HtmlEmbeddedDataUriPolicy\n /**\n * Optional fallback: Sign Arweave upload transactions (non-bundler path). Prefer passing at createPublish time.\n */\n signArweaveTransactions?: (\n uploads: SerializedPublishUpload[]\n ) => Promise<ArweaveTransactionInfoResult[]>\n /**\n * Optional fallback: Arweave JWK for in-process signing (non-bundler path). Prefer passing at createPublish time.\n */\n arweaveJwk?: { kty: string; n: string; e: string; d?: string; [key: string]: unknown }\n /**\n * Optional fallback: Signer for DataItem creation when useArweaveBundler is true. Prefer passing at createPublish time.\n */\n dataItemSigner?: ethers.Wallet | import('thirdweb/wallets').Account\n /**\n * Optional fallback: Sign DataItems when useArweaveBundler is true. Prefer passing at createPublish time.\n * Each upload includes `tags` (content + configured {@link arweaveUploadTags}); forward them into the DataItem.\n */\n signDataItems?: (\n uploads: import('./services/publish/helpers/getPublishUploadData').PublishUploadData[]\n ) => Promise<ArweaveDataItemInfoResult[]>\n}\n\n/** Options passed at createPublish time. Signers here override config fallbacks. */\nexport interface CreatePublishOptions {\n /** `patch` (default): pending properties only. `new_version`: new Version attestation + all properties. */\n publishMode?: import('./types').PublishMode\n /**\n * Required when useArweaveBundler: sign DataItems (wallet flow).\n * Use each upload's `tags` when building the signed DataItem.\n */\n signDataItems?: (\n uploads: import('./services/publish/helpers/getPublishUploadData').PublishUploadData[]\n ) => Promise<ArweaveDataItemInfoResult[]>\n /** Required when useArweaveBundler: signer for DataItems (backend/script flow) */\n dataItemSigner?: ethers.Wallet | import('thirdweb/wallets').Account\n /** Required when NOT useArweaveBundler: sign Arweave transactions */\n signArweaveTransactions?: (\n uploads: SerializedPublishUpload[]\n ) => Promise<ArweaveTransactionInfoResult[]>\n /** Required when NOT useArweaveBundler: JWK for in-process signing */\n arweaveJwk?: { kty: string; n: string; e: string; d?: string; [key: string]: unknown }\n /**\n * Extra tags for this publish only, appended after {@link PublishConfig.arweaveUploadTags}.\n * Resolved order: `[...initPublishTags, ...theseTags]`.\n */\n arweaveUploadTags?: TransactionTag[]\n /**\n * Default for Html embedded data-URI handling when a property does not set `htmlEmbeddedDataUriPolicy`.\n * Default: `materialize`.\n */\n htmlEmbeddedDataUriPolicy?: import('./types').HtmlEmbeddedDataUriPolicy\n}\n\n/** Internal: module-level config ref set by PublishProvider on mount. */\nlet configRef: PublishConfig | null = null\n\n/**\n * Internal: Set config ref. Called by PublishProvider on mount or initPublish.\n */\nexport function setConfigRef(c: PublishConfig | null): void {\n configRef = c\n}\n\n/**\n * Internal: Get current config ref. Used by PublishProvider when config is not passed.\n */\nexport function getConfigRef(): PublishConfig | null {\n return configRef\n}\n\n/**\n * Initialize the publish package. Call once before using PublishManager or other publish APIs.\n * Registers the config and SDK hooks (revoke executor, getPublisherForNewSeeds, etc.).\n * For React apps, you can alternatively pass config to PublishProvider.\n */\nexport function initPublish(c: PublishConfig): void {\n setConfigRef(c)\n setGetPublisherForNewSeeds(async () => {\n try {\n return await getConnectedManagedAccountAddress(optimismSepolia)\n } catch {\n return undefined\n }\n })\n setRevokeExecutor(revokeAttestations)\n void import('./services/arweaveL1Finalize/worker').then((m) => {\n m.startArweaveL1FinalizeWorker()\n })\n setAdditionalSyncAddresses(async () => {\n if (c.useModularExecutor && c.modularAccountModuleContract) {\n return [c.modularAccountModuleContract]\n }\n return []\n })\n}\n\n/** Alias for initPublish. Use initPublish for the primary API. */\nexport const configurePublish = initPublish\n\nexport interface ResolvedPublishConfig extends PublishConfig {\n thirdwebAccountFactoryAddress: string\n uploadApiBaseUrl: string\n /** Resolved verification origin (defaults to uploadApiBaseUrl). */\n arweaveUploadVerificationBaseUrl: string\n /** Resolved GraphQL endpoint for L1 tx resolution (defaults to DEFAULT_ARWEAVE_GRAPHQL_URL). */\n arweaveGraphqlUrl: string\n easContractAddress: string\n useIntegerLocalIds: boolean\n useDirectEas: boolean\n modularAccountModuleData: string\n useModularExecutor: boolean\n useArweaveBundler: boolean\n /** Resolved: defaults to false. */\n autoDeployManagedAccount: boolean\n /**\n * Resolved: when `useModularExecutor` is true, defaults to true unless explicitly false.\n */\n autoDeployEip7702ModularAccount: boolean\n}\n\n/**\n * Returns the resolved publish config: defaults, env-driven fields, and\n * {@link ResolvedPublishConfig.autoDeployEip7702ModularAccount}.\n *\n * Reads the ref set by {@link initPublish} or {@link PublishProvider} with a `config` prop.\n * **Throws** if publish has not been initialized (same error as other publish APIs).\n */\nexport function getPublishConfig(): ResolvedPublishConfig {\n const config = configRef\n if (!config) {\n throw new Error(\n '@seedprotocol/publish: Call initPublish() or ensure PublishProvider is mounted with config before using the publish package'\n )\n }\n const useArweaveBundler = config.useArweaveBundler ?? false\n const arweaveUploadVerificationBaseUrl =\n config.arweaveUploadVerificationBaseUrl ?? config.uploadApiBaseUrl\n const arweaveGraphqlUrl = config.arweaveGraphqlUrl ?? DEFAULT_ARWEAVE_GRAPHQL_URL\n const useModularExecutor = config.useModularExecutor ?? false\n return {\n ...config,\n thirdwebAccountFactoryAddress: THIRDWEB_ACCOUNT_FACTORY_ADDRESS,\n easContractAddress: EAS_CONTRACT_ADDRESS,\n useIntegerLocalIds: config.useIntegerLocalIds ?? false,\n useDirectEas: config.useDirectEas ?? false,\n modularAccountModuleData: config.modularAccountModuleData ?? '0x',\n useModularExecutor,\n useArweaveBundler,\n arweaveUploadVerificationBaseUrl,\n arweaveGraphqlUrl,\n autoDeployManagedAccount: config.autoDeployManagedAccount ?? false,\n autoDeployEip7702ModularAccount: resolveAutoDeployEip7702ModularAccount(config, useModularExecutor),\n }\n}\n\n/** @internal Exported for unit tests. */\nexport function resolveAutoDeployEip7702ModularAccount(\n config: PublishConfig,\n useModularExecutor: boolean,\n): boolean {\n if (config.autoDeployEip7702ModularAccount === true) return true\n if (config.autoDeployEip7702ModularAccount === false) return false\n return useModularExecutor\n}\n"],"mappings":";;;;;;;;;;AAIA,IAAa,KACX,8CAGW,IACX,sEAGW,IACX,8CAGW,IACX,8CAUW,IACX,8CAMW,KACX,GAEW,KAAuB;CAClC,SAAS;CACT,SAAS;AACX,GAGa,KAA8B;CACzC;CAC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