diff --git a/Clarinet.toml b/Clarinet.toml index 5358576..0428efc 100644 --- a/Clarinet.toml +++ b/Clarinet.toml @@ -16,6 +16,9 @@ contract_id = 'SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope' [[project.requirements]] contract_id = 'SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition' +[[project.requirements]] +contract_id = 'SP000000000000000000002Q6VF78.pox-4' + [contracts.emergency-rules] path = 'contracts/rules/emergency-rules.clar' clarity_version = 2 @@ -61,15 +64,27 @@ path = 'contracts/smart-wallet-trait.clar' clarity_version = 2 epoch = 2.1 +[contracts.standard-rules] +path = 'contracts/rules/standard-rules.clar' +clarity_version = 2 +epoch = 2.1 + [contracts.sponsored-transfer] path = 'contracts/extensions/sponsored-transfer.clar' clarity_version = 2 epoch = 2.1 -[contracts.standard-rules] -path = 'contracts/rules/standard-rules.clar' +[contracts.ext-delegate-stx-pox-4] +path = 'contracts/extensions/ext-delegate-stx-pox-4.clar' clarity_version = 2 -epoch = 2.1 +epoch = 2.5 + +[contracts.ext-allow-contract-caller-pox-4] +path = 'contracts/extensions/ext-allow-contract-caller-pox-4.clar' +clarity_version = 2 +epoch = 2.5 + + [repl.analysis] passes = ['check_checker'] diff --git a/contracts/extensions/ext-allow-contract-caller-pox-4.clar b/contracts/extensions/ext-allow-contract-caller-pox-4.clar new file mode 100644 index 0000000..8812069 --- /dev/null +++ b/contracts/extensions/ext-allow-contract-caller-pox-4.clar @@ -0,0 +1,11 @@ +(define-constant err-invalid-payload (err u500)) + +(define-public (call (payload (buff 2048))) + (let ((details (unwrap! (from-consensus-buff? {amount-ustx: uint, delegate-to: principal, until-burn-ht: (optional uint), + pox-addr: (optional { version: (buff 1), hashbytes: (buff 32) })} payload) err-invalid-payload))) + (to-uint-response (contract-call? 'SP000000000000000000002Q6VF78.pox-4 delegate-stx + (get amount-ustx details) (get delegate-to details) (get until-burn-ht details) (get pox-addr details))) + )) + +(define-read-only (to-uint-response (res (response bool int))) + (match res success (ok success) error (err (to-uint error)))) \ No newline at end of file diff --git a/contracts/extensions/ext-delegate-stx-pox-4.clar b/contracts/extensions/ext-delegate-stx-pox-4.clar new file mode 100644 index 0000000..8812069 --- /dev/null +++ b/contracts/extensions/ext-delegate-stx-pox-4.clar @@ -0,0 +1,11 @@ +(define-constant err-invalid-payload (err u500)) + +(define-public (call (payload (buff 2048))) + (let ((details (unwrap! (from-consensus-buff? {amount-ustx: uint, delegate-to: principal, until-burn-ht: (optional uint), + pox-addr: (optional { version: (buff 1), hashbytes: (buff 32) })} payload) err-invalid-payload))) + (to-uint-response (contract-call? 'SP000000000000000000002Q6VF78.pox-4 delegate-stx + (get amount-ustx details) (get delegate-to details) (get until-burn-ht details) (get pox-addr details))) + )) + +(define-read-only (to-uint-response (res (response bool int))) + (match res success (ok success) error (err (to-uint error)))) \ No newline at end of file diff --git a/deployments/default.simnet-plan.yaml b/deployments/default.simnet-plan.yaml index 164b814..b4d29e2 100644 --- a/deployments/default.simnet-plan.yaml +++ b/deployments/default.simnet-plan.yaml @@ -132,24 +132,17 @@ plan: transactions: [] epoch: "2.1" - id: 3 - transactions: [] - epoch: "2.1" + transactions: + - emulated-contract-publish: + contract-name: nope + emulated-sender: SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ + path: ".\\.cache/requirements/SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope.clar" + clarity-version: 2 + epoch: "2.4" - id: 4 transactions: [] - epoch: "2.1" + epoch: "2.4" - id: 5 - transactions: [] - epoch: "2.1" - - id: 6 - transactions: [] - epoch: "2.1" - - id: 7 - transactions: [] - epoch: "2.1" - - id: 8 - transactions: [] - epoch: "2.1" - - id: 9 transactions: - emulated-contract-publish: contract-name: og-bitcoin-pizza-leather-edition @@ -157,29 +150,16 @@ plan: path: ".\\.cache/requirements/SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition.clar" clarity-version: 2 - emulated-contract-publish: - contract-name: nope - emulated-sender: SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ - path: ".\\.cache/requirements/SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope.clar" + contract-name: ext-allow-contract-caller-pox-4 + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/extensions/ext-allow-contract-caller-pox-4.clar clarity-version: 2 - epoch: "2.4" - - id: 10 - transactions: [] - epoch: "2.4" - - id: 11 - transactions: [] - epoch: "2.4" - - id: 12 - transactions: [] - epoch: "2.4" - - id: 13 - transactions: [] - epoch: "2.4" - - id: 14 - transactions: [] - epoch: "2.4" - - id: 15 - transactions: [] - epoch: "2.4" - - id: 16 + - emulated-contract-publish: + contract-name: ext-delegate-stx-pox-4 + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/extensions/ext-delegate-stx-pox-4.clar + clarity-version: 2 + epoch: "2.5" + - id: 6 transactions: [] - epoch: "2.4" + epoch: "2.5" diff --git a/src/clarigen-types.ts b/src/clarigen-types.ts index ce31d4e..688b049 100644 --- a/src/clarigen-types.ts +++ b/src/clarigen-types.ts @@ -1,1540 +1,753 @@ -import type { - Response, - TypedAbiArg, - TypedAbiFunction, - TypedAbiMap, - TypedAbiVariable, -} from "@clarigen/core"; + +import type { TypedAbiArg, TypedAbiFunction, TypedAbiMap, TypedAbiVariable, Response } from '@clarigen/core'; export const contracts = { commissionTrait: { - functions: {}, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity1", - contractName: "commission-trait", - }, - emergencyRules: { - functions: { - isAllowedExtension: { - name: "is-allowed-extension", - access: "public", - args: [ - { name: "extension", type: "trait_reference" }, - { name: "payload", type: { buffer: { length: 2048 } } }, - ], - outputs: { type: { response: { ok: "bool", error: "none" } } }, - } as TypedAbiFunction< - [ - extension: TypedAbiArg, - payload: TypedAbiArg - ], - Response - >, - isAllowedStx: { - name: "is-allowed-stx", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "none" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - }, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "emergency-rules", - }, - extensionTrait: { - functions: {}, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "extension-trait", - }, - inactiveObserver: { - functions: { - closeSmartWallet: { - name: "close-smart-wallet", - access: "public", - args: [{ name: "wallet", type: "trait_reference" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [wallet: TypedAbiArg], - Response - >, - }, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "inactive-observer", - }, - microNthng: { - functions: { - mint_x: { - name: "mint!", - access: "private", - args: [ - { name: "account", type: "principal" }, - { name: "amount", type: "uint128" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - account: TypedAbiArg, - amount: TypedAbiArg - ], - Response - >, - transfer: { - name: "transfer", - access: "public", - args: [ - { name: "to", type: "principal" }, - { name: "amount", type: "uint128" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - to: TypedAbiArg, - amount: TypedAbiArg - ], - Response - >, - getTotalSupply: { - name: "get-total-supply", - access: "read_only", - args: [], - outputs: { type: "uint128" }, - } as TypedAbiFunction<[], bigint>, - }, - maps: {}, - variables: { - totalSupply: { - name: "total-supply", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - }, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [{ name: "micro-nothing" }], - epoch: "Epoch21", - clarity_version: "Clarity1", - contractName: "micro-nthng", - }, - nftTrait: { - functions: {}, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity1", - contractName: "nft-trait", - }, - noRules: { - functions: { - isAllowedExtension: { - name: "is-allowed-extension", - access: "public", - args: [ - { name: "extension", type: "trait_reference" }, - { name: "payload", type: { buffer: { length: 2048 } } }, - ], - outputs: { type: { response: { ok: "bool", error: "none" } } }, - } as TypedAbiFunction< - [ - extension: TypedAbiArg, - payload: TypedAbiArg - ], - Response - >, - isAllowedStx: { - name: "is-allowed-stx", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "none" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - }, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "no-rules", - }, - nope: { - functions: { - checkErr: { - name: "check-err", - access: "private", - args: [ - { - name: "result", - type: { response: { ok: "bool", error: "uint128" } }, - }, - { - name: "prior", - type: { response: { ok: "bool", error: "uint128" } }, - }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - result: TypedAbiArg, "result">, - prior: TypedAbiArg, "prior"> - ], - Response - >, - sendNothingUnwrap: { - name: "send-nothing-unwrap", - access: "private", - args: [ - { - name: "recipient", - type: { - tuple: [ - { name: "amount", type: "uint128" }, - { - name: "memo", - type: { optional: { buffer: { length: 34 } } }, - }, - { name: "to", type: "principal" }, - ], - }, - }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - recipient: TypedAbiArg< - { - amount: number | bigint; - memo: Uint8Array | null; - to: string; - }, - "recipient" - > - ], - Response - >, - updateThresholdState: { - name: "update-threshold-state", - access: "private", - args: [], - outputs: { type: "bool" }, - } as TypedAbiFunction<[], boolean>, - sendMany: { - name: "send-many", - access: "public", - args: [ - { - name: "recipients", - type: { - list: { - type: { - tuple: [ - { name: "amount", type: "uint128" }, - { - name: "memo", - type: { optional: { buffer: { length: 34 } } }, - }, - { name: "to", type: "principal" }, - ], - }, - length: 200, - }, - }, - }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - recipients: TypedAbiArg< - { - amount: number | bigint; - memo: Uint8Array | null; - to: string; - }[], - "recipients" - > - ], - Response - >, - sendNothing: { - name: "send-nothing", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "to", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - to: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - setAdmin: { - name: "set-admin", - access: "public", - args: [{ name: "new-admin", type: "principal" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [newAdmin: TypedAbiArg], - Response - >, - setMetadata: { - name: "set-metadata", - access: "public", - args: [ - { - name: "uri", - type: { optional: { "string-utf8": { length: 256 } } }, - }, - { name: "name", type: { "string-ascii": { length: 32 } } }, - { name: "symbol", type: { "string-ascii": { length: 32 } } }, - { name: "decimals", type: "uint128" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - uri: TypedAbiArg, - name: TypedAbiArg, - symbol: TypedAbiArg, - decimals: TypedAbiArg - ], - Response - >, - transfer: { - name: "transfer", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "from", type: "principal" }, - { name: "to", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - from: TypedAbiArg, - to: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - unwrap: { - name: "unwrap", - access: "public", - args: [{ name: "amount", type: "uint128" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [amount: TypedAbiArg], - Response - >, - wrapNthng: { - name: "wrap-nthng", - access: "public", - args: [{ name: "amount", type: "uint128" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [amount: TypedAbiArg], - Response - >, - getBalance: { - name: "get-balance", - access: "read_only", - args: [{ name: "user", type: "principal" }], - outputs: { type: { response: { ok: "uint128", error: "none" } } }, - } as TypedAbiFunction< - [user: TypedAbiArg], - Response - >, - getDecimals: { - name: "get-decimals", - access: "read_only", - args: [], - outputs: { type: { response: { ok: "uint128", error: "none" } } }, - } as TypedAbiFunction<[], Response>, - getName: { - name: "get-name", - access: "read_only", - args: [], - outputs: { - type: { - response: { ok: { "string-ascii": { length: 32 } }, error: "none" }, - }, - }, - } as TypedAbiFunction<[], Response>, - getSymbol: { - name: "get-symbol", - access: "read_only", - args: [], - outputs: { - type: { - response: { ok: { "string-ascii": { length: 32 } }, error: "none" }, - }, - }, - } as TypedAbiFunction<[], Response>, - getTokenUri: { - name: "get-token-uri", - access: "read_only", - args: [], - outputs: { - type: { - response: { - ok: { optional: { "string-utf8": { length: 256 } } }, - error: "none", - }, - }, - }, - } as TypedAbiFunction<[], Response>, - getTotalSupply: { - name: "get-total-supply", - access: "read_only", - args: [], - outputs: { type: { response: { ok: "uint128", error: "none" } } }, - } as TypedAbiFunction<[], Response>, - isSafeToWrap: { - name: "is-safe-to-wrap", - access: "read_only", - args: [ - { name: "amount", type: "uint128" }, - { name: "wrapper", type: "principal" }, - ], - outputs: { type: "bool" }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - wrapper: TypedAbiArg - ], - boolean - >, - }, - maps: {}, - variables: { - ERR_INVALID_PARAMS: { - name: "ERR-INVALID-PARAMS", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_UNAUTHORIZED: { - name: "ERR-UNAUTHORIZED", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_YOU_POOR: { - name: "ERR-YOU-POOR", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - MAX_SUPPLY: { - name: "MAX-SUPPLY", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - WRAP_THRESHOLD: { - name: "WRAP-THRESHOLD", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - contractAdmin: { - name: "contract-admin", - type: "principal", - access: "variable", - } as TypedAbiVariable, - isThresholdReached: { - name: "is-threshold-reached", - type: "bool", - access: "variable", - } as TypedAbiVariable, - tokenDecimals: { - name: "token-decimals", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - tokenName: { - name: "token-name", - type: { - "string-ascii": { - length: 32, - }, - }, - access: "variable", - } as TypedAbiVariable, - tokenSymbol: { - name: "token-symbol", - type: { - "string-ascii": { - length: 32, - }, - }, - access: "variable", - } as TypedAbiVariable, - tokenUri: { - name: "token-uri", - type: { - optional: { - "string-utf8": { - length: 256, - }, - }, - }, - access: "variable", - } as TypedAbiVariable, - }, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [{ name: "NOT" }], - epoch: "Epoch24", - clarity_version: "Clarity2", - contractName: "nope", - }, - ogBitcoinPizzaLeatherEdition: { - functions: { - isOwner: { - name: "is-owner", - access: "private", - args: [ - { name: "token-id", type: "uint128" }, - { name: "user", type: "principal" }, - ], - outputs: { type: "bool" }, - } as TypedAbiFunction< - [ - tokenId: TypedAbiArg, - user: TypedAbiArg - ], - boolean - >, - isSenderOwner: { - name: "is-sender-owner", - access: "private", - args: [{ name: "id", type: "uint128" }], - outputs: { type: "bool" }, - } as TypedAbiFunction<[id: TypedAbiArg], boolean>, - mintMany: { - name: "mint-many", - access: "private", - args: [ - { - name: "uris", - type: { - list: { type: { "string-ascii": { length: 64 } }, length: 25 }, - }, - }, - ], - outputs: { type: { response: { ok: "uint128", error: "uint128" } } }, - } as TypedAbiFunction< - [uris: TypedAbiArg], - Response - >, - mintManyIter: { - name: "mint-many-iter", - access: "private", - args: [ - { name: "hash", type: { "string-ascii": { length: 64 } } }, - { name: "next-id", type: "uint128" }, - ], - outputs: { type: "uint128" }, - } as TypedAbiFunction< - [ - hash: TypedAbiArg, - nextId: TypedAbiArg - ], - bigint - >, - payRoyalty: { - name: "pay-royalty", - access: "private", - args: [ - { name: "price", type: "uint128" }, - { name: "royalty", type: "uint128" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - price: TypedAbiArg, - royalty: TypedAbiArg - ], - Response - >, - trnsfr: { - name: "trnsfr", - access: "private", - args: [ - { name: "id", type: "uint128" }, - { name: "sender", type: "principal" }, - { name: "recipient", type: "principal" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - id: TypedAbiArg, - sender: TypedAbiArg, - recipient: TypedAbiArg - ], - Response - >, - burn: { - name: "burn", - access: "public", - args: [{ name: "token-id", type: "uint128" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [tokenId: TypedAbiArg], - Response - >, - buyInUstx: { - name: "buy-in-ustx", - access: "public", - args: [ - { name: "id", type: "uint128" }, - { name: "comm-trait", type: "trait_reference" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - id: TypedAbiArg, - commTrait: TypedAbiArg - ], - Response - >, - claim: { - name: "claim", - access: "public", - args: [ - { - name: "uris", - type: { - list: { type: { "string-ascii": { length: 64 } }, length: 25 }, - }, - }, - ], - outputs: { type: { response: { ok: "uint128", error: "uint128" } } }, - } as TypedAbiFunction< - [uris: TypedAbiArg], - Response - >, - freezeMetadata: { - name: "freeze-metadata", - access: "public", - args: [], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction<[], Response>, - listInUstx: { - name: "list-in-ustx", - access: "public", - args: [ - { name: "id", type: "uint128" }, - { name: "price", type: "uint128" }, - { name: "comm-trait", type: "trait_reference" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - id: TypedAbiArg, - price: TypedAbiArg, - commTrait: TypedAbiArg - ], - Response - >, - lockContract: { - name: "lock-contract", - access: "public", - args: [], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction<[], Response>, - setArtistAddress: { - name: "set-artist-address", - access: "public", - args: [{ name: "address", type: "principal" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [address: TypedAbiArg], - Response - >, - setLicenseName: { - name: "set-license-name", - access: "public", - args: [{ name: "name", type: { "string-ascii": { length: 40 } } }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [name: TypedAbiArg], - Response - >, - setLicenseUri: { - name: "set-license-uri", - access: "public", - args: [{ name: "uri", type: { "string-ascii": { length: 80 } } }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [uri: TypedAbiArg], - Response - >, - setRoyaltyPercent: { - name: "set-royalty-percent", - access: "public", - args: [{ name: "royalty", type: "uint128" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [royalty: TypedAbiArg], - Response - >, - setTokenUri: { - name: "set-token-uri", - access: "public", - args: [ - { name: "hash", type: { "string-ascii": { length: 64 } } }, - { name: "token-id", type: "uint128" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - hash: TypedAbiArg, - tokenId: TypedAbiArg - ], - Response - >, - transfer: { - name: "transfer", - access: "public", - args: [ - { name: "id", type: "uint128" }, - { name: "sender", type: "principal" }, - { name: "recipient", type: "principal" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - id: TypedAbiArg, - sender: TypedAbiArg, - recipient: TypedAbiArg - ], - Response - >, - unlistInUstx: { - name: "unlist-in-ustx", - access: "public", - args: [{ name: "id", type: "uint128" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [id: TypedAbiArg], - Response - >, - getArtistAddress: { - name: "get-artist-address", - access: "read_only", - args: [], - outputs: { type: { response: { ok: "principal", error: "none" } } }, - } as TypedAbiFunction<[], Response>, - getBalance: { - name: "get-balance", - access: "read_only", - args: [{ name: "account", type: "principal" }], - outputs: { type: "uint128" }, - } as TypedAbiFunction<[account: TypedAbiArg], bigint>, - getLastTokenId: { - name: "get-last-token-id", - access: "read_only", - args: [], - outputs: { type: { response: { ok: "uint128", error: "none" } } }, - } as TypedAbiFunction<[], Response>, - getLicenseName: { - name: "get-license-name", - access: "read_only", - args: [], - outputs: { - type: { - response: { ok: { "string-ascii": { length: 40 } }, error: "none" }, - }, - }, - } as TypedAbiFunction<[], Response>, - getLicenseUri: { - name: "get-license-uri", - access: "read_only", - args: [], - outputs: { - type: { - response: { ok: { "string-ascii": { length: 80 } }, error: "none" }, - }, - }, - } as TypedAbiFunction<[], Response>, - getListingInUstx: { - name: "get-listing-in-ustx", - access: "read_only", - args: [{ name: "id", type: "uint128" }], - outputs: { - type: { - optional: { - tuple: [ - { name: "commission", type: "principal" }, - { name: "price", type: "uint128" }, - { name: "royalty", type: "uint128" }, - ], - }, - }, - }, - } as TypedAbiFunction< - [id: TypedAbiArg], - { - commission: string; - price: bigint; - royalty: bigint; - } | null - >, - getOwner: { - name: "get-owner", - access: "read_only", - args: [{ name: "token-id", type: "uint128" }], - outputs: { - type: { response: { ok: { optional: "principal" }, error: "none" } }, - }, - } as TypedAbiFunction< - [tokenId: TypedAbiArg], - Response - >, - getRoyaltyPercent: { - name: "get-royalty-percent", - access: "read_only", - args: [], - outputs: { type: { response: { ok: "uint128", error: "none" } } }, - } as TypedAbiFunction<[], Response>, - getTokenUri: { - name: "get-token-uri", - access: "read_only", - args: [{ name: "token-id", type: "uint128" }], - outputs: { - type: { - response: { - ok: { optional: { "string-ascii": { length: 71 } } }, - error: "none", - }, - }, - }, - } as TypedAbiFunction< - [tokenId: TypedAbiArg], - Response - >, - }, - maps: { - cids: { - name: "cids", - key: "uint128", - value: { "string-ascii": { length: 64 } }, - } as TypedAbiMap, - market: { - name: "market", - key: "uint128", - value: { - tuple: [ - { name: "commission", type: "principal" }, - { name: "price", type: "uint128" }, - { name: "royalty", type: "uint128" }, - ], - }, - } as TypedAbiMap< - number | bigint, - { - commission: string; - price: bigint; - royalty: bigint; - } - >, - tokenCount: { - name: "token-count", - key: "principal", - value: "uint128", - } as TypedAbiMap, - }, - variables: { - DEPLOYER: { - name: "DEPLOYER", - type: "principal", - access: "constant", - } as TypedAbiVariable, - ERR_CONTRACT_LOCKED: { - name: "ERR-CONTRACT-LOCKED", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_INVALID_PERCENTAGE: { - name: "ERR-INVALID-PERCENTAGE", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_INVALID_USER: { - name: "ERR-INVALID-USER", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_LISTING: { - name: "ERR-LISTING", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_METADATA_FROZEN: { - name: "ERR-METADATA-FROZEN", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_NFT_MINT: { - name: "ERR-NFT-MINT", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_NOT_AUTHORIZED: { - name: "ERR-NOT-AUTHORIZED", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_NOT_FOUND: { - name: "ERR-NOT-FOUND", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - ERR_WRONG_COMMISSION: { - name: "ERR-WRONG-COMMISSION", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - artistAddress: { - name: "artist-address", - type: "principal", - access: "variable", - } as TypedAbiVariable, - lastId: { - name: "last-id", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - licenseName: { - name: "license-name", - type: { - "string-ascii": { - length: 40, - }, - }, - access: "variable", - } as TypedAbiVariable, - licenseUri: { - name: "license-uri", - type: { - "string-ascii": { - length: 80, - }, - }, - access: "variable", - } as TypedAbiVariable, - locked: { - name: "locked", - type: "bool", - access: "variable", - } as TypedAbiVariable, - metadataFrozen: { - name: "metadata-frozen", - type: "bool", - access: "variable", - } as TypedAbiVariable, - royaltyPercent: { - name: "royalty-percent", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - }, - constants: {}, - non_fungible_tokens: [ - { name: "og-bitcoin-pizza-leather-edition", type: "uint128" }, - ], - fungible_tokens: [], - epoch: "Epoch25", - clarity_version: "Clarity2", - contractName: "og-bitcoin-pizza-leather-edition", - }, - ruleSetTrait: { - functions: {}, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "rule-set-trait", - }, - sip010TraitFtStandard: { - functions: {}, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity1", - contractName: "sip-010-trait-ft-standard", - }, - smartWallet: { - functions: { - isAllowedExtension: { - name: "is-allowed-extension", - access: "private", - args: [ - { name: "rules", type: "trait_reference" }, - { name: "extension", type: "trait_reference" }, - { name: "payload", type: { buffer: { length: 2048 } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - rules: TypedAbiArg, - extension: TypedAbiArg, - payload: TypedAbiArg - ], - Response - >, - isAllowedSip009: { - name: "is-allowed-sip009", - access: "private", - args: [ - { name: "sip009", type: "trait_reference" }, - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - sip009: TypedAbiArg, - amount: TypedAbiArg, - recipient: TypedAbiArg - ], - Response - >, - isAllowedSip010: { - name: "is-allowed-sip010", - access: "private", - args: [ - { name: "sip010", type: "trait_reference" }, - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - sip010: TypedAbiArg, - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - isAllowedStx: { - name: "is-allowed-stx", - access: "private", - args: [ - { name: "rules", type: "trait_reference" }, - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - rules: TypedAbiArg, - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - enableAdmin: { - name: "enable-admin", - access: "public", - args: [ - { name: "admin", type: "principal" }, - { name: "enabled", type: "bool" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - admin: TypedAbiArg, - enabled: TypedAbiArg - ], - Response - >, - extensionCall: { - name: "extension-call", - access: "public", - args: [ - { name: "extension", type: "trait_reference" }, - { name: "payload", type: { buffer: { length: 2048 } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - extension: TypedAbiArg, - payload: TypedAbiArg - ], - Response - >, - setSecurityLevel: { - name: "set-security-level", - access: "public", - args: [{ name: "new-level", type: "uint128" }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [newLevel: TypedAbiArg], - Response - >, - sip009Transfer: { - name: "sip009-transfer", - access: "public", - args: [ - { name: "nft-id", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "sip009", type: "trait_reference" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - nftId: TypedAbiArg, - recipient: TypedAbiArg, - sip009: TypedAbiArg - ], - Response - >, - sip010Transfer: { - name: "sip010-transfer", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - { name: "sip010", type: "trait_reference" }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg, - sip010: TypedAbiArg - ], - Response - >, - stxTransfer: { - name: "stx-transfer", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - currentRules: { - name: "current-rules", - access: "read_only", - args: [], - outputs: { type: "trait_reference" }, - } as TypedAbiFunction<[], string>, - getTime: { - name: "get-time", - access: "read_only", - args: [], - outputs: { type: "uint128" }, - } as TypedAbiFunction<[], bigint>, - getTxSponsor: { - name: "get-tx-sponsor", - access: "read_only", - args: [], - outputs: { type: { optional: "principal" } }, - } as TypedAbiFunction<[], string | null>, - isAdminCalling: { - name: "is-admin-calling", - access: "read_only", - args: [], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction<[], Response>, - isInactive: { - name: "is-inactive", - access: "read_only", - args: [], - outputs: { type: "bool" }, - } as TypedAbiFunction<[], boolean>, - toTrait: { - name: "to-trait", - access: "read_only", - args: [{ name: "trait", type: "trait_reference" }], - outputs: { type: "trait_reference" }, - } as TypedAbiFunction<[trait: TypedAbiArg], string>, - }, - maps: { - admins: { - name: "admins", - key: "principal", - value: "bool", - } as TypedAbiMap, - ruleSets: { - name: "rule-sets", - key: "principal", - value: "bool", - } as TypedAbiMap, - }, - variables: { - activityPeriod: { - name: "activity-period", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - errForbidden: { - name: "err-forbidden", - type: { - response: { - ok: "none", - error: "uint128", - }, - }, - access: "constant", - } as TypedAbiVariable>, - errUnauthorised: { - name: "err-unauthorised", - type: { - response: { - ok: "none", - error: "uint128", - }, - }, - access: "constant", - } as TypedAbiVariable>, - lastTxTime: { - name: "last-tx-time", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - securityLevel: { - name: "security-level", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - }, - constants: { - activityPeriod: 1_000n, - errForbidden: { - isOk: false, - value: 403n, - }, - errUnauthorised: { - isOk: false, - value: 401n, - }, - lastTxTime: 0n, - securityLevel: 1n, - }, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "smart-wallet", - }, - smartWalletEndpoint: { - functions: { - stxTransferSponsored: { - name: "stx-transfer-sponsored", - access: "public", - args: [ - { - name: "details", - type: { - tuple: [ - { name: "amount", type: "uint128" }, - { name: "fees", type: "uint128" }, - { name: "to", type: "principal" }, - ], - }, - }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - details: TypedAbiArg< - { - amount: number | bigint; - fees: number | bigint; - to: string; - }, - "details" - > - ], - Response - >, - }, - maps: {}, - variables: { - errInvalidPayload: { - name: "err-invalid-payload", - type: { - response: { - ok: "none", - error: "uint128", - }, - }, - access: "constant", - } as TypedAbiVariable>, - }, - constants: { - errInvalidPayload: { - isOk: false, - value: 5_000n, - }, - }, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "smart-wallet-endpoint", - }, - smartWalletTrait: { - functions: {}, - maps: {}, - variables: {}, - constants: {}, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "smart-wallet-trait", - }, - sponsoredTransfer: { - functions: { - call: { - name: "call", - access: "public", - args: [{ name: "payload", type: { buffer: { length: 2048 } } }], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [payload: TypedAbiArg], - Response - >, - }, - maps: {}, - variables: { - errInvalidPayload: { - name: "err-invalid-payload", - type: { - response: { - ok: "none", - error: "uint128", - }, - }, - access: "constant", - } as TypedAbiVariable>, - }, - constants: { - errInvalidPayload: { - isOk: false, - value: 500n, - }, - }, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "sponsored-transfer", - }, - standardRules: { - functions: { - isAllowedExtension: { - name: "is-allowed-extension", - access: "public", - args: [ - { name: "extension", type: "trait_reference" }, - { name: "payload", type: { buffer: { length: 2048 } } }, - ], - outputs: { type: { response: { ok: "bool", error: "none" } } }, - } as TypedAbiFunction< - [ - extension: TypedAbiArg, - payload: TypedAbiArg - ], - Response - >, - isAllowedStx: { - name: "is-allowed-stx", - access: "public", - args: [ - { name: "amount", type: "uint128" }, - { name: "recipient", type: "principal" }, - { name: "memo", type: { optional: { buffer: { length: 34 } } } }, - ], - outputs: { type: { response: { ok: "bool", error: "uint128" } } }, - } as TypedAbiFunction< - [ - amount: TypedAbiArg, - recipient: TypedAbiArg, - memo: TypedAbiArg - ], - Response - >, - }, - maps: {}, - variables: { - e6: { - name: "E6", - type: "uint128", - access: "constant", - } as TypedAbiVariable, - errUnauthorised: { - name: "err-unauthorised", - type: { - response: { - ok: "none", - error: "uint128", - }, - }, - access: "constant", - } as TypedAbiVariable>, - weeklyAmount: { - name: "weekly-amount", - type: "uint128", - access: "variable", - } as TypedAbiVariable, - }, - constants: { - e6: 1_000_000n, - errUnauthorised: { - isOk: false, - value: 401n, - }, - weeklyAmount: 0n, - }, - non_fungible_tokens: [], - fungible_tokens: [], - epoch: "Epoch21", - clarity_version: "Clarity2", - contractName: "standard-rules", - }, + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'commission-trait', + }, +emergencyRules: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'emergency-rules', + }, +extAllowContractCallerPox4: { + "functions": { + call: {"name":"call","access":"public","args":[{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[payload: TypedAbiArg], Response>, + toUintResponse: {"name":"to-uint-response","access":"read_only","args":[{"name":"res","type":{"response":{"ok":"bool","error":"int128"}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[res: TypedAbiArg, "res">], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 500n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch25","clarity_version":"Clarity2", + contractName: 'ext-allow-contract-caller-pox-4', + }, +extDelegateStxPox4: { + "functions": { + call: {"name":"call","access":"public","args":[{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[payload: TypedAbiArg], Response>, + toUintResponse: {"name":"to-uint-response","access":"read_only","args":[{"name":"res","type":{"response":{"ok":"bool","error":"int128"}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[res: TypedAbiArg, "res">], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 500n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch25","clarity_version":"Clarity2", + contractName: 'ext-delegate-stx-pox-4', + }, +extensionTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'extension-trait', + }, +inactiveObserver: { + "functions": { + closeSmartWallet: {"name":"close-smart-wallet","access":"public","args":[{"name":"wallet","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[wallet: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'inactive-observer', + }, +microNthng: { + "functions": { + mint_x: {"name":"mint!","access":"private","args":[{"name":"account","type":"principal"},{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[account: TypedAbiArg, amount: TypedAbiArg], Response>, + transfer: {"name":"transfer","access":"public","args":[{"name":"to","type":"principal"},{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[to: TypedAbiArg, amount: TypedAbiArg], Response>, + getTotalSupply: {"name":"get-total-supply","access":"read_only","args":[],"outputs":{"type":"uint128"}} as TypedAbiFunction<[], bigint> + }, + "maps": { + + }, + "variables": { + totalSupply: { + name: 'total-supply', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[{"name":"micro-nothing"}],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'micro-nthng', + }, +nftTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'nft-trait', + }, +noRules: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'no-rules', + }, +nope: { + "functions": { + checkErr: {"name":"check-err","access":"private","args":[{"name":"result","type":{"response":{"ok":"bool","error":"uint128"}}},{"name":"prior","type":{"response":{"ok":"bool","error":"uint128"}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[result: TypedAbiArg, "result">, prior: TypedAbiArg, "prior">], Response>, + sendNothingUnwrap: {"name":"send-nothing-unwrap","access":"private","args":[{"name":"recipient","type":{"tuple":[{"name":"amount","type":"uint128"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"to","type":"principal"}]}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[recipient: TypedAbiArg<{ + "amount": number | bigint; + "memo": Uint8Array | null; + "to": string; +}, "recipient">], Response>, + updateThresholdState: {"name":"update-threshold-state","access":"private","args":[],"outputs":{"type":"bool"}} as TypedAbiFunction<[], boolean>, + sendMany: {"name":"send-many","access":"public","args":[{"name":"recipients","type":{"list":{"type":{"tuple":[{"name":"amount","type":"uint128"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"to","type":"principal"}]},"length":200}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[recipients: TypedAbiArg<{ + "amount": number | bigint; + "memo": Uint8Array | null; + "to": string; +}[], "recipients">], Response>, + sendNothing: {"name":"send-nothing","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"to","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, to: TypedAbiArg, memo: TypedAbiArg], Response>, + setAdmin: {"name":"set-admin","access":"public","args":[{"name":"new-admin","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[newAdmin: TypedAbiArg], Response>, + setMetadata: {"name":"set-metadata","access":"public","args":[{"name":"uri","type":{"optional":{"string-utf8":{"length":256}}}},{"name":"name","type":{"string-ascii":{"length":32}}},{"name":"symbol","type":{"string-ascii":{"length":32}}},{"name":"decimals","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[uri: TypedAbiArg, name: TypedAbiArg, symbol: TypedAbiArg, decimals: TypedAbiArg], Response>, + transfer: {"name":"transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"from","type":"principal"},{"name":"to","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, from: TypedAbiArg, to: TypedAbiArg, memo: TypedAbiArg], Response>, + unwrap: {"name":"unwrap","access":"public","args":[{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg], Response>, + wrapNthng: {"name":"wrap-nthng","access":"public","args":[{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg], Response>, + getBalance: {"name":"get-balance","access":"read_only","args":[{"name":"user","type":"principal"}],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[user: TypedAbiArg], Response>, + getDecimals: {"name":"get-decimals","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + getName: {"name":"get-name","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":32}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getSymbol: {"name":"get-symbol","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":32}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getTokenUri: {"name":"get-token-uri","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"optional":{"string-utf8":{"length":256}}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getTotalSupply: {"name":"get-total-supply","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + isSafeToWrap: {"name":"is-safe-to-wrap","access":"read_only","args":[{"name":"amount","type":"uint128"},{"name":"wrapper","type":"principal"}],"outputs":{"type":"bool"}} as TypedAbiFunction<[amount: TypedAbiArg, wrapper: TypedAbiArg], boolean> + }, + "maps": { + + }, + "variables": { + ERR_INVALID_PARAMS: { + name: 'ERR-INVALID-PARAMS', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_UNAUTHORIZED: { + name: 'ERR-UNAUTHORIZED', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_YOU_POOR: { + name: 'ERR-YOU-POOR', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + MAX_SUPPLY: { + name: 'MAX-SUPPLY', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + WRAP_THRESHOLD: { + name: 'WRAP-THRESHOLD', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + contractAdmin: { + name: 'contract-admin', + type: 'principal', + access: 'variable' +} as TypedAbiVariable, + isThresholdReached: { + name: 'is-threshold-reached', + type: 'bool', + access: 'variable' +} as TypedAbiVariable, + tokenDecimals: { + name: 'token-decimals', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable, + tokenName: { + name: 'token-name', + type: { + 'string-ascii': { + length: 32 + } + }, + access: 'variable' +} as TypedAbiVariable, + tokenSymbol: { + name: 'token-symbol', + type: { + 'string-ascii': { + length: 32 + } + }, + access: 'variable' +} as TypedAbiVariable, + tokenUri: { + name: 'token-uri', + type: { + optional: { + 'string-utf8': { + length: 256 + } + } + }, + access: 'variable' +} as TypedAbiVariable + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[{"name":"NOT"}],"epoch":"Epoch24","clarity_version":"Clarity2", + contractName: 'nope', + }, +ogBitcoinPizzaLeatherEdition: { + "functions": { + isOwner: {"name":"is-owner","access":"private","args":[{"name":"token-id","type":"uint128"},{"name":"user","type":"principal"}],"outputs":{"type":"bool"}} as TypedAbiFunction<[tokenId: TypedAbiArg, user: TypedAbiArg], boolean>, + isSenderOwner: {"name":"is-sender-owner","access":"private","args":[{"name":"id","type":"uint128"}],"outputs":{"type":"bool"}} as TypedAbiFunction<[id: TypedAbiArg], boolean>, + mintMany: {"name":"mint-many","access":"private","args":[{"name":"uris","type":{"list":{"type":{"string-ascii":{"length":64}},"length":25}}}],"outputs":{"type":{"response":{"ok":"uint128","error":"uint128"}}}} as TypedAbiFunction<[uris: TypedAbiArg], Response>, + mintManyIter: {"name":"mint-many-iter","access":"private","args":[{"name":"hash","type":{"string-ascii":{"length":64}}},{"name":"next-id","type":"uint128"}],"outputs":{"type":"uint128"}} as TypedAbiFunction<[hash: TypedAbiArg, nextId: TypedAbiArg], bigint>, + payRoyalty: {"name":"pay-royalty","access":"private","args":[{"name":"price","type":"uint128"},{"name":"royalty","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[price: TypedAbiArg, royalty: TypedAbiArg], Response>, + trnsfr: {"name":"trnsfr","access":"private","args":[{"name":"id","type":"uint128"},{"name":"sender","type":"principal"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, sender: TypedAbiArg, recipient: TypedAbiArg], Response>, + burn: {"name":"burn","access":"public","args":[{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[tokenId: TypedAbiArg], Response>, + buyInUstx: {"name":"buy-in-ustx","access":"public","args":[{"name":"id","type":"uint128"},{"name":"comm-trait","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, commTrait: TypedAbiArg], Response>, + claim: {"name":"claim","access":"public","args":[{"name":"uris","type":{"list":{"type":{"string-ascii":{"length":64}},"length":25}}}],"outputs":{"type":{"response":{"ok":"uint128","error":"uint128"}}}} as TypedAbiFunction<[uris: TypedAbiArg], Response>, + freezeMetadata: {"name":"freeze-metadata","access":"public","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response>, + listInUstx: {"name":"list-in-ustx","access":"public","args":[{"name":"id","type":"uint128"},{"name":"price","type":"uint128"},{"name":"comm-trait","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, price: TypedAbiArg, commTrait: TypedAbiArg], Response>, + lockContract: {"name":"lock-contract","access":"public","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response>, + setArtistAddress: {"name":"set-artist-address","access":"public","args":[{"name":"address","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[address: TypedAbiArg], Response>, + setLicenseName: {"name":"set-license-name","access":"public","args":[{"name":"name","type":{"string-ascii":{"length":40}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[name: TypedAbiArg], Response>, + setLicenseUri: {"name":"set-license-uri","access":"public","args":[{"name":"uri","type":{"string-ascii":{"length":80}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[uri: TypedAbiArg], Response>, + setRoyaltyPercent: {"name":"set-royalty-percent","access":"public","args":[{"name":"royalty","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[royalty: TypedAbiArg], Response>, + setTokenUri: {"name":"set-token-uri","access":"public","args":[{"name":"hash","type":{"string-ascii":{"length":64}}},{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[hash: TypedAbiArg, tokenId: TypedAbiArg], Response>, + transfer: {"name":"transfer","access":"public","args":[{"name":"id","type":"uint128"},{"name":"sender","type":"principal"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, sender: TypedAbiArg, recipient: TypedAbiArg], Response>, + unlistInUstx: {"name":"unlist-in-ustx","access":"public","args":[{"name":"id","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg], Response>, + getArtistAddress: {"name":"get-artist-address","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"principal","error":"none"}}}} as TypedAbiFunction<[], Response>, + getBalance: {"name":"get-balance","access":"read_only","args":[{"name":"account","type":"principal"}],"outputs":{"type":"uint128"}} as TypedAbiFunction<[account: TypedAbiArg], bigint>, + getLastTokenId: {"name":"get-last-token-id","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + getLicenseName: {"name":"get-license-name","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":40}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getLicenseUri: {"name":"get-license-uri","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":80}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getListingInUstx: {"name":"get-listing-in-ustx","access":"read_only","args":[{"name":"id","type":"uint128"}],"outputs":{"type":{"optional":{"tuple":[{"name":"commission","type":"principal"},{"name":"price","type":"uint128"},{"name":"royalty","type":"uint128"}]}}}} as TypedAbiFunction<[id: TypedAbiArg], { + "commission": string; + "price": bigint; + "royalty": bigint; +} | null>, + getOwner: {"name":"get-owner","access":"read_only","args":[{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":{"optional":"principal"},"error":"none"}}}} as TypedAbiFunction<[tokenId: TypedAbiArg], Response>, + getRoyaltyPercent: {"name":"get-royalty-percent","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + getTokenUri: {"name":"get-token-uri","access":"read_only","args":[{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":{"optional":{"string-ascii":{"length":71}}},"error":"none"}}}} as TypedAbiFunction<[tokenId: TypedAbiArg], Response> + }, + "maps": { + cids: {"name":"cids","key":"uint128","value":{"string-ascii":{"length":64}}} as TypedAbiMap, + market: {"name":"market","key":"uint128","value":{"tuple":[{"name":"commission","type":"principal"},{"name":"price","type":"uint128"},{"name":"royalty","type":"uint128"}]}} as TypedAbiMap, + tokenCount: {"name":"token-count","key":"principal","value":"uint128"} as TypedAbiMap + }, + "variables": { + DEPLOYER: { + name: 'DEPLOYER', + type: 'principal', + access: 'constant' +} as TypedAbiVariable, + ERR_CONTRACT_LOCKED: { + name: 'ERR-CONTRACT-LOCKED', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_INVALID_PERCENTAGE: { + name: 'ERR-INVALID-PERCENTAGE', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_INVALID_USER: { + name: 'ERR-INVALID-USER', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_LISTING: { + name: 'ERR-LISTING', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_METADATA_FROZEN: { + name: 'ERR-METADATA-FROZEN', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_NFT_MINT: { + name: 'ERR-NFT-MINT', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_NOT_AUTHORIZED: { + name: 'ERR-NOT-AUTHORIZED', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_NOT_FOUND: { + name: 'ERR-NOT-FOUND', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_WRONG_COMMISSION: { + name: 'ERR-WRONG-COMMISSION', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + artistAddress: { + name: 'artist-address', + type: 'principal', + access: 'variable' +} as TypedAbiVariable, + lastId: { + name: 'last-id', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable, + licenseName: { + name: 'license-name', + type: { + 'string-ascii': { + length: 40 + } + }, + access: 'variable' +} as TypedAbiVariable, + licenseUri: { + name: 'license-uri', + type: { + 'string-ascii': { + length: 80 + } + }, + access: 'variable' +} as TypedAbiVariable, + locked: { + name: 'locked', + type: 'bool', + access: 'variable' +} as TypedAbiVariable, + metadataFrozen: { + name: 'metadata-frozen', + type: 'bool', + access: 'variable' +} as TypedAbiVariable, + royaltyPercent: { + name: 'royalty-percent', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: {}, + "non_fungible_tokens": [ + {"name":"og-bitcoin-pizza-leather-edition","type":"uint128"} + ], + "fungible_tokens":[],"epoch":"Epoch25","clarity_version":"Clarity2", + contractName: 'og-bitcoin-pizza-leather-edition', + }, +ruleSetTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'rule-set-trait', + }, +sip010TraitFtStandard: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'sip-010-trait-ft-standard', + }, +smartWallet: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"private","args":[{"name":"rules","type":"trait_reference"},{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[rules: TypedAbiArg, extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedSip009: {"name":"is-allowed-sip009","access":"private","args":[{"name":"sip009","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip009: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg], Response>, + isAllowedSip010: {"name":"is-allowed-sip010","access":"private","args":[{"name":"sip010","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip010: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"private","args":[{"name":"rules","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[rules: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + enableAdmin: {"name":"enable-admin","access":"public","args":[{"name":"admin","type":"principal"},{"name":"enabled","type":"bool"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[admin: TypedAbiArg, enabled: TypedAbiArg], Response>, + extensionCall: {"name":"extension-call","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + setSecurityLevel: {"name":"set-security-level","access":"public","args":[{"name":"new-level","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[newLevel: TypedAbiArg], Response>, + sip009Transfer: {"name":"sip009-transfer","access":"public","args":[{"name":"nft-id","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"sip009","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[nftId: TypedAbiArg, recipient: TypedAbiArg, sip009: TypedAbiArg], Response>, + sip010Transfer: {"name":"sip010-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"sip010","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg, sip010: TypedAbiArg], Response>, + stxTransfer: {"name":"stx-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + currentRules: {"name":"current-rules","access":"read_only","args":[],"outputs":{"type":"trait_reference"}} as TypedAbiFunction<[], string>, + getTime: {"name":"get-time","access":"read_only","args":[],"outputs":{"type":"uint128"}} as TypedAbiFunction<[], bigint>, + isAdminCalling: {"name":"is-admin-calling","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response>, + isInactive: {"name":"is-inactive","access":"read_only","args":[],"outputs":{"type":"bool"}} as TypedAbiFunction<[], boolean>, + toTrait: {"name":"to-trait","access":"read_only","args":[{"name":"trait","type":"trait_reference"}],"outputs":{"type":"trait_reference"}} as TypedAbiFunction<[trait: TypedAbiArg], string> + }, + "maps": { + admins: {"name":"admins","key":"principal","value":"bool"} as TypedAbiMap, + ruleSets: {"name":"rule-sets","key":"principal","value":"bool"} as TypedAbiMap + }, + "variables": { + activityPeriod: { + name: 'activity-period', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + errForbidden: { + name: 'err-forbidden', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + errUnauthorised: { + name: 'err-unauthorised', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + lastTxTime: { + name: 'last-tx-time', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable, + securityLevel: { + name: 'security-level', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: { + activityPeriod: 1_000n, + errForbidden: { + isOk: false, + value: 403n + }, + errUnauthorised: { + isOk: false, + value: 401n + }, + lastTxTime: 0n, + securityLevel: 1n +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet', + }, +smartWalletEndpoint: { + "functions": { + stxTransferSponsored: {"name":"stx-transfer-sponsored","access":"public","args":[{"name":"details","type":{"tuple":[{"name":"amount","type":"uint128"},{"name":"fees","type":"uint128"},{"name":"to","type":"principal"}]}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[details: TypedAbiArg<{ + "amount": number | bigint; + "fees": number | bigint; + "to": string; +}, "details">], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 5_000n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet-endpoint', + }, +smartWalletStandard: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"private","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedSip009: {"name":"is-allowed-sip009","access":"private","args":[{"name":"sip009","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip009: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg], Response>, + isAllowedSip010: {"name":"is-allowed-sip010","access":"private","args":[{"name":"sip010","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip010: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"private","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + enableAdmin: {"name":"enable-admin","access":"public","args":[{"name":"admin","type":"principal"},{"name":"enabled","type":"bool"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[admin: TypedAbiArg, enabled: TypedAbiArg], Response>, + extensionCall: {"name":"extension-call","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + sip009Transfer: {"name":"sip009-transfer","access":"public","args":[{"name":"nft-id","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"sip009","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[nftId: TypedAbiArg, recipient: TypedAbiArg, sip009: TypedAbiArg], Response>, + sip010Transfer: {"name":"sip010-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"sip010","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg, sip010: TypedAbiArg], Response>, + stxTransfer: {"name":"stx-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + transferWallet: {"name":"transfer-wallet","access":"public","args":[{"name":"new-admin","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[newAdmin: TypedAbiArg], Response>, + isAdminCalling: {"name":"is-admin-calling","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response> + }, + "maps": { + admins: {"name":"admins","key":"principal","value":"bool"} as TypedAbiMap + }, + "variables": { + errForbidden: { + name: 'err-forbidden', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + errUnauthorised: { + name: 'err-unauthorised', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errForbidden: { + isOk: false, + value: 403n + }, + errUnauthorised: { + isOk: false, + value: 401n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet-standard', + }, +smartWalletTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet-trait', + }, +sponsoredTransfer: { + "functions": { + call: {"name":"call","access":"public","args":[{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[payload: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 500n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'sponsored-transfer', + }, +standardRules: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + getWeeklyAmount: {"name":"get-weekly-amount","access":"read_only","args":[],"outputs":{"type":"uint128"}} as TypedAbiFunction<[], bigint> + }, + "maps": { + + }, + "variables": { + e6: { + name: 'E6', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + errUnauthorised: { + name: 'err-unauthorised', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + weeklyAmount: { + name: 'weekly-amount', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: { + e6: 1_000_000n, + errUnauthorised: { + isOk: false, + value: 401n + }, + weeklyAmount: 0n +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'standard-rules', + } } as const; -export const accounts = { - deployer: { - address: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM", - balance: "99999999999000", - }, - faucet: { - address: "STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6", - balance: "100000000000000", - }, - wallet_1: { - address: "ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5", - balance: "100000000000000", - }, - wallet_2: { - address: "ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG", - balance: "100000000000000", - }, - wallet_3: { - address: "ST2JHG361ZXG51QTKY2NQCVBPPRRE2KZB1HR05NNC", - balance: "100000000000000", - }, - wallet_4: { - address: "ST2NEB84ASENDXKYGJPQW86YXQCEFEX2ZQPG87ND", - balance: "100000000000000", - }, - wallet_5: { - address: "ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB", - balance: "100000000000000", - }, - wallet_6: { - address: "ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0", - balance: "100000000000000", - }, - wallet_7: { - address: "ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ", - balance: "100000000000000", - }, - wallet_8: { - address: "ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP", - balance: "100000000000000", - }, -} as const; +export const accounts = {"deployer":{"address":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","balance":"99999999999000"},"faucet":{"address":"STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6","balance":"100000000000000"},"wallet_1":{"address":"ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5","balance":"100000000000000"},"wallet_2":{"address":"ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG","balance":"100000000000000"},"wallet_3":{"address":"ST2JHG361ZXG51QTKY2NQCVBPPRRE2KZB1HR05NNC","balance":"100000000000000"},"wallet_4":{"address":"ST2NEB84ASENDXKYGJPQW86YXQCEFEX2ZQPG87ND","balance":"100000000000000"},"wallet_5":{"address":"ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB","balance":"100000000000000"},"wallet_6":{"address":"ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0","balance":"100000000000000"},"wallet_7":{"address":"ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ","balance":"100000000000000"},"wallet_8":{"address":"ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP","balance":"100000000000000"}} as const; -export const identifiers = { - commissionTrait: "SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait", - emergencyRules: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules", - extensionTrait: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait", - inactiveObserver: - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer", - microNthng: "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng", - nftTrait: "SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait", - noRules: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules", - nope: "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope", - ogBitcoinPizzaLeatherEdition: - "SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition", - ruleSetTrait: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait", - sip010TraitFtStandard: - "SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard", - smartWallet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet", - smartWalletEndpoint: - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint", - smartWalletTrait: - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait", - sponsoredTransfer: - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer", - standardRules: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules", -} as const; +export const identifiers = {"commissionTrait":"SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait","emergencyRules":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules","extAllowContractCallerPox4":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-allow-contract-caller-pox-4","extDelegateStxPox4":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-delegate-stx-pox-4","extensionTrait":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait","inactiveObserver":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer","microNthng":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng","nftTrait":"SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait","noRules":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules","nope":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope","ogBitcoinPizzaLeatherEdition":"SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition","ruleSetTrait":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait","sip010TraitFtStandard":"SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard","smartWallet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet","smartWalletEndpoint":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint","smartWalletStandard":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-standard","smartWalletTrait":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait","sponsoredTransfer":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer","standardRules":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules"} as const export const simnet = { accounts, @@ -1542,112 +755,11 @@ export const simnet = { identifiers, } as const; -export const deployments = { - commissionTrait: { - devnet: "SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait", - simnet: "SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait", - testnet: null, - mainnet: null, - }, - emergencyRules: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules", - testnet: null, - mainnet: null, - }, - extensionTrait: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait", - testnet: null, - mainnet: null, - }, - inactiveObserver: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer", - testnet: null, - mainnet: null, - }, - microNthng: { - devnet: "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng", - simnet: "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng", - testnet: null, - mainnet: null, - }, - nftTrait: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.nft-trait", - simnet: "SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait", - testnet: null, - mainnet: "SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait", - }, - noRules: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules", - testnet: null, - mainnet: null, - }, - nope: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.nope", - simnet: "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope", - testnet: null, - mainnet: "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope", - }, - ogBitcoinPizzaLeatherEdition: { - devnet: - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.og-bitcoin-pizza-leather-edition", - simnet: - "SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition", - testnet: null, - mainnet: - "SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition", - }, - ruleSetTrait: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait", - testnet: null, - mainnet: null, - }, - sip010TraitFtStandard: { - devnet: - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sip-010-trait-ft-standard", - simnet: - "SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard", - testnet: null, - mainnet: - "SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard", - }, - smartWallet: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet", - testnet: null, - mainnet: null, - }, - smartWalletEndpoint: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint", - testnet: null, - mainnet: null, - }, - smartWalletTrait: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait", - testnet: null, - mainnet: null, - }, - sponsoredTransfer: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer", - testnet: null, - mainnet: null, - }, - standardRules: { - devnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules", - simnet: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules", - testnet: null, - mainnet: null, - }, -} as const; + +export const deployments = {"commissionTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.commission-trait","simnet":"SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait","testnet":null,"mainnet":null},"emergencyRules":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules","testnet":null,"mainnet":null},"extAllowContractCallerPox4":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-allow-contract-caller-pox-4","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-allow-contract-caller-pox-4","testnet":null,"mainnet":null},"extDelegateStxPox4":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-delegate-stx-pox-4","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-delegate-stx-pox-4","testnet":null,"mainnet":null},"extensionTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait","testnet":null,"mainnet":null},"inactiveObserver":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer","testnet":null,"mainnet":null},"microNthng":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.micro-nthng","simnet":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng","testnet":null,"mainnet":null},"nftTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.nft-trait","simnet":"SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait","testnet":null,"mainnet":"SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait"},"noRules":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules","testnet":null,"mainnet":null},"nope":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.nope","simnet":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope","testnet":null,"mainnet":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope"},"ogBitcoinPizzaLeatherEdition":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.og-bitcoin-pizza-leather-edition","simnet":"SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition","testnet":null,"mainnet":"SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition"},"ruleSetTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait","testnet":null,"mainnet":null},"sip010TraitFtStandard":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sip-010-trait-ft-standard","simnet":"SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard","testnet":null,"mainnet":"SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard"},"smartWallet":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet","testnet":null,"mainnet":null},"smartWalletEndpoint":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint","testnet":null,"mainnet":null},"smartWalletStandard":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-standard","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-standard","testnet":null,"mainnet":null},"smartWalletTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait","testnet":null,"mainnet":null},"sponsoredTransfer":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer","testnet":null,"mainnet":null},"standardRules":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules","testnet":null,"mainnet":null}} as const; export const project = { contracts, deployments, } as const; + \ No newline at end of file diff --git a/test/clarigen-types.ts b/test/clarigen-types.ts new file mode 100644 index 0000000..688b049 --- /dev/null +++ b/test/clarigen-types.ts @@ -0,0 +1,765 @@ + +import type { TypedAbiArg, TypedAbiFunction, TypedAbiMap, TypedAbiVariable, Response } from '@clarigen/core'; + +export const contracts = { + commissionTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'commission-trait', + }, +emergencyRules: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'emergency-rules', + }, +extAllowContractCallerPox4: { + "functions": { + call: {"name":"call","access":"public","args":[{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[payload: TypedAbiArg], Response>, + toUintResponse: {"name":"to-uint-response","access":"read_only","args":[{"name":"res","type":{"response":{"ok":"bool","error":"int128"}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[res: TypedAbiArg, "res">], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 500n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch25","clarity_version":"Clarity2", + contractName: 'ext-allow-contract-caller-pox-4', + }, +extDelegateStxPox4: { + "functions": { + call: {"name":"call","access":"public","args":[{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[payload: TypedAbiArg], Response>, + toUintResponse: {"name":"to-uint-response","access":"read_only","args":[{"name":"res","type":{"response":{"ok":"bool","error":"int128"}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[res: TypedAbiArg, "res">], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 500n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch25","clarity_version":"Clarity2", + contractName: 'ext-delegate-stx-pox-4', + }, +extensionTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'extension-trait', + }, +inactiveObserver: { + "functions": { + closeSmartWallet: {"name":"close-smart-wallet","access":"public","args":[{"name":"wallet","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[wallet: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'inactive-observer', + }, +microNthng: { + "functions": { + mint_x: {"name":"mint!","access":"private","args":[{"name":"account","type":"principal"},{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[account: TypedAbiArg, amount: TypedAbiArg], Response>, + transfer: {"name":"transfer","access":"public","args":[{"name":"to","type":"principal"},{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[to: TypedAbiArg, amount: TypedAbiArg], Response>, + getTotalSupply: {"name":"get-total-supply","access":"read_only","args":[],"outputs":{"type":"uint128"}} as TypedAbiFunction<[], bigint> + }, + "maps": { + + }, + "variables": { + totalSupply: { + name: 'total-supply', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[{"name":"micro-nothing"}],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'micro-nthng', + }, +nftTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'nft-trait', + }, +noRules: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'no-rules', + }, +nope: { + "functions": { + checkErr: {"name":"check-err","access":"private","args":[{"name":"result","type":{"response":{"ok":"bool","error":"uint128"}}},{"name":"prior","type":{"response":{"ok":"bool","error":"uint128"}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[result: TypedAbiArg, "result">, prior: TypedAbiArg, "prior">], Response>, + sendNothingUnwrap: {"name":"send-nothing-unwrap","access":"private","args":[{"name":"recipient","type":{"tuple":[{"name":"amount","type":"uint128"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"to","type":"principal"}]}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[recipient: TypedAbiArg<{ + "amount": number | bigint; + "memo": Uint8Array | null; + "to": string; +}, "recipient">], Response>, + updateThresholdState: {"name":"update-threshold-state","access":"private","args":[],"outputs":{"type":"bool"}} as TypedAbiFunction<[], boolean>, + sendMany: {"name":"send-many","access":"public","args":[{"name":"recipients","type":{"list":{"type":{"tuple":[{"name":"amount","type":"uint128"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"to","type":"principal"}]},"length":200}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[recipients: TypedAbiArg<{ + "amount": number | bigint; + "memo": Uint8Array | null; + "to": string; +}[], "recipients">], Response>, + sendNothing: {"name":"send-nothing","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"to","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, to: TypedAbiArg, memo: TypedAbiArg], Response>, + setAdmin: {"name":"set-admin","access":"public","args":[{"name":"new-admin","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[newAdmin: TypedAbiArg], Response>, + setMetadata: {"name":"set-metadata","access":"public","args":[{"name":"uri","type":{"optional":{"string-utf8":{"length":256}}}},{"name":"name","type":{"string-ascii":{"length":32}}},{"name":"symbol","type":{"string-ascii":{"length":32}}},{"name":"decimals","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[uri: TypedAbiArg, name: TypedAbiArg, symbol: TypedAbiArg, decimals: TypedAbiArg], Response>, + transfer: {"name":"transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"from","type":"principal"},{"name":"to","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, from: TypedAbiArg, to: TypedAbiArg, memo: TypedAbiArg], Response>, + unwrap: {"name":"unwrap","access":"public","args":[{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg], Response>, + wrapNthng: {"name":"wrap-nthng","access":"public","args":[{"name":"amount","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg], Response>, + getBalance: {"name":"get-balance","access":"read_only","args":[{"name":"user","type":"principal"}],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[user: TypedAbiArg], Response>, + getDecimals: {"name":"get-decimals","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + getName: {"name":"get-name","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":32}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getSymbol: {"name":"get-symbol","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":32}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getTokenUri: {"name":"get-token-uri","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"optional":{"string-utf8":{"length":256}}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getTotalSupply: {"name":"get-total-supply","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + isSafeToWrap: {"name":"is-safe-to-wrap","access":"read_only","args":[{"name":"amount","type":"uint128"},{"name":"wrapper","type":"principal"}],"outputs":{"type":"bool"}} as TypedAbiFunction<[amount: TypedAbiArg, wrapper: TypedAbiArg], boolean> + }, + "maps": { + + }, + "variables": { + ERR_INVALID_PARAMS: { + name: 'ERR-INVALID-PARAMS', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_UNAUTHORIZED: { + name: 'ERR-UNAUTHORIZED', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_YOU_POOR: { + name: 'ERR-YOU-POOR', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + MAX_SUPPLY: { + name: 'MAX-SUPPLY', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + WRAP_THRESHOLD: { + name: 'WRAP-THRESHOLD', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + contractAdmin: { + name: 'contract-admin', + type: 'principal', + access: 'variable' +} as TypedAbiVariable, + isThresholdReached: { + name: 'is-threshold-reached', + type: 'bool', + access: 'variable' +} as TypedAbiVariable, + tokenDecimals: { + name: 'token-decimals', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable, + tokenName: { + name: 'token-name', + type: { + 'string-ascii': { + length: 32 + } + }, + access: 'variable' +} as TypedAbiVariable, + tokenSymbol: { + name: 'token-symbol', + type: { + 'string-ascii': { + length: 32 + } + }, + access: 'variable' +} as TypedAbiVariable, + tokenUri: { + name: 'token-uri', + type: { + optional: { + 'string-utf8': { + length: 256 + } + } + }, + access: 'variable' +} as TypedAbiVariable + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[{"name":"NOT"}],"epoch":"Epoch24","clarity_version":"Clarity2", + contractName: 'nope', + }, +ogBitcoinPizzaLeatherEdition: { + "functions": { + isOwner: {"name":"is-owner","access":"private","args":[{"name":"token-id","type":"uint128"},{"name":"user","type":"principal"}],"outputs":{"type":"bool"}} as TypedAbiFunction<[tokenId: TypedAbiArg, user: TypedAbiArg], boolean>, + isSenderOwner: {"name":"is-sender-owner","access":"private","args":[{"name":"id","type":"uint128"}],"outputs":{"type":"bool"}} as TypedAbiFunction<[id: TypedAbiArg], boolean>, + mintMany: {"name":"mint-many","access":"private","args":[{"name":"uris","type":{"list":{"type":{"string-ascii":{"length":64}},"length":25}}}],"outputs":{"type":{"response":{"ok":"uint128","error":"uint128"}}}} as TypedAbiFunction<[uris: TypedAbiArg], Response>, + mintManyIter: {"name":"mint-many-iter","access":"private","args":[{"name":"hash","type":{"string-ascii":{"length":64}}},{"name":"next-id","type":"uint128"}],"outputs":{"type":"uint128"}} as TypedAbiFunction<[hash: TypedAbiArg, nextId: TypedAbiArg], bigint>, + payRoyalty: {"name":"pay-royalty","access":"private","args":[{"name":"price","type":"uint128"},{"name":"royalty","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[price: TypedAbiArg, royalty: TypedAbiArg], Response>, + trnsfr: {"name":"trnsfr","access":"private","args":[{"name":"id","type":"uint128"},{"name":"sender","type":"principal"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, sender: TypedAbiArg, recipient: TypedAbiArg], Response>, + burn: {"name":"burn","access":"public","args":[{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[tokenId: TypedAbiArg], Response>, + buyInUstx: {"name":"buy-in-ustx","access":"public","args":[{"name":"id","type":"uint128"},{"name":"comm-trait","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, commTrait: TypedAbiArg], Response>, + claim: {"name":"claim","access":"public","args":[{"name":"uris","type":{"list":{"type":{"string-ascii":{"length":64}},"length":25}}}],"outputs":{"type":{"response":{"ok":"uint128","error":"uint128"}}}} as TypedAbiFunction<[uris: TypedAbiArg], Response>, + freezeMetadata: {"name":"freeze-metadata","access":"public","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response>, + listInUstx: {"name":"list-in-ustx","access":"public","args":[{"name":"id","type":"uint128"},{"name":"price","type":"uint128"},{"name":"comm-trait","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, price: TypedAbiArg, commTrait: TypedAbiArg], Response>, + lockContract: {"name":"lock-contract","access":"public","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response>, + setArtistAddress: {"name":"set-artist-address","access":"public","args":[{"name":"address","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[address: TypedAbiArg], Response>, + setLicenseName: {"name":"set-license-name","access":"public","args":[{"name":"name","type":{"string-ascii":{"length":40}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[name: TypedAbiArg], Response>, + setLicenseUri: {"name":"set-license-uri","access":"public","args":[{"name":"uri","type":{"string-ascii":{"length":80}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[uri: TypedAbiArg], Response>, + setRoyaltyPercent: {"name":"set-royalty-percent","access":"public","args":[{"name":"royalty","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[royalty: TypedAbiArg], Response>, + setTokenUri: {"name":"set-token-uri","access":"public","args":[{"name":"hash","type":{"string-ascii":{"length":64}}},{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[hash: TypedAbiArg, tokenId: TypedAbiArg], Response>, + transfer: {"name":"transfer","access":"public","args":[{"name":"id","type":"uint128"},{"name":"sender","type":"principal"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg, sender: TypedAbiArg, recipient: TypedAbiArg], Response>, + unlistInUstx: {"name":"unlist-in-ustx","access":"public","args":[{"name":"id","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[id: TypedAbiArg], Response>, + getArtistAddress: {"name":"get-artist-address","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"principal","error":"none"}}}} as TypedAbiFunction<[], Response>, + getBalance: {"name":"get-balance","access":"read_only","args":[{"name":"account","type":"principal"}],"outputs":{"type":"uint128"}} as TypedAbiFunction<[account: TypedAbiArg], bigint>, + getLastTokenId: {"name":"get-last-token-id","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + getLicenseName: {"name":"get-license-name","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":40}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getLicenseUri: {"name":"get-license-uri","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":{"string-ascii":{"length":80}},"error":"none"}}}} as TypedAbiFunction<[], Response>, + getListingInUstx: {"name":"get-listing-in-ustx","access":"read_only","args":[{"name":"id","type":"uint128"}],"outputs":{"type":{"optional":{"tuple":[{"name":"commission","type":"principal"},{"name":"price","type":"uint128"},{"name":"royalty","type":"uint128"}]}}}} as TypedAbiFunction<[id: TypedAbiArg], { + "commission": string; + "price": bigint; + "royalty": bigint; +} | null>, + getOwner: {"name":"get-owner","access":"read_only","args":[{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":{"optional":"principal"},"error":"none"}}}} as TypedAbiFunction<[tokenId: TypedAbiArg], Response>, + getRoyaltyPercent: {"name":"get-royalty-percent","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"uint128","error":"none"}}}} as TypedAbiFunction<[], Response>, + getTokenUri: {"name":"get-token-uri","access":"read_only","args":[{"name":"token-id","type":"uint128"}],"outputs":{"type":{"response":{"ok":{"optional":{"string-ascii":{"length":71}}},"error":"none"}}}} as TypedAbiFunction<[tokenId: TypedAbiArg], Response> + }, + "maps": { + cids: {"name":"cids","key":"uint128","value":{"string-ascii":{"length":64}}} as TypedAbiMap, + market: {"name":"market","key":"uint128","value":{"tuple":[{"name":"commission","type":"principal"},{"name":"price","type":"uint128"},{"name":"royalty","type":"uint128"}]}} as TypedAbiMap, + tokenCount: {"name":"token-count","key":"principal","value":"uint128"} as TypedAbiMap + }, + "variables": { + DEPLOYER: { + name: 'DEPLOYER', + type: 'principal', + access: 'constant' +} as TypedAbiVariable, + ERR_CONTRACT_LOCKED: { + name: 'ERR-CONTRACT-LOCKED', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_INVALID_PERCENTAGE: { + name: 'ERR-INVALID-PERCENTAGE', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_INVALID_USER: { + name: 'ERR-INVALID-USER', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_LISTING: { + name: 'ERR-LISTING', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_METADATA_FROZEN: { + name: 'ERR-METADATA-FROZEN', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_NFT_MINT: { + name: 'ERR-NFT-MINT', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_NOT_AUTHORIZED: { + name: 'ERR-NOT-AUTHORIZED', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_NOT_FOUND: { + name: 'ERR-NOT-FOUND', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + ERR_WRONG_COMMISSION: { + name: 'ERR-WRONG-COMMISSION', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + artistAddress: { + name: 'artist-address', + type: 'principal', + access: 'variable' +} as TypedAbiVariable, + lastId: { + name: 'last-id', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable, + licenseName: { + name: 'license-name', + type: { + 'string-ascii': { + length: 40 + } + }, + access: 'variable' +} as TypedAbiVariable, + licenseUri: { + name: 'license-uri', + type: { + 'string-ascii': { + length: 80 + } + }, + access: 'variable' +} as TypedAbiVariable, + locked: { + name: 'locked', + type: 'bool', + access: 'variable' +} as TypedAbiVariable, + metadataFrozen: { + name: 'metadata-frozen', + type: 'bool', + access: 'variable' +} as TypedAbiVariable, + royaltyPercent: { + name: 'royalty-percent', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: {}, + "non_fungible_tokens": [ + {"name":"og-bitcoin-pizza-leather-edition","type":"uint128"} + ], + "fungible_tokens":[],"epoch":"Epoch25","clarity_version":"Clarity2", + contractName: 'og-bitcoin-pizza-leather-edition', + }, +ruleSetTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'rule-set-trait', + }, +sip010TraitFtStandard: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity1", + contractName: 'sip-010-trait-ft-standard', + }, +smartWallet: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"private","args":[{"name":"rules","type":"trait_reference"},{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[rules: TypedAbiArg, extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedSip009: {"name":"is-allowed-sip009","access":"private","args":[{"name":"sip009","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip009: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg], Response>, + isAllowedSip010: {"name":"is-allowed-sip010","access":"private","args":[{"name":"sip010","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip010: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"private","args":[{"name":"rules","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[rules: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + enableAdmin: {"name":"enable-admin","access":"public","args":[{"name":"admin","type":"principal"},{"name":"enabled","type":"bool"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[admin: TypedAbiArg, enabled: TypedAbiArg], Response>, + extensionCall: {"name":"extension-call","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + setSecurityLevel: {"name":"set-security-level","access":"public","args":[{"name":"new-level","type":"uint128"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[newLevel: TypedAbiArg], Response>, + sip009Transfer: {"name":"sip009-transfer","access":"public","args":[{"name":"nft-id","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"sip009","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[nftId: TypedAbiArg, recipient: TypedAbiArg, sip009: TypedAbiArg], Response>, + sip010Transfer: {"name":"sip010-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"sip010","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg, sip010: TypedAbiArg], Response>, + stxTransfer: {"name":"stx-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + currentRules: {"name":"current-rules","access":"read_only","args":[],"outputs":{"type":"trait_reference"}} as TypedAbiFunction<[], string>, + getTime: {"name":"get-time","access":"read_only","args":[],"outputs":{"type":"uint128"}} as TypedAbiFunction<[], bigint>, + isAdminCalling: {"name":"is-admin-calling","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response>, + isInactive: {"name":"is-inactive","access":"read_only","args":[],"outputs":{"type":"bool"}} as TypedAbiFunction<[], boolean>, + toTrait: {"name":"to-trait","access":"read_only","args":[{"name":"trait","type":"trait_reference"}],"outputs":{"type":"trait_reference"}} as TypedAbiFunction<[trait: TypedAbiArg], string> + }, + "maps": { + admins: {"name":"admins","key":"principal","value":"bool"} as TypedAbiMap, + ruleSets: {"name":"rule-sets","key":"principal","value":"bool"} as TypedAbiMap + }, + "variables": { + activityPeriod: { + name: 'activity-period', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + errForbidden: { + name: 'err-forbidden', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + errUnauthorised: { + name: 'err-unauthorised', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + lastTxTime: { + name: 'last-tx-time', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable, + securityLevel: { + name: 'security-level', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: { + activityPeriod: 1_000n, + errForbidden: { + isOk: false, + value: 403n + }, + errUnauthorised: { + isOk: false, + value: 401n + }, + lastTxTime: 0n, + securityLevel: 1n +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet', + }, +smartWalletEndpoint: { + "functions": { + stxTransferSponsored: {"name":"stx-transfer-sponsored","access":"public","args":[{"name":"details","type":{"tuple":[{"name":"amount","type":"uint128"},{"name":"fees","type":"uint128"},{"name":"to","type":"principal"}]}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[details: TypedAbiArg<{ + "amount": number | bigint; + "fees": number | bigint; + "to": string; +}, "details">], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 5_000n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet-endpoint', + }, +smartWalletStandard: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"private","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedSip009: {"name":"is-allowed-sip009","access":"private","args":[{"name":"sip009","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip009: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg], Response>, + isAllowedSip010: {"name":"is-allowed-sip010","access":"private","args":[{"name":"sip010","type":"trait_reference"},{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[sip010: TypedAbiArg, amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"private","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + enableAdmin: {"name":"enable-admin","access":"public","args":[{"name":"admin","type":"principal"},{"name":"enabled","type":"bool"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[admin: TypedAbiArg, enabled: TypedAbiArg], Response>, + extensionCall: {"name":"extension-call","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + sip009Transfer: {"name":"sip009-transfer","access":"public","args":[{"name":"nft-id","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"sip009","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[nftId: TypedAbiArg, recipient: TypedAbiArg, sip009: TypedAbiArg], Response>, + sip010Transfer: {"name":"sip010-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}},{"name":"sip010","type":"trait_reference"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg, sip010: TypedAbiArg], Response>, + stxTransfer: {"name":"stx-transfer","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + transferWallet: {"name":"transfer-wallet","access":"public","args":[{"name":"new-admin","type":"principal"}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[newAdmin: TypedAbiArg], Response>, + isAdminCalling: {"name":"is-admin-calling","access":"read_only","args":[],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[], Response> + }, + "maps": { + admins: {"name":"admins","key":"principal","value":"bool"} as TypedAbiMap + }, + "variables": { + errForbidden: { + name: 'err-forbidden', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + errUnauthorised: { + name: 'err-unauthorised', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errForbidden: { + isOk: false, + value: 403n + }, + errUnauthorised: { + isOk: false, + value: 401n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet-standard', + }, +smartWalletTrait: { + "functions": { + + }, + "maps": { + + }, + "variables": { + + }, + constants: {}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'smart-wallet-trait', + }, +sponsoredTransfer: { + "functions": { + call: {"name":"call","access":"public","args":[{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[payload: TypedAbiArg], Response> + }, + "maps": { + + }, + "variables": { + errInvalidPayload: { + name: 'err-invalid-payload', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable> + }, + constants: { + errInvalidPayload: { + isOk: false, + value: 500n + } +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'sponsored-transfer', + }, +standardRules: { + "functions": { + isAllowedExtension: {"name":"is-allowed-extension","access":"public","args":[{"name":"extension","type":"trait_reference"},{"name":"payload","type":{"buffer":{"length":2048}}}],"outputs":{"type":{"response":{"ok":"bool","error":"none"}}}} as TypedAbiFunction<[extension: TypedAbiArg, payload: TypedAbiArg], Response>, + isAllowedStx: {"name":"is-allowed-stx","access":"public","args":[{"name":"amount","type":"uint128"},{"name":"recipient","type":"principal"},{"name":"memo","type":{"optional":{"buffer":{"length":34}}}}],"outputs":{"type":{"response":{"ok":"bool","error":"uint128"}}}} as TypedAbiFunction<[amount: TypedAbiArg, recipient: TypedAbiArg, memo: TypedAbiArg], Response>, + getWeeklyAmount: {"name":"get-weekly-amount","access":"read_only","args":[],"outputs":{"type":"uint128"}} as TypedAbiFunction<[], bigint> + }, + "maps": { + + }, + "variables": { + e6: { + name: 'E6', + type: 'uint128', + access: 'constant' +} as TypedAbiVariable, + errUnauthorised: { + name: 'err-unauthorised', + type: { + response: { + ok: 'none', + error: 'uint128' + } + }, + access: 'constant' +} as TypedAbiVariable>, + weeklyAmount: { + name: 'weekly-amount', + type: 'uint128', + access: 'variable' +} as TypedAbiVariable + }, + constants: { + e6: 1_000_000n, + errUnauthorised: { + isOk: false, + value: 401n + }, + weeklyAmount: 0n +}, + "non_fungible_tokens": [ + + ], + "fungible_tokens":[],"epoch":"Epoch21","clarity_version":"Clarity2", + contractName: 'standard-rules', + } +} as const; + +export const accounts = {"deployer":{"address":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","balance":"99999999999000"},"faucet":{"address":"STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6","balance":"100000000000000"},"wallet_1":{"address":"ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5","balance":"100000000000000"},"wallet_2":{"address":"ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG","balance":"100000000000000"},"wallet_3":{"address":"ST2JHG361ZXG51QTKY2NQCVBPPRRE2KZB1HR05NNC","balance":"100000000000000"},"wallet_4":{"address":"ST2NEB84ASENDXKYGJPQW86YXQCEFEX2ZQPG87ND","balance":"100000000000000"},"wallet_5":{"address":"ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB","balance":"100000000000000"},"wallet_6":{"address":"ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0","balance":"100000000000000"},"wallet_7":{"address":"ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ","balance":"100000000000000"},"wallet_8":{"address":"ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP","balance":"100000000000000"}} as const; + +export const identifiers = {"commissionTrait":"SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait","emergencyRules":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules","extAllowContractCallerPox4":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-allow-contract-caller-pox-4","extDelegateStxPox4":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-delegate-stx-pox-4","extensionTrait":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait","inactiveObserver":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer","microNthng":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng","nftTrait":"SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait","noRules":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules","nope":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope","ogBitcoinPizzaLeatherEdition":"SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition","ruleSetTrait":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait","sip010TraitFtStandard":"SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard","smartWallet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet","smartWalletEndpoint":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint","smartWalletStandard":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-standard","smartWalletTrait":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait","sponsoredTransfer":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer","standardRules":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules"} as const + +export const simnet = { + accounts, + contracts, + identifiers, +} as const; + + +export const deployments = {"commissionTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.commission-trait","simnet":"SP3D6PV2ACBPEKYJTCMH7HEN02KP87QSP8KTEH335.commission-trait","testnet":null,"mainnet":null},"emergencyRules":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.emergency-rules","testnet":null,"mainnet":null},"extAllowContractCallerPox4":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-allow-contract-caller-pox-4","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-allow-contract-caller-pox-4","testnet":null,"mainnet":null},"extDelegateStxPox4":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-delegate-stx-pox-4","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.ext-delegate-stx-pox-4","testnet":null,"mainnet":null},"extensionTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.extension-trait","testnet":null,"mainnet":null},"inactiveObserver":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.inactive-observer","testnet":null,"mainnet":null},"microNthng":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.micro-nthng","simnet":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.micro-nthng","testnet":null,"mainnet":null},"nftTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.nft-trait","simnet":"SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait","testnet":null,"mainnet":"SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait"},"noRules":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.no-rules","testnet":null,"mainnet":null},"nope":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.nope","simnet":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope","testnet":null,"mainnet":"SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope"},"ogBitcoinPizzaLeatherEdition":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.og-bitcoin-pizza-leather-edition","simnet":"SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition","testnet":null,"mainnet":"SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition"},"ruleSetTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.rule-set-trait","testnet":null,"mainnet":null},"sip010TraitFtStandard":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sip-010-trait-ft-standard","simnet":"SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard","testnet":null,"mainnet":"SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard"},"smartWallet":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet","testnet":null,"mainnet":null},"smartWalletEndpoint":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-endpoint","testnet":null,"mainnet":null},"smartWalletStandard":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-standard","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-standard","testnet":null,"mainnet":null},"smartWalletTrait":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet-trait","testnet":null,"mainnet":null},"sponsoredTransfer":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.sponsored-transfer","testnet":null,"mainnet":null},"standardRules":{"devnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules","simnet":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.standard-rules","testnet":null,"mainnet":null}} as const; + +export const project = { + contracts, + deployments, +} as const; + \ No newline at end of file diff --git a/tests/smart-wallet-standard.test.ts b/tests/smart-wallet-standard.test.ts index f6c67d7..efcc77a 100644 --- a/tests/smart-wallet-standard.test.ts +++ b/tests/smart-wallet-standard.test.ts @@ -1,80 +1,113 @@ -import { CoreNodeEventType, projectFactory } from "@clarigen/core"; -import { filterEvents, txErr, txOk } from "@clarigen/test"; -import { Cl, ClarityType } from "@stacks/transactions"; +import { initSimnet } from "@hirosystems/clarinet-sdk"; +import { + ClarityType, + Cl, + uintCV, + ResponseOkCV, + ResponseErrorCV, + standardPrincipalCV, + noneCV, + contractPrincipalCV, + bufferCV, + boolCV, +} from "@stacks/transactions"; import { describe, expect, it } from "vitest"; -import { accounts, project } from "../src/clarigen-types"; -const { smartWallet, smartWalletEndpoint } = projectFactory(project, "simnet"); +const simnet = await initSimnet(); -const transferAmount = 100; +const accounts = simnet.getAccounts(); +const address1 = accounts.get("deployer"); +const address2 = accounts.get("wallet_2"); +const address3 = accounts.get("wallet_1"); -// Type guard to check if data has an amount property -function hasAmountProperty(data: any): data is { amount: string } { - return (data as { amount: string }).amount !== undefined; +if (!address1 || !address2 || !address3) { + throw new Error("One or more required addresses are undefined."); } -describe("test `smart-wallet-standard` public functions", () => { +const transferAmount = 100; +const amountCV = uintCV(transferAmount); +const recipientCV = standardPrincipalCV(address2); +const memoCV = noneCV(); +const sip010Contract = contractPrincipalCV( + "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ", + "nope" +); +const sip009Contract = contractPrincipalCV( + "SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5", + "og-bitcoin-pizza-leather-edition" +); +const extensionContract = contractPrincipalCV( + simnet.deployer, + "ext-delegate-stx-pox-4" +); +describe("test `smart-wallet-standard` public functions", () => { it("transfers 100 stx to wallet", async () => { - const response = await txOk( - smartWallet.stxTransfer(transferAmount, accounts.wallet_2.address, null), - accounts.wallet_1.address + const transferResponse = await simnet.callPublicFn( + "smart-wallet", + "stx-transfer", + [amountCV, recipientCV, memoCV], + address1 ); - console.log(response); - expect(response.result.type).toBe(ClarityType.ResponseOk); + console.log( + "STX Transfer Response:", + Cl.prettyPrint(transferResponse.result) + ); + expect(transferResponse.result).toBeOk(Cl.bool(true)); }); - it("transfers 100 sip10 tokens to wallet", async () => { - const sip010Contract = "SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.nope"; - - const response = await txErr( - smartWallet.sip010Transfer( - transferAmount, - accounts.wallet_2.address, - null, - sip010Contract - ), - accounts.wallet_1.address + it("calls extension with payload", async () => { + const payload = bufferCV(Buffer.from("extension-payload")); + const extensionResponse = await simnet.callPublicFn( + "smart-wallet", + "extension-call", + [extensionContract, payload], + address1 ); + console.log( + "Extension Call Response:", + Cl.prettyPrint(extensionResponse.result) + ); + expect(extensionResponse.result.type).toBe(ClarityType.ResponseOk); + }); - expect(response.result).toBeErr(Cl.uint(401)); + it("transfers 100 sip10 tokens to wallet", async () => { + const sip10transfer = await simnet.callPublicFn( + "smart-wallet", + "sip010-transfer", + [amountCV, recipientCV, memoCV, sip010Contract], + address1 + ); + console.log( + "SIP-10 Transfer Response:", + Cl.prettyPrint(sip10transfer.result) + ); + expect(sip10transfer.result).toBeOk(Cl.bool(true)); }); it("transfers 1 Nft to wallet", async () => { - const sip09Contract = - "SP16GEW6P7GBGZG0PXRXFJEMR3TJHJEY2HJKBP1P5.og-bitcoin-pizza-leather-edition"; - const response = await txErr( - smartWallet.sip009Transfer( - 1, - "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.smart-wallet", - sip09Contract - ), - accounts.wallet_1.address + const NftId = uintCV(1); + const sip9transfer = await simnet.callPublicFn( + "smart-wallet", + "sip009-transfer", + [NftId, recipientCV, sip009Contract], + address1 ); - - expect(response.result).toBeErr(Cl.uint(101)); + console.log("NFT Transfer Response:", Cl.prettyPrint(sip9transfer.result)); + expect(sip9transfer.result).toBeOk(Cl.bool(true)); }); - // Uncomment and adjust as needed for other tests - // it("transfers fee to sponsor", async () => { - // const fees = 10000; - // const response = await txOk( - // smartWalletEndpoint.stxTransferSponsored({ - // amount: transferAmount, - // to: accounts.wallet_2.address, - // fees, - // }), - // accounts.wallet_1.address - // ); + // it('enables admin', async () => { + // const adminAddress = standardPrincipalCV(address3); + // const enableAdminResponse = await simnet.callPublicFn("smart-wallet", "enable-admin", [adminAddress, boolCV(true)], address1); + // console.log('Enable Admin Response:', Cl.prettyPrint(enableAdminResponse.result)); + // expect(enableAdminResponse.result.type).toBe(ClarityType.ResponseOk); + // }); - // expect(response.result.type).toBe(ClarityType.ResponseOk); - // // only 1 stx transfer because there is no sponsored tx here - // expect(response.events.length).toBe(1); - // const event = response.events[0].data; - // if (hasAmountProperty(event)) { - // expect(event.amount).toBe(transferAmount.toString()); - // } else { - // throw new Error("Event data does not have amount property"); - // } + // it('transfers wallet to new admin', async () => { + // const newAdminAddress = standardPrincipalCV(address3); + // const transferWalletResponse = await simnet.callPublicFn("smart-wallet", "transfer-wallet", [newAdminAddress], address1); + // console.log('Transfer Wallet Response:', Cl.prettyPrint(transferWalletResponse.result)); + // expect(transferWalletResponse.result.type).toBe(ClarityType.ResponseOk); // }); });