diff --git a/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts b/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts index fd17f2bd..e0ec1233 100644 --- a/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts +++ b/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts @@ -220,9 +220,9 @@ export const _validateAndCreateMetadata = }) => async (byteArray: Uint8Array, asset: Asset) => { try { - console.log("2a") + console.log('2a') const { conforms, reports, data } = await getShaclSchemaAndValidate(byteArray) - console.log("2b") + console.log('2b') const assetCID = await createFilename(byteArray) const domainMetadataCID = await createFilename(data.domainMetadata) @@ -231,18 +231,18 @@ export const _validateAndCreateMetadata = if (!user) { throw new Error('User not found') } - console.log("2c") + console.log('2c') const [issuer] = await connection.getUserWithProfileById(user.issuerId) if (!issuer) { throw new Error('Issuer not found') } - console.log("2d") + console.log('2d') const files = await getFilesAsPathAndByteArrayFromManifest(byteArray, data.manifest) const visualization = filter(propEq('visualization', 'type'))(files.publicUser) as ExtractedFile[] const visualizationFiles = await getAllFilenamesFromFiles(visualization) const displayUri = find(propEq('visualization', 'type'))(visualizationFiles) as ExtractedFileWithCID - console.log("2e") + console.log('2e') const modifiedManifest = createModifiedManifest({ assetCID, domainMetadataCID, @@ -262,7 +262,7 @@ export const _validateAndCreateMetadata = manifest: data.manifest, domainMetadata: data.domainMetadata, }) - console.log("2f") + console.log('2f') return { conforms, reports, diff --git a/apps/envited.ascs.digital/modules/UploadedAssets/UploadedAssets.actions.ts b/apps/envited.ascs.digital/modules/UploadedAssets/UploadedAssets.actions.ts index f611453c..78c0a962 100644 --- a/apps/envited.ascs.digital/modules/UploadedAssets/UploadedAssets.actions.ts +++ b/apps/envited.ascs.digital/modules/UploadedAssets/UploadedAssets.actions.ts @@ -1,8 +1,7 @@ 'use server' -import { AssetStatus } from 'apps/envited.ascs.digital/common/types' - import { getMintParams, updateAssetStatus, uploadTokenMetadata } from '../../common/serverActions' +import { AssetStatus } from '../../common/types' import { internalServerErrorError } from '../../common/utils' export async function uploadAssetTokenMetadata(id: string) { diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_287243623_REDPIXEL.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_287243623_REDPIXEL.jpeg index 524e3e22..a7d34887 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_287243623_REDPIXEL.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_287243623_REDPIXEL.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_571252297_metamorworks.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_571252297_metamorworks.jpeg index 2d836df3..c4489e74 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_571252297_metamorworks.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_571252297_metamorworks.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_619508170_Onchira.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_619508170_Onchira.jpeg index 7634b0a9..d4ee3464 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_619508170_Onchira.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_619508170_Onchira.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_647664122_Ben.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_647664122_Ben.jpeg index 72e76a43..f860ec00 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_647664122_Ben.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_647664122_Ben.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_682810927_Gorodenkoff.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_682810927_Gorodenkoff.jpeg index fe1c91ea..0a6ae351 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_682810927_Gorodenkoff.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_682810927_Gorodenkoff.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_777175657_Creative_Bringer.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_777175657_Creative_Bringer.jpeg index b87e1ee8..f9ee16e9 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_777175657_Creative_Bringer.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_777175657_Creative_Bringer.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_811521204_ZeNDaY.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_811521204_ZeNDaY.jpeg index c6afb064..1251cf7c 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_811521204_ZeNDaY.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_811521204_ZeNDaY.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_814069778_Robert Kneschke.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_814069778_Robert Kneschke.jpeg index a3f51ba6..0d82241d 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_814069778_Robert Kneschke.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_814069778_Robert Kneschke.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_822448804_SKIMP Art.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_822448804_SKIMP Art.jpeg index 8e421cc5..2c9d5b2a 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_822448804_SKIMP Art.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_822448804_SKIMP Art.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_823134873.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_823134873.jpeg index 821a0e1f..403b5e4b 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_823134873.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_823134873.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_824054193_goami.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_824054193_goami.jpeg index 1bae6129..b51d8f01 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_824054193_goami.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_824054193_goami.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_838127622_Rich4289.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_838127622_Rich4289.jpeg index f97271fa..7ba49520 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_838127622_Rich4289.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_838127622_Rich4289.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_892645802_Aisha.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_892645802_Aisha.jpeg index 93a22584..fe40a2fd 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_892645802_Aisha.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_892645802_Aisha.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/AdobeStock_949051393_VIK.jpeg b/apps/envited.ascs.digital/public/images/AdobeStock_949051393_VIK.jpeg index 7d809243..0b939f2c 100644 Binary files a/apps/envited.ascs.digital/public/images/AdobeStock_949051393_VIK.jpeg and b/apps/envited.ascs.digital/public/images/AdobeStock_949051393_VIK.jpeg differ diff --git a/apps/envited.ascs.digital/public/images/freepik_64459841_ckybe.jpg b/apps/envited.ascs.digital/public/images/freepik_64459841_ckybe.jpg index 7995475c..096aabf0 100644 Binary files a/apps/envited.ascs.digital/public/images/freepik_64459841_ckybe.jpg and b/apps/envited.ascs.digital/public/images/freepik_64459841_ckybe.jpg differ diff --git a/apps/envited.ascs.digital/stacks/Envited.ts b/apps/envited.ascs.digital/stacks/Envited.ts index 6a67b9c2..94768bfe 100644 --- a/apps/envited.ascs.digital/stacks/Envited.ts +++ b/apps/envited.ascs.digital/stacks/Envited.ts @@ -82,6 +82,16 @@ export default function Envited({ stack }: StackContext) { }) metadataBucket.cdk.bucket.grantRead(oai) + const ipfsBucket = new Bucket(stack, 'ipfs', { + cdk: { + bucket: { + accessControl: aws_s3.BucketAccessControl.PRIVATE, + }, + }, + cors: [s3CorsRule], + }) + ipfsBucket.cdk.bucket.grantRead(oai) + const assetsBucket = new Bucket(stack, 'assets', { notifications: { processAssetUpload: { @@ -90,8 +100,9 @@ export default function Envited({ stack }: StackContext) { environment: { RDS_SECRET_ARN: rdsCluster.secret?.secretArn || '', NEXT_PUBLIC_METADATA_BUCKET_NAME: metadataBucket.bucketName, + NEXT_PUBLIC_IPFS_BUCKET_NAME: ipfsBucket.bucketName, }, - permissions: [metadataBucket, 'secretsmanager:GetSecretValue'], + permissions: [ipfsBucket, metadataBucket, 'secretsmanager:GetSecretValue'], copyFiles: [{ from: 'common/aws/handlers/processAssetUpload/schemas' }], securityGroups: [sg], vpc, @@ -106,7 +117,7 @@ export default function Envited({ stack }: StackContext) { }, cors: [s3CorsRule], }) - assetsBucket.attachPermissions([assetsBucket, metadataBucket]) + assetsBucket.attachPermissions([assetsBucket, ipfsBucket, metadataBucket]) metadataBucket.attachPermissions([metadataBucket, assetsBucket]) assetsBucket.cdk.bucket.grantRead(oai) @@ -140,6 +151,21 @@ export default function Envited({ stack }: StackContext) { ], }) + const ipfsDistribution = new aws_cloudfront.CloudFrontWebDistribution(stack, 'ipfsDistribution', { + originConfigs: [ + { + s3OriginSource: { + s3BucketSource: ipfsBucket.cdk.bucket, + originAccessIdentity: oai, + }, + behaviors: [ + { isDefaultBehavior: true }, + { pathPattern: '/*', allowedMethods: aws_cloudfront.CloudFrontAllowedMethods.GET_HEAD }, + ], + }, + ], + }) + // Create the Next.js site const site = new NextjsSite(stack, 'envited_ascs_digital', { path: './', @@ -196,5 +222,7 @@ export default function Envited({ stack }: StackContext) { AssetsDistributionId: assetsDistribution.distributionId, MetadataDistribution: metadataDistribution.distributionDomainName, MetadataDistributionId: metadataDistribution.distributionId, + IpfsDistribution: ipfsDistribution.distributionDomainName, + IpfsDistributionId: ipfsDistribution.distributionId, }) } diff --git a/apps/smart-contracts/.eslintrc.json b/apps/smart-contracts/.eslintrc.json deleted file mode 100644 index 9d9c0db5..00000000 --- a/apps/smart-contracts/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/apps/smart-contracts/.ligo/repository_id b/apps/smart-contracts/.ligo/repository_id deleted file mode 100644 index 4b843583..00000000 --- a/apps/smart-contracts/.ligo/repository_id +++ /dev/null @@ -1 +0,0 @@ -3471ce56-2c40-4f48-d255-cf41118e2f06 \ No newline at end of file diff --git a/apps/smart-contracts/asset-registry/.ligo/repository_id b/apps/smart-contracts/asset-registry/.ligo/repository_id deleted file mode 100644 index 75121d29..00000000 --- a/apps/smart-contracts/asset-registry/.ligo/repository_id +++ /dev/null @@ -1 +0,0 @@ -13264fd3-da0a-4f99-a4fa-6cf58e659ed0 \ No newline at end of file diff --git a/apps/smart-contracts/asset-registry/.ligo/term_acceptance b/apps/smart-contracts/asset-registry/.ligo/term_acceptance deleted file mode 100644 index 45163836..00000000 --- a/apps/smart-contracts/asset-registry/.ligo/term_acceptance +++ /dev/null @@ -1 +0,0 @@ -accepted \ No newline at end of file diff --git a/apps/smart-contracts/asset-registry/.taq/config.json b/apps/smart-contracts/asset-registry/.taq/config.json deleted file mode 100644 index 78bf76b7..00000000 --- a/apps/smart-contracts/asset-registry/.taq/config.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "version": "v2", - "language": "en", - "artifactsDir": "artifacts", - "contractsDir": "contracts", - "accounts": { - "bob": { - "balance": { - "amount": "3_000_000_000", - "units": "mutez" - } - }, - "alice": { - "balance": { - "amount": "3_000_000_000", - "units": "mutez" - } - }, - "john": { - "balance": { - "amount": "3_000_000_000", - "units": "mutez" - } - }, - "jane": { - "balance": { - "amount": "3_000_000_000", - "units": "mutez" - } - }, - "joe": { - "balance": { - "amount": "3_000_000_000", - "units": "mutez" - } - } - }, - "environmentDefault": "development", - "environments": { - "development": { - "type": "flextesa", - "label": "Local Tezos Sandbox" - }, - "testing": { - "type": "simple", - "label": "ghostnet", - "rpcUrl": "https://ghostnet.ecadinfra.com" - }, - "production": { - "type": "simple", - "label": "mainnet", - "rpcUrl": "https://mainnet.api.tez.ie" - } - }, - "plugins": [ - { - "type": "npm", - "name": "@taqueria/plugin-core" - }, - { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - { - "type": "npm", - "name": "@taqueria/plugin-taquito" - }, - { - "type": "npm", - "name": "@taqueria/plugin-tzcompose" - } - ] -} diff --git a/apps/smart-contracts/asset-registry/.taq/config.local.development.json b/apps/smart-contracts/asset-registry/.taq/config.local.development.json deleted file mode 100644 index 37416b8e..00000000 --- a/apps/smart-contracts/asset-registry/.taq/config.local.development.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "contracts": { - "Main": { - "address": "KT1UczDBLUq4ZE6qewCeWWGvs4VkuUF5LQvL" - } - }, - "accounts": { - "bob": { - "encryptedKey": "edpkurPsQ8eUApnLUJ9ZPDvu98E8VNj4KtJa1aZr16Cr5ow5VHKnz4", - "publicKeyHash": "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6", - "secretKey": "unencrypted:edsk3RFfvaFaxbHx8BMtEW1rKQcPtDML3LXjNqMNLCzC3wLC1bWbAt" - }, - "alice": { - "encryptedKey": "edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn", - "publicKeyHash": "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb", - "secretKey": "unencrypted:edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq" - }, - "john": { - "encryptedKey": "edpktt6t2ENhxiQqun6bXPPWC6tFVvNPTDRh1gEPGX4BgDgbDnmGzP", - "publicKeyHash": "tz1Zwoh1QCVAvJ4sVTojMp9pLYp6Ji4NoZy6", - "secretKey": "unencrypted:edsk3Un2KRUUoWZufi914HQem96ejVFnkyD8GXRPUSkgqy5etsYXEN" - }, - "jane": { - "encryptedKey": "edpkvS6TDSWcqqj3EJi3NRrCMyN7oNw1B3Hp37R19tMThqM8YNhAuS", - "publicKeyHash": "tz1aHUAC4oviwJuZF1EvVSvFz7cu9KMNYBph", - "secretKey": "unencrypted:edsk3UkdS1UBfTBkMAoFxmfdmUHmCdNhTzDJ1cSJuZhU1b6k6fZZoQ" - }, - "joe": { - "encryptedKey": "edpkuT1QYPYbLLQz9dXhQS33ncsixxeGHbNGmntPTR4VBbWmskHPrV", - "publicKeyHash": "tz1MVGjgD1YtAPwohsSfk8i3ZiT1yEGM2YXB", - "secretKey": "unencrypted:edsk3Un2FU9Zeb4KEoATWdpAqcX5JArMUj2ew8S4SuzhPRDmGoqNx2" - } - }, - "accountDefault": "bob", - "sandboxName": "local", - "rpcUrl": "http://localhost:8732", - "tzkt": { - "disableAutostartWithSandbox": false, - "postgresqlPort": 5435, - "apiPort": 5003 - } -} diff --git a/apps/smart-contracts/asset-registry/.taq/config.local.production.json b/apps/smart-contracts/asset-registry/.taq/config.local.production.json deleted file mode 100644 index e97fcbb4..00000000 --- a/apps/smart-contracts/asset-registry/.taq/config.local.production.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "networkName": "mainnet" -} diff --git a/apps/smart-contracts/asset-registry/.taq/config.local.testing.json b/apps/smart-contracts/asset-registry/.taq/config.local.testing.json deleted file mode 100644 index 077f360a..00000000 --- a/apps/smart-contracts/asset-registry/.taq/config.local.testing.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "contracts": { - "Main": { - "address": "KT1PnXVgRyyCu15C3Z4k9F5C8UCQap7mUTZi" - } - }, - "networkName": "ghostnet", - "accounts": { - "taqOperatorAccount": { - "publicKey": "edpktqPQBtXxUjpzMt13suMhRLXfswU3UhPdPGUdSZ447fNVpGhSdg", - "publicKeyHash": "tz1KobLotv3nAgLJ65pyF8z1a3USbkqNeb4P", - "privateKey": "edskS15F4AaDSdPREYt6ffdZFEn52oqyQdZ8trZdj8Kg8MyhxcSN3Sebdos5yGRCjGWV7SDAntfdYPGTsRwjRf7TpMzMrWdd7L", - "mnemonic": "soda pair rigid finger warm picture ramp crater truck danger gauge use" - } - } -} diff --git a/apps/smart-contracts/asset-registry/.taq/development-state.json b/apps/smart-contracts/asset-registry/.taq/development-state.json deleted file mode 100644 index d1233bc0..00000000 --- a/apps/smart-contracts/asset-registry/.taq/development-state.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "operations": {}, - "tasks": { - "@taqueria/plugin-flextesa.list accounts.1724335552908": { - "task": "list accounts", - "plugin": "@taqueria/plugin-flextesa", - "time": 1724335552908, - "output": [ - { - "account": "bob", - "balance": "3000 ꜩ", - "address": "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" - }, - { - "account": "alice", - "balance": "3000 ꜩ", - "address": "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" - }, - { - "account": "john", - "balance": "3000 ꜩ", - "address": "tz1Zwoh1QCVAvJ4sVTojMp9pLYp6Ji4NoZy6" - }, - { - "account": "jane", - "balance": "3000 ꜩ", - "address": "tz1aHUAC4oviwJuZF1EvVSvFz7cu9KMNYBph" - }, - { - "account": "joe", - "balance": "3000 ꜩ", - "address": "tz1MVGjgD1YtAPwohsSfk8i3ZiT1yEGM2YXB" - } - ] - }, - "@taqueria/plugin-taquito.deploy.1724335687150": { - "task": "deploy", - "plugin": "@taqueria/plugin-taquito", - "time": 1724335687150, - "output": [ - { - "contract": "IncDec.tz", - "address": "KT1C9vhvR5CwcVsxo4VdjjxcirDCSzA3wMhC", - "alias": "IncDec" - } - ] - }, - "@taqueria/plugin-flextesa.list accounts.1725370634858": { - "task": "list accounts", - "plugin": "@taqueria/plugin-flextesa", - "time": 1725370634858, - "output": [ - { - "account": "bob", - "balance": "2994.024032 ꜩ", - "address": "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" - }, - { - "account": "alice", - "balance": "3000 ꜩ", - "address": "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" - }, - { - "account": "john", - "balance": "3000 ꜩ", - "address": "tz1Zwoh1QCVAvJ4sVTojMp9pLYp6Ji4NoZy6" - }, - { - "account": "jane", - "balance": "3000 ꜩ", - "address": "tz1aHUAC4oviwJuZF1EvVSvFz7cu9KMNYBph" - }, - { - "account": "joe", - "balance": "3000 ꜩ", - "address": "tz1MVGjgD1YtAPwohsSfk8i3ZiT1yEGM2YXB" - } - ] - }, - "@taqueria/plugin-taquito.transfer.1725459437597": { - "task": "transfer", - "plugin": "@taqueria/plugin-taquito", - "time": 1725459437597, - "output": [ - { - "contractAlias": "Main", - "contractAddress": "KT1DttrL7KbfSBdpeoU8c5xZ6qRBQ6muZUXu", - "parameter": "(Pair \"tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6\"\n 0\n 1\n (Some { Elt \"name\" 0x546f6b656e2031 }))\n", - "entrypoint": "mint", - "mutezTransfer": "0", - "destination": "http://localhost:8732" - } - ] - }, - "@taqueria/plugin-ligo.compile.1729504748457": { - "task": "compile", - "plugin": "@taqueria/plugin-ligo", - "time": 1729504748457, - "output": [ - { - "source": "Main.jsligo", - "artifact": "artifacts/Main.tz\nartifacts/Main.default_storage.tz\nartifacts/Main.parameter.mint_parameter.tz\nartifacts/Main.parameter.update_operator_parameter.tz\nartifacts/Main.parameter.transfer_parameter.tz" - } - ] - }, - "@taqueria/plugin-ligo.compile.1729505459902": { - "task": "compile", - "plugin": "@taqueria/plugin-ligo", - "time": 1729505459902, - "output": [ - { - "source": "Main.jsligo", - "artifact": "artifacts/Main.tz\nartifacts/Main.default_storage.tz\nartifacts/Main.parameter.mint_parameter.tz\nartifacts/Main.parameter.update_operator_parameter.tz\nartifacts/Main.parameter.transfer_parameter.tz" - } - ] - }, - "@taqueria/plugin-ligo.compile.1729682389553": { - "task": "compile", - "plugin": "@taqueria/plugin-ligo", - "time": 1729682389553, - "output": [ - { - "source": "Main.jsligo", - "artifact": "artifacts/Main.tz\nartifacts/Main.default_storage.tz\nartifacts/Main.parameter.mint_parameter.tz\nartifacts/Main.parameter.update_operator_parameter.tz\nartifacts/Main.parameter.transfer_parameter.tz" - } - ] - }, - "@taqueria/plugin-ligo.compile.1729683442399": { - "task": "compile", - "plugin": "@taqueria/plugin-ligo", - "time": 1729683442399, - "output": [ - { - "source": "Main.jsligo", - "artifact": "artifacts/Main.tz\nartifacts/Main.default_storage.tz\nmint_parameter in Main.parameterList.jsligo not compiled\nupdate_operator_parameter in Main.parameterList.jsligo not compiled\ntransfer_parameter in Main.parameterList.jsligo not compiled" - } - ] - }, - "@taqueria/plugin-ligo.compile.1729683523876": { - "task": "compile", - "plugin": "@taqueria/plugin-ligo", - "time": 1729683523877, - "output": [ - { - "source": "Main.jsligo", - "artifact": "artifacts/Main.tz\nartifacts/Main.default_storage.tz\nartifacts/Main.parameter.mint_parameter.tz\nartifacts/Main.parameter.update_operator_parameter.tz\nartifacts/Main.parameter.transfer_parameter.tz" - } - ] - } - } -} diff --git a/apps/smart-contracts/asset-registry/.taq/state.json b/apps/smart-contracts/asset-registry/.taq/state.json deleted file mode 100644 index 8d04c62e..00000000 --- a/apps/smart-contracts/asset-registry/.taq/state.json +++ /dev/null @@ -1,445 +0,0 @@ -// WARNING: This file is autogenerated and should NOT be modified -{ - "build": "0.53.0", - "configHash": "d3bf2aeb5f16dee5bafffd1e3a8b852519ab1861525482d3fea076e23fb404b2", - "tasks": { - "clean": { - "type": "npm", - "name": "@taqueria/plugin-core" - }, - "ligo": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - "compile": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - "compile-all": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - "test": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - "get-image": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - "start sandbox": { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - "stop sandbox": { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - "restart sandbox": { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - "list accounts": { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - "bake": { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - "show protocols": { - "type": "npm", - "name": "@taqueria/plugin-flextesa" - }, - "deploy": { - "type": "npm", - "name": "@taqueria/plugin-taquito" - }, - "transfer": { - "type": "npm", - "name": "@taqueria/plugin-taquito" - }, - "fund": { - "type": "npm", - "name": "@taqueria/plugin-taquito" - }, - "instantiate-account": { - "type": "npm", - "name": "@taqueria/plugin-taquito" - }, - "run": { - "type": "npm", - "name": "@taqueria/plugin-tzcompose" - } - }, - "operations": {}, - "templates": { - "contract": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - } - }, - "plugins": [ - { - "name": "@taqueria/plugin-core", - "version": "0.1", - "schema": "1.0", - "alias": "core", - "tasks": [ - { - "task": "clean", - "command": "clean", - "description": "Clean all the Taqueria-related docker images", - "encoding": "application/json", - "handler": "proxy" - } - ], - "operations": [], - "templates": [] - }, - { - "name": "@taqueria/plugin-ligo", - "version": "0.1", - "schema": "1.0", - "alias": "ligo", - "postInstall": "node /Users/royscheeren/Projects/envited-marketplace/apps/smart-contracts/asset-registry/node_modules/@taqueria/lib-ligo/postinstall.js", - "tasks": [ - { - "task": "ligo", - "command": "ligo", - "description": "This task allows you to run arbitrary LIGO native commands. Note that they might not benefit from the abstractions provided by Taqueria", - "encoding": "none", - "handler": "proxy", - "options": [ - { - "shortFlag": "c", - "flag": "command", - "description": "The command to be passed to the underlying LIGO binary, wrapped in quotes", - "type": "string", - "required": true - } - ] - }, - { - "task": "compile", - "command": "compile ", - "aliases": ["c", "compile-ligo"], - "description": "Compile a smart contract written in a LIGO syntax to Michelson code, along with its associated storage/parameter list files if they are found", - "encoding": "json", - "handler": "proxy", - "options": [ - { - "flag": "json", - "description": "Emit JSON-encoded Michelson", - "boolean": true - }, - { - "shortFlag": "m", - "flag": "module", - "description": "The LIGO module to be compiled", - "type": "string" - } - ] - }, - { - "task": "compile-all", - "command": "compile-all", - "description": "Compile all main smart contracts written in a LIGO syntax to Michelson code, along with their associated storage/parameter list files if they are found", - "encoding": "json", - "handler": "proxy", - "options": [ - { - "flag": "json", - "description": "Emit JSON-encoded Michelson", - "boolean": true - } - ] - }, - { - "task": "test", - "command": "test ", - "description": "Test a smart contract written in LIGO", - "encoding": "json", - "handler": "proxy" - }, - { - "task": "get-image", - "command": "get-image", - "description": "Gets the name of the image to be used", - "hidden": true, - "handler": "proxy" - } - ], - "operations": [], - "templates": [ - { - "template": "contract", - "command": "contract ", - "description": "Create a LIGO contract with boilerplate code", - "options": [ - { - "shortFlag": "s", - "flag": "syntax", - "description": "The syntax used in the contract", - "type": "string" - } - ], - "positionals": [ - { - "placeholder": "sourceFileName", - "description": "The name of the LIGO contract to generate", - "type": "string" - } - ], - "handler": "function" - } - ] - }, - { - "name": "@taqueria/plugin-flextesa", - "version": "0.1", - "schema": "1.0", - "alias": "flextesa", - "tasks": [ - { - "task": "start sandbox", - "command": "start sandbox", - "aliases": ["start flextesa"], - "description": "Starts a flextesa sandbox", - "encoding": "none", - "handler": "proxy", - "options": [] - }, - { - "task": "stop sandbox", - "command": "stop sandbox", - "aliases": ["stop flextesa"], - "description": "Stops a flextesa sandbox", - "handler": "proxy", - "options": [] - }, - { - "task": "restart sandbox", - "command": "restart sandbox", - "aliases": ["restart flextesa"], - "description": "Restarts a flextesa sandbox", - "handler": "proxy", - "options": [] - }, - { - "task": "list accounts", - "command": "list accounts", - "aliases": [], - "description": "List the balances of all sandbox accounts", - "encoding": "json", - "handler": "proxy", - "options": [] - }, - { - "task": "bake", - "command": "bake", - "aliases": ["b"], - "description": "Manually bake a block. Use when the \"baking\" setting of a flextesa sandbox is set to \"disabled\".", - "encoding": "none", - "handler": "proxy", - "options": [ - { - "shortFlag": "w", - "flag": "watch", - "description": "Watch for operations as they are injected into the mempool and bake them as immediate as possible.", - "boolean": true - } - ] - }, - { - "task": "show protocols", - "command": "show protocols", - "aliases": ["list protocols"], - "description": "List protocols understood by this version of Flextesa", - "encoding": "json", - "handler": "proxy", - "options": [] - } - ], - "operations": [], - "templates": [] - }, - { - "name": "@taqueria/plugin-taquito", - "version": "0.1", - "schema": "1.0", - "alias": "taquito", - "tasks": [ - { - "task": "deploy", - "command": "deploy ", - "aliases": ["originate"], - "description": "Deploy a smart contract to a particular environment", - "encoding": "application/json", - "handler": "proxy", - "options": [ - { - "flag": "alias", - "description": "Alias used to refer to the deployed contract's address", - "required": false - }, - { - "flag": "storage", - "description": "Name of the storage file that contains the storage value as a Michelson expression, in the artifacts directory, used for originating a contract", - "required": false - }, - { - "flag": "sender", - "description": "Name of an instantiated account to use as the sender of the originate operation", - "required": false - }, - { - "flag": "mutez", - "description": "Amount of Mutez to transfer", - "required": false - }, - { - "shortFlag": "t", - "flag": "timeout", - "description": "Number of seconds to elapse before abandoning the operation (to avoid congestion and network failures)", - "defaultValue": 40, - "required": false - }, - { - "shortFlag": "g", - "flag": "gasLimit", - "description": "Gas limit per contract/origination specified in mutez", - "required": false - }, - { - "shortFlag": "s", - "flag": "storageLimit", - "description": "Storage limit per contract/origination specified in mutez", - "required": false - }, - { - "shortFlag": "f", - "flag": "fee", - "description": "Fee per contract/origination specified in mutez", - "required": false - } - ] - }, - { - "task": "transfer", - "command": "transfer ", - "aliases": ["call"], - "description": "Transfer/call an implicit account or a smart contract (specified via its alias or address) deployed to a particular environment", - "encoding": "application/json", - "handler": "proxy", - "options": [ - { - "flag": "mutez", - "description": "Amount of Mutez to transfer", - "required": false - }, - { - "flag": "param", - "description": "Name of the parameter file that contains the parameter value as a Michelson expression, in the artifacts directory, used for invoking a deployed contract", - "required": false - }, - { - "flag": "entrypoint", - "description": "You may explicitly specify an entrypoint to make the parameter value shorter, without having to specify a chain of (Left (Right ... 14 ...))", - "required": false - }, - { - "flag": "sender", - "description": "Name of an instantiated account to use as the sender of the transfer operation", - "required": false - }, - { - "shortFlag": "t", - "flag": "timeout", - "description": "Number of retry attempts (to avoid congestion and network failures)", - "defaultValue": 40, - "required": false - }, - { - "shortFlag": "g", - "flag": "gasLimit", - "description": "Gas limit per contract/origination specified in mutez", - "required": false - }, - { - "shortFlag": "s", - "flag": "storageLimit", - "description": "Storage limit per contract/origination specified in mutez", - "required": false - }, - { - "shortFlag": "f", - "flag": "fee", - "description": "Fee per contract/origination specified in mutez", - "required": false - } - ] - }, - { - "task": "fund", - "command": "fund", - "description": "Fund all the instantiated accounts up to the desired/declared amount in a target environment", - "encoding": "application/json", - "handler": "proxy", - "options": [ - { - "shortFlag": "t", - "flag": "timeout", - "description": "Number of retry attempts (to avoid congestion and network failures)", - "defaultValue": 40, - "required": false - } - ] - }, - { - "task": "instantiate-account", - "command": "instantiate-account", - "description": "Instantiate all accounts declared in the \"accounts\" field at the root level of the config file to a target environment", - "encoding": "application/json", - "handler": "proxy" - } - ], - "operations": [], - "templates": [] - }, - { - "name": "@taqueria/plugin-tzcompose", - "version": "0.1", - "schema": "1.0", - "alias": "tzcompose", - "tasks": [ - { - "task": "run", - "command": "run ", - "aliases": [], - "description": "Runs a script using tzcompose", - "encoding": "none", - "handler": "proxy", - "options": [ - { - "shortFlag": "v", - "flag": "verbosity", - "description": "Verbose level (1-3)", - "type": "number" - } - ], - "positionals": [ - { - "placeholder": "scriptPath", - "description": "The path of the script to run using TzCompose", - "type": "string", - "required": true - } - ] - } - ], - "operations": [], - "templates": [] - } - ] -} diff --git a/apps/smart-contracts/asset-registry/.taq/testing-state.json b/apps/smart-contracts/asset-registry/.taq/testing-state.json deleted file mode 100644 index 780f6f15..00000000 --- a/apps/smart-contracts/asset-registry/.taq/testing-state.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "operations": {}, - "tasks": { - "@taqueria/plugin-taquito.transfer.1725871439467": { - "task": "transfer", - "plugin": "@taqueria/plugin-taquito", - "time": 1725871439468, - "output": [ - { - "contractAlias": "Main", - "contractAddress": "KT1A8tMnvwLjZmK8iZYMiXtuUZK7UDvFLTro", - "parameter": "(Pair \"tz1KobLotv3nAgLJ65pyF8z1a3USbkqNeb4P\"\n 1\n 1\n (Some { Elt \"\" 0x697066733a2f2f746f6b656e4d65746164617461434944 }))\n\n", - "entrypoint": "mint", - "mutezTransfer": "0", - "destination": "https://ghostnet.ecadinfra.com" - } - ] - }, - "@taqueria/plugin-taquito.transfer.1725871740871": { - "task": "transfer", - "plugin": "@taqueria/plugin-taquito", - "time": 1725871740871, - "output": [ - { - "contractAlias": "Main", - "contractAddress": "KT1A8tMnvwLjZmK8iZYMiXtuUZK7UDvFLTro", - "parameter": "{ Pair \"tz1KobLotv3nAgLJ65pyF8z1a3USbkqNeb4P\"\n { Pair \"tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb\" 1 0 } }\n\n", - "entrypoint": "transfer", - "mutezTransfer": "0", - "destination": "https://ghostnet.ecadinfra.com" - } - ] - }, - "@taqueria/plugin-taquito.transfer.1725875204802": { - "task": "transfer", - "plugin": "@taqueria/plugin-taquito", - "time": 1725875204802, - "output": [ - { - "contractAlias": "Main", - "contractAddress": "KT1A8tMnvwLjZmK8iZYMiXtuUZK7UDvFLTro", - "parameter": "(Pair \"tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb\"\n 2\n 1\n (Some { Elt \"\" 0x697066733a2f2f746f6b656e4d65746164617461434944 }))\n\n", - "entrypoint": "mint", - "mutezTransfer": "0", - "destination": "https://ghostnet.ecadinfra.com" - } - ] - }, - "@taqueria/plugin-taquito.transfer.1725875489655": { - "task": "transfer", - "plugin": "@taqueria/plugin-taquito", - "time": 1725875489655, - "output": [ - { - "contractAlias": "Main", - "contractAddress": "KT1A8tMnvwLjZmK8iZYMiXtuUZK7UDvFLTro", - "parameter": "{ Pair \"tz1KobLotv3nAgLJ65pyF8z1a3USbkqNeb4P\"\n { Pair \"tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb\" 1 2 } }\n\n", - "entrypoint": "transfer", - "mutezTransfer": "0", - "destination": "https://ghostnet.ecadinfra.com" - } - ] - }, - "@taqueria/plugin-taquito.transfer.1726050287328": { - "task": "transfer", - "plugin": "@taqueria/plugin-taquito", - "time": 1726050287328, - "output": [ - { - "contractAlias": "Main", - "contractAddress": "KT1PnXVgRyyCu15C3Z4k9F5C8UCQap7mUTZi", - "parameter": "(Pair \"KT1PnXVgRyyCu15C3Z4k9F5C8UCQap7mUTZi\"\n 0\n 1\n (Some { Elt \"\" 0x697066733a2f2f746f6b656e4d65746164617461434944 }))\n\n", - "entrypoint": "mint", - "mutezTransfer": "0", - "destination": "https://ghostnet.ecadinfra.com" - } - ] - } - } -} diff --git a/apps/smart-contracts/asset-registry/artifacts/main.default_storage.json b/apps/smart-contracts/asset-registry/artifacts/main.default_storage.json deleted file mode 100644 index ab1778ba..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.default_storage.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "prim": "Pair", - "args": [ - [], - [], - [], - { "prim": "Some", "args": [[]] }, - [], - { "string": "KT1Aj2TAF8Lw5GqNakf3C9WzW9tX9d5ts2d9" }, - { "prim": "Unit" } - ] -} diff --git a/apps/smart-contracts/asset-registry/artifacts/main.default_storage.tz b/apps/smart-contracts/asset-registry/artifacts/main.default_storage.tz deleted file mode 100644 index 9604cec0..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.default_storage.tz +++ /dev/null @@ -1,2 +0,0 @@ -(Pair "KT1P2kUcD97mqQWi7WMJfJaWSKZ6yU7caGTh" {} {} {} 0 (Some {}) {}) - diff --git a/apps/smart-contracts/asset-registry/artifacts/main.json b/apps/smart-contracts/asset-registry/artifacts/main.json deleted file mode 100644 index faac8b1f..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.json +++ /dev/null @@ -1,4923 +0,0 @@ -[ - { - "prim": "parameter", - "args": [ - { - "prim": "or", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%to_"] }, - { - "prim": "list", - "args": [ - { - "prim": "ticket", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "nat" }, { "prim": "option", "args": [{ "prim": "bytes" }] }] - } - ] - } - ], - "annots": ["%tickets_to_import"] - } - ] - } - ], - "annots": ["%import_ticket"] - }, - { - "prim": "or", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }], "annots": ["%destination"] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%to_"] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%from_"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%amount"] } - ] - } - ], - "annots": ["%ticketsToExport"] - } - ] - } - ], - "annots": ["%requests"] - } - ], - "annots": ["%export_ticket"] - }, - { - "prim": "or", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%spender"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%old_value"] }, - { "prim": "nat", "annots": ["%new_value"] } - ] - } - ], - "annots": ["%approve"] - }, - { - "prim": "or", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "or", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%operator"] }, - { "prim": "nat", "annots": ["%token_id"] } - ], - "annots": ["%addOperator"] - }, - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%operator"] }, - { "prim": "nat", "annots": ["%token_id"] } - ], - "annots": ["%removeOperator"] - } - ] - } - ], - "annots": ["%update_operators"] - }, - { - "prim": "or", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] } - ] - } - ], - "annots": ["%requests"] - }, - { - "prim": "contract", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] } - ], - "annots": ["%request"] - }, - { "prim": "nat", "annots": ["%balance"] } - ] - } - ] - } - ], - "annots": ["%callback"] - } - ], - "annots": ["%balance_of"] - }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%from_"] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%to_"] }, - { "prim": "nat", "annots": ["%amount"] }, - { "prim": "nat", "annots": ["%token_id"] } - ] - } - ], - "annots": ["%txs"] - } - ] - } - ], - "annots": ["%transfer"] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "prim": "storage", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }], "annots": ["%metadata"] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }], "annots": ["%assets"] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }], "annots": ["%token_info"] } - ] - } - ], - "annots": ["%token_metadata"] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ], - "annots": ["%operators"] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ], - "annots": ["%approvals"] - }, - { "prim": "address", "annots": ["%proxy"] }, - { "prim": "unit", "annots": ["%extension"] } - ] - } - ] - }, - { - "prim": "code", - "args": [ - [ - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2_TOKEN_UNDEFINED" }] }, - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2.1_INVALID_DESTINATION" }] }, - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2.1_INSUFFICIENT_ALLOWANCE" }] }, - { - "prim": "PUSH", - "args": [{ "prim": "string" }, { "string": "Ticket cannot be created (amount is problably 0)" }] - }, - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "NFT transaction amount should be 1n" }] }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" }, - [ - { "prim": "UNPAIR", "args": [{ "int": "4" }] }, - { "prim": "DUG", "args": [{ "int": "3" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "GET" }, - { "prim": "IF_NONE", "args": [[{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }], []] } - ] - ] - }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - [ - { "prim": "UNPAIR", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "UPDATE" } - ] - ] - }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UNPAIR", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2_INSUFFICIENT_BALANCE" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "COMPARE" }, - { "prim": "GE" }, - { "prim": "IF", "args": [[{ "prim": "DROP" }], [{ "prim": "FAILWITH" }]] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "SUB" }, - { "prim": "ABS" }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "EXEC" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "APPLY" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, { "prim": "nat" }] - }, - { "prim": "option", "args": [{ "prim": "address" }] }, - [{ "prim": "UNPAIR" }, { "prim": "SWAP" }, { "prim": "GET" }] - ] - }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - [ - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" } - ] - ] - }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "unit" }, - [ - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "DROP", "args": [{ "int": "4" }] }], - [ - { "prim": "SWAP" }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "GET" }, - { "prim": "IF_NONE", "args": [[{ "prim": "EMPTY_SET", "args": [{ "prim": "address" }] }], []] }, - { "prim": "SWAP" }, - { "prim": "MEM" }, - { - "prim": "IF", - "args": [ - [], - [ - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2_NOT_OPERATOR" }] }, - { "prim": "FAILWITH" } - ] - ] - } - ] - ] - }, - { "prim": "UNIT" } - ] - ] - }, - { - "prim": "LAMBDA", - "args": [ - { "prim": "address" }, - { "prim": "unit" }, - [ - { - "prim": "PUSH", - "args": [{ "prim": "string" }, { "string": "The sender can only manage operators for their own token" }] - }, - { "prim": "SENDER" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { "prim": "IF", "args": [[{ "prim": "DROP" }, { "prim": "UNIT" }], [{ "prim": "FAILWITH" }]] } - ] - ] - }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "address" }] } - ] - }, - { "prim": "string" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "nat" }] } - ] - } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "address" }] } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "option", "args": [{ "prim": "nat" }] }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "NONE", "args": [{ "prim": "nat" }] }], - [ - { "prim": "DROP" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }, - { "prim": "SOME" } - ] - ] - } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "APPLY" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "address" }] } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "nat" }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "PAIR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }], - [ - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }], - [{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }] - ] - } - ] - ] - } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "APPLY" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "address" }] } - ] - }, - { "prim": "string" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "UNPAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "PAIR" }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "DIG", "args": [{ "int": "4" }] }, { "prim": "DROP" }], - [{ "prim": "DIG", "args": [{ "int": "4" }] }, { "prim": "FAILWITH" }] - ] - }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "EXEC" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "APPLY" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "address" }] } - ] - }, - { "prim": "string" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "UNPAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "PAIR" }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DROP" } - ], - [{ "prim": "DIG", "args": [{ "int": "4" }] }, { "prim": "FAILWITH" }] - ] - }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "EXEC" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "APPLY" }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DROP", "args": [{ "int": "3" }] }, - { "prim": "EMPTY_BIG_MAP", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "PAIR", "args": [{ "int": "6" }] } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "APPLY" }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DROP", "args": [{ "int": "3" }] }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "nat" }] } - ] - } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { - "prim": "list", - "args": [ - { - "prim": "ticket", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "nat" }, { "prim": "option", "args": [{ "prim": "bytes" }] }] - } - ] - } - ] - } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "UNPAIR" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - } - ] - } - ] - }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "READ_TICKET" }, - { "prim": "SWAP" }, - { "prim": "DROP" }, - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "UNPAIR" }, - { "prim": "CAR" }, - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2.1_INVALID_TICKET" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "SELF_ADDRESS" }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { "prim": "IF", "args": [[{ "prim": "DROP" }], [{ "prim": "FAILWITH" }]] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "INT" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "ADD" }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "10" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_balance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%balance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE", "args": [{ "int": "1" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "SOME" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "CONS" }, - { "prim": "PAIR", "args": [{ "int": "3" }] } - ] - ] - }, - { "prim": "SWAP" }, - { "prim": "DROP" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - } - ] - } - ] - }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - } - ] - } - ] - }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NONE", "args": [{ "prim": "address" }] }, - { "prim": "PAIR" }, - { "prim": "CONS" }, - { "prim": "PAIR", "args": [{ "int": "3" }] } - ] - ] - }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DROP" }, - { "prim": "SWAP" }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "SWAP" } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "CAR" }, - { "prim": "UPDATE", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "APPLY" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "nat" }] } - ] - } - ] - } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "unit" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { "prim": "string" }, - { "prim": "string" }, - { "prim": "string" }, - { "prim": "string" } - ] - }, - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "option", "args": [{ "prim": "address" }] }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "nat" }, { "prim": "nat" }] - } - ] - } - ] - } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "UNPAIR" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "CAR" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "True" }] }], - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "False" }] }] - ] - }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "CDR" }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "DUP" }, - { "prim": "CDR" }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DROP" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "MEM" }, - { "prim": "NOT" }, - { - "prim": "IF", - "args": [[{ "prim": "DUP", "args": [{ "int": "18" }] }, { "prim": "FAILWITH" }], []] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "16" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "SWAP" }], - [ - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "GT" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "COMPARE" }, - { "prim": "GE" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "FAILWITH" } - ], - [ - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "SWAP" } - ] - ] - } - ] - ] - } - ], - [ - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "FAILWITH" } - ], - [ - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "SWAP" } - ] - ] - } - ] - ] - } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP" }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "COMPARE" }, - { "prim": "NEQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "SUB" }, - { "prim": "SWAP" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%spender"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_allowance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%allowance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "SWAP" } - ], - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DROP", "args": [{ "int": "2" }] } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "NEG" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SUB" }, - { "prim": "ABS" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_balance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%balance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "SWAP" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "SWAP" }, - { "prim": "UPDATE", "args": [{ "int": "1" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "CAR" }, - { "prim": "UPDATE", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "NONE", "args": [{ "prim": "bytes" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "PAIR" }, - { "prim": "TICKET" }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "SWAP" }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "FAILWITH" }], [{ "prim": "SWAP" }, { "prim": "DROP" }]] - }, - { "prim": "SWAP" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "DUG", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CAR" }, - { - "prim": "CONTRACT", - "args": [ - { - "prim": "ticket", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "option", "args": [{ "prim": "bytes" }] } - ] - } - ] - } - ] - }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "DUP", "args": [{ "int": "14" }] }, { "prim": "FAILWITH" }], []] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "PUSH", "args": [{ "prim": "mutez" }, { "int": "0" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "TRANSFER_TOKENS" }, - { "prim": "CONS" }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "SWAP" } - ] - ] - }, - { "prim": "DROP" } - ] - ] - } - ], - [] - ] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "CAR" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "False" }] }], - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "True" }] }] - ] - }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "CDR" }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "DUP" }, - { "prim": "CDR" }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DROP" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "MEM" }, - { "prim": "NOT" }, - { - "prim": "IF", - "args": [[{ "prim": "DUP", "args": [{ "int": "18" }] }, { "prim": "FAILWITH" }], []] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "16" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "SWAP" }], - [ - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "GT" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "COMPARE" }, - { "prim": "GE" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "FAILWITH" } - ], - [ - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "SWAP" } - ] - ] - } - ] - ] - } - ], - [ - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "FAILWITH" } - ], - [ - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "SWAP" } - ] - ] - } - ] - ] - } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP" }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "COMPARE" }, - { "prim": "NEQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "SUB" }, - { "prim": "SWAP" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%spender"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_allowance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%allowance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "SWAP" } - ], - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DROP", "args": [{ "int": "2" }] } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "NEG" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SUB" }, - { "prim": "ABS" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_balance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%balance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "SWAP" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "SWAP" }, - { "prim": "UPDATE", "args": [{ "int": "1" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "CAR" }, - { "prim": "UPDATE", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "NONE", "args": [{ "prim": "bytes" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "PAIR" }, - { "prim": "TICKET" }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "SWAP" }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "FAILWITH" }], [{ "prim": "SWAP" }, { "prim": "DROP" }]] - }, - { "prim": "SWAP" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "DUG", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "CAR" }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "DUP", "args": [{ "int": "15" }] }, { "prim": "FAILWITH" }], []] - }, - { - "prim": "CONTRACT", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%to_"] }, - { - "prim": "list", - "args": [ - { - "prim": "ticket", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "option", "args": [{ "prim": "bytes" }] } - ] - } - ] - } - ], - "annots": ["%ticketsToExport"] - } - ] - } - ] - } - ] - }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "FAILWITH" }], [{ "prim": "SWAP" }, { "prim": "DROP" }]] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "PUSH", "args": [{ "prim": "mutez" }, { "int": "0" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { - "prim": "list", - "args": [ - { - "prim": "ticket", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "option", "args": [{ "prim": "bytes" }] } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "prim": "NIL", - "args": [ - { - "prim": "ticket", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "option", "args": [{ "prim": "bytes" }] } - ] - } - ] - } - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "CONS" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "CAR" }, - { "prim": "PAIR" }, - { "prim": "CONS" }, - { "prim": "TRANSFER_TOKENS" }, - { "prim": "CONS" }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "SWAP" } - ] - ] - }, - { "prim": "DROP" } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "9" }] }, - { "prim": "DIG", "args": [{ "int": "10" }] }, - { "prim": "DIG", "args": [{ "int": "11" }] }, - { "prim": "DIG", "args": [{ "int": "12" }] }, - { "prim": "DROP", "args": [{ "int": "9" }] } - ], - [ - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "9" }] }, - { "prim": "DIG", "args": [{ "int": "10" }] }, - { "prim": "DIG", "args": [{ "int": "11" }] }, - { "prim": "DIG", "args": [{ "int": "12" }] }, - { "prim": "DROP", "args": [{ "int": "9" }] } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "DUG", "args": [{ "int": "2" }] } - ] - ] - }, - { "prim": "SWAP" }, - { "prim": "CAR" }, - { "prim": "UPDATE", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "DUP", "args": [{ "int": "10" }] }, - { "prim": "PAIR", "args": [{ "int": "8" }] }, - { "prim": "APPLY" }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "10" }] }, - { "prim": "DROP", "args": [{ "int": "2" }] }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UNPAIR" }, - { - "prim": "EMPTY_MAP", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "pair", "args": [{ "prim": "nat" }, { "prim": "int" }] } - ] - }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "UNPAIR", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "SWAP" }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [], - [ - { - "prim": "PUSH", - "args": [{ "prim": "string" }, { "string": "FA2.1_UNSAFE_APPROVAL_CHANGE" }] - }, - { "prim": "FAILWITH" } - ] - ] - }, - { "prim": "PUSH", "args": [{ "prim": "string" }, { "string": "FA2_NOT_OWNER" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { "prim": "IF", "args": [[{ "prim": "DROP" }], [{ "prim": "FAILWITH" }]] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "DUP" }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "8" }] }, - { "prim": "SUB" } - ], - [ - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "GET", "args": [{ "int": "8" }] }, - { "prim": "SUB" }, - { "prim": "SWAP" }, - { "prim": "CDR" }, - { "prim": "ADD" } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "8" }] }, - { "prim": "PAIR" }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" }, - { "prim": "DUG", "args": [{ "int": "2" }] } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DROP", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" }, - { "prim": "int" } - ] - }, - { "prim": "list", "args": [{ "prim": "operation" }] }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "UNPAIR" }, - { "prim": "PUSH", "args": [{ "prim": "int" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CDR" }, - { "prim": "COMPARE" }, - { "prim": "NEQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "CDR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "CAR" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%spender"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_allowance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%allowance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" } - ], - [{ "prim": "DROP", "args": [{ "int": "2" }] }] - ] - } - ] - ] - }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "PAIR" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ] - ] - }, - { "prim": "SWAP" }, - { "prim": "DROP" }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" } - ] - ] - }, - { "prim": "SWAP" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SWAP" }, - { "prim": "UPDATE", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "PAIR" }, - { "prim": "APPLY" }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DROP" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "lambda", "args": [{ "prim": "address" }, { "prim": "unit" }] }, - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "or", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "UNPAIR" }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DROP", "args": [{ "int": "4" }] }, - { - "prim": "PUSH", - "args": [{ "prim": "string" }, { "string": "The storage does not support operators management" }] - }, - { "prim": "FAILWITH" } - ], - [ - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }, { "prim": "bool" }] - } - ] - }, - { "prim": "PAIR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { - "prim": "IF_LEFT", - "args": [ - [ - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "DIG", "args": [{ "int": "4" }] }], - [ - { "prim": "DUP" }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "EMPTY_SET", "args": [{ "prim": "address" }] }], []] - }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "True" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "SOME" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR" }, - { "prim": "UPDATE" } - ] - ] - }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "bool" } - ] - } - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "bool" } - ] - } - ] - }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "True" }] } - ], - [ - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "DIG", "args": [{ "int": "4" }] }], - [ - { "prim": "DUP" }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "EMPTY_SET", "args": [{ "prim": "address" }] }], []] - }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "False" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "SIZE" }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DROP" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { - "prim": "NONE", - "args": [{ "prim": "set", "args": [{ "prim": "address" }] }] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR" }, - { "prim": "UPDATE" } - ], - [ - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "SOME" }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR" }, - { "prim": "UPDATE" } - ] - ] - } - ] - ] - }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "bool" } - ] - } - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { - "prim": "NIL", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "bool" } - ] - } - ] - }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "True" }] } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "CONS" }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DROP" }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "SOME" }, - { "prim": "UPDATE", "args": [{ "int": "7" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%operator"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "bool", "annots": ["%is_operator"] } - ] - } - ], - "annots": ["%newUpdates"] - }, - { "prim": "address", "annots": ["%sender"] } - ] - } - ], - "annots": ["%operator_update"] - }, - { "prim": "CONS" }, - { "prim": "PAIR" } - ] - ] - } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "APPLY" }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DROP" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "nat" }] } - ] - } - ] - } - ] - }, - { "prim": "string" } - ] - }, - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [{ "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }] - }, - { - "prim": "contract", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - } - ] - } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UNPAIR" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "UNPAIR" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PUSH", "args": [{ "prim": "mutez" }, { "int": "0" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { - "prim": "MAP", - "args": [ - [ - { "prim": "DUP" }, - { "prim": "UNPAIR" }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "MEM" }, - { "prim": "NOT" }, - { - "prim": "IF", - "args": [[{ "prim": "DUP", "args": [{ "int": "10" }] }, { "prim": "FAILWITH" }], []] - }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "SWAP" }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DROP", "args": [{ "int": "3" }] }, - { "prim": "TRANSFER_TOKENS" }, - { "prim": "CONS" }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "PAIR" }, - { "prim": "APPLY" }, - { - "prim": "LAMBDA", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { "prim": "nat" } - ] - }, - { "prim": "option", "args": [{ "prim": "nat" }] } - ] - } - ] - } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "unit" } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" }, - { "prim": "nat" } - ] - }, - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - } - ] - }, - { - "prim": "lambda", - "args": [ - { - "prim": "pair", - "args": [ - { - "prim": "big_map", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] - }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "address" }, - { "prim": "nat" } - ] - }, - { "prim": "nat" } - ] - }, - { "prim": "string" }, - { "prim": "string" } - ] - }, - { - "prim": "pair", - "args": [ - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address" }, - { - "prim": "list", - "args": [ - { - "prim": "pair", - "args": [{ "prim": "address" }, { "prim": "nat" }, { "prim": "nat" }] - } - ] - } - ] - } - ] - }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - } - ] - }, - { - "prim": "pair", - "args": [ - { "prim": "list", "args": [{ "prim": "operation" }] }, - { "prim": "big_map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - { "prim": "big_map", "args": [{ "prim": "nat" }, { "prim": "address" }] }, - { - "prim": "big_map", - "args": [ - { "prim": "nat" }, - { - "prim": "pair", - "args": [ - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] } - ] - } - ] - }, - { - "prim": "option", - "args": [ - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "set", "args": [{ "prim": "address" }] } - ] - } - ] - }, - { - "prim": "big_map", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "nat" } - ] - }, - { "prim": "address" }, - { "prim": "unit" } - ] - }, - [ - { "prim": "UNPAIR" }, - { "prim": "UNPAIR", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "UNPAIR" }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { - "prim": "EMPTY_MAP", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "address" }, { "prim": "nat" }] }, - { "prim": "pair", "args": [{ "prim": "nat" }, { "prim": "int" }] } - ] - }, - { - "prim": "EMPTY_MAP", - "args": [ - { "prim": "pair", "args": [{ "prim": "address" }, { "prim": "nat" }] }, - { "prim": "pair", "args": [{ "prim": "nat" }, { "prim": "int" }] } - ] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "UNPAIR" }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "SWAP" }, - { "prim": "UNPAIR", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "UNPAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "MEM" }, - { "prim": "NOT" }, - { - "prim": "IF", - "args": [[{ "prim": "DUP", "args": [{ "int": "16" }] }, { "prim": "FAILWITH" }], []] - }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "DIG", "args": [{ "int": "8" }] }], - [ - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "16" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "COMPARE" }, - { "prim": "GT" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "SWAP" }, - { "prim": "COMPARE" }, - { "prim": "GE" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "DIG", "args": [{ "int": "12" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "FAILWITH" } - ], - [ - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "DIG", "args": [{ "int": "8" }] } - ] - ] - } - ] - ] - } - ], - [ - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DROP" }, - { "prim": "DUP", "args": [{ "int": "15" }] }, - { "prim": "FAILWITH" } - ], - [ - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DROP" }, - { "prim": "DIG", "args": [{ "int": "8" }] } - ] - ] - } - ] - ] - } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "16" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "PAIR" }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "PAIR" }, - { "prim": "DUP", "args": [{ "int": "10" }] }, - { "prim": "SENDER" }, - { "prim": "DUP", "args": [{ "int": "17" }] }, - { "prim": "PAIR", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR" }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR" }, - { "prim": "DUP", "args": [{ "int": "14" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "PAIR" }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "SUB" }, - { "prim": "ABS" }, - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "ADD" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "UNPAIR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "NEG" }, - { "prim": "DUG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "15" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" } - ], - [ - { "prim": "DUP", "args": [{ "int": "13" }] }, - { "prim": "SWAP" }, - { "prim": "CDR" }, - { "prim": "SUB" }, - { "prim": "DUG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "15" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "UPDATE" } - ] - ] - }, - { "prim": "DUG", "args": [{ "int": "12" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UNPAIR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "INT" }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "12" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" } - ], - [ - { "prim": "DUP", "args": [{ "int": "10" }] }, - { "prim": "SWAP" }, - { "prim": "CDR" }, - { "prim": "ADD" }, - { "prim": "DUG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "12" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "PAIR" }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "UPDATE" } - ] - ] - }, - { "prim": "DUG", "args": [{ "int": "9" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "COMPARE" }, - { "prim": "NEQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "UNPAIR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [ - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "SUB" }, - { "prim": "SWAP" }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" } - ], - [ - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "SUB" }, - { "prim": "SWAP" }, - { "prim": "CDR" }, - { "prim": "ADD" }, - { "prim": "SWAP" }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "PAIR" }, - { "prim": "SOME" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE" } - ] - ] - }, - { "prim": "DUG", "args": [{ "int": "4" }] } - ], - [ - { "prim": "SWAP" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DROP", "args": [{ "int": "4" }] } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%from_"] }, - { "prim": "address", "annots": ["%to_"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%amount"] } - ] - } - ], - "annots": ["%transfer_event"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "DUG", "args": [{ "int": "6" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "5" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "DUP", "args": [{ "int": "11" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "9" }] }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "SWAP" }, - { "prim": "UPDATE", "args": [{ "int": "1" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DUP", "args": [{ "int": "8" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "6" }] }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "UPDATE", "args": [{ "int": "1" }] }, - { "prim": "PAIR", "args": [{ "int": "5" }] } - ] - ] - }, - { "prim": "SWAP" }, - { "prim": "DROP" } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DROP", "args": [{ "int": "5" }] }, - { "prim": "UNPAIR", "args": [{ "int": "5" }] }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "UPDATE", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "CAR" }, - { "prim": "UPDATE", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "UNPAIR" }, - { "prim": "PUSH", "args": [{ "prim": "int" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CDR" }, - { "prim": "COMPARE" }, - { "prim": "NEQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "CDR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "CAR" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CDR" }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "4" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_balance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%balance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" } - ], - [{ "prim": "DROP", "args": [{ "int": "2" }] }] - ] - } - ] - ] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "UNPAIR" }, - { "prim": "PUSH", "args": [{ "prim": "int" }, { "int": "0" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CDR" }, - { "prim": "COMPARE" }, - { "prim": "NEQ" }, - { - "prim": "IF", - "args": [ - [ - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "CDR" }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "CAR" }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "GET", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "4" }] }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "CAR" }, - { "prim": "PAIR", "args": [{ "int": "5" }] }, - { - "prim": "EMIT", - "args": [ - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%spender"] }, - { "prim": "nat", "annots": ["%token_id"] }, - { "prim": "nat", "annots": ["%new_allowance"] }, - { "prim": "int", "annots": ["%diff"] } - ] - } - ], - "annots": ["%allowance_update"] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" } - ], - [{ "prim": "DROP", "args": [{ "int": "2" }] }] - ] - } - ] - ] - }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { - "prim": "ITER", - "args": [ - [ - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "5" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "CONS" }, - { "prim": "DUG", "args": [{ "int": "3" }] } - ] - ] - }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "4" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "DUG", "args": [{ "int": "2" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "DIG", "args": [{ "int": "3" }] }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "SWAP" }, - { "prim": "NIL", "args": [{ "prim": "operation" }] }, - { "prim": "SWAP" }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "ITER", "args": [[{ "prim": "CONS" }]] }, - { "prim": "PAIR" } - ] - ] - }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "DUP", "args": [{ "int": "12" }] }, - { "prim": "PAIR", "args": [{ "int": "6" }] }, - { "prim": "APPLY" }, - { "prim": "DIG", "args": [{ "int": "6" }] }, - { "prim": "DIG", "args": [{ "int": "7" }] }, - { "prim": "DIG", "args": [{ "int": "8" }] }, - { "prim": "DIG", "args": [{ "int": "9" }] }, - { "prim": "DIG", "args": [{ "int": "10" }] }, - { "prim": "DIG", "args": [{ "int": "11" }] }, - { "prim": "DROP", "args": [{ "int": "6" }] }, - { "prim": "PAIR", "args": [{ "int": "6" }] }, - { "prim": "SWAP" }, - { "prim": "UNPAIR" }, - { - "prim": "IF_LEFT", - "args": [ - [ - { "prim": "PAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "10" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { - "prim": "IF_LEFT", - "args": [ - [ - { "prim": "PAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { - "prim": "IF_LEFT", - "args": [ - [ - { "prim": "PAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { - "prim": "IF_LEFT", - "args": [ - [ - { "prim": "PAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { - "prim": "IF_LEFT", - "args": [ - [ - { "prim": "PAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ], - [ - { "prim": "PAIR" }, - { "prim": "SWAP" }, - { "prim": "CAR" }, - { "prim": "SWAP" }, - { "prim": "EXEC" } - ] - ] - } - ] - ] - } - ] - ] - } - ] - ] - } - ] - ] - } - ] - ] - }, - { - "prim": "view", - "args": [ - { "string": "get_balance" }, - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "nat", "annots": ["%token_id"] } - ] - }, - { "prim": "nat" }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "CDR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }], - [ - { "prim": "SWAP" }, - { "prim": "CAR" }, - { "prim": "SWAP" }, - { "prim": "COMPARE" }, - { "prim": "EQ" }, - { - "prim": "IF", - "args": [ - [{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }], - [{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }] - ] - } - ] - ] - } - ] - ] - }, - { - "prim": "view", - "args": [ - { "string": "get_total_supply" }, - { "prim": "nat" }, - { "prim": "nat" }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "NONE", "args": [{ "prim": "nat" }] }], - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }, { "prim": "SOME" }] - ] - }, - { "prim": "IF_NONE", "args": [[{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }], []] } - ] - ] - }, - { - "prim": "view", - "args": [ - { "string": "is_operator" }, - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%operator"] }, - { "prim": "nat", "annots": ["%token_id"] } - ] - }, - { "prim": "bool" }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "7" }] }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "False" }] }], - [ - { "prim": "DUP", "args": [{ "int": "2" }] }, - { "prim": "GET", "args": [{ "int": "4" }] }, - { "prim": "DUP", "args": [{ "int": "3" }] }, - { "prim": "CAR" }, - { "prim": "PAIR" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "False" }] }], - [{ "prim": "SWAP" }, { "prim": "GET", "args": [{ "int": "3" }] }, { "prim": "MEM" }] - ] - } - ] - ] - } - ] - ] - }, - { - "prim": "view", - "args": [ - { "string": "get_allowance" }, - { - "prim": "pair", - "args": [ - { "prim": "address", "annots": ["%owner"] }, - { "prim": "address", "annots": ["%spender"] }, - { "prim": "nat", "annots": ["%token_id"] } - ] - }, - { "prim": "nat" }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "9" }] }, - { "prim": "SWAP" }, - { "prim": "GET" }, - { "prim": "IF_NONE", "args": [[{ "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "0" }] }], []] } - ] - ] - }, - { - "prim": "view", - "args": [ - { "string": "get_token_metadata" }, - { "prim": "nat" }, - { "prim": "map", "args": [{ "prim": "string" }, { "prim": "bytes" }] }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "5" }] }, - { "prim": "SWAP" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [[{ "prim": "EMPTY_MAP", "args": [{ "prim": "string" }, { "prim": "bytes" }] }], [{ "prim": "CDR" }]] - } - ] - ] - }, - { - "prim": "view", - "args": [ - { "string": "is_token" }, - { "prim": "nat" }, - { "prim": "bool" }, - [ - { "prim": "UNPAIR" }, - { "prim": "SWAP" }, - { "prim": "GET", "args": [{ "int": "3" }] }, - { "prim": "SWAP" }, - { "prim": "GET" }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "NONE", "args": [{ "prim": "nat" }] }], - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "nat" }, { "int": "1" }] }, { "prim": "SOME" }] - ] - }, - { - "prim": "IF_NONE", - "args": [ - [{ "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "False" }] }], - [{ "prim": "DROP" }, { "prim": "PUSH", "args": [{ "prim": "bool" }, { "prim": "True" }] }] - ] - } - ] - ] - } -] diff --git a/apps/smart-contracts/asset-registry/artifacts/main.parameter.mint_parameter.tz b/apps/smart-contracts/asset-registry/artifacts/main.parameter.mint_parameter.tz deleted file mode 100644 index 2b27cc85..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.parameter.mint_parameter.tz +++ /dev/null @@ -1,4 +0,0 @@ -(Left (Pair "b939315e-ae92-4cef-bc4c-3b1e1b43df6e" - "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" - (Some { Elt "" 0x697066733a2f2f746f6b656e4d65746164617461434944 }))) - diff --git a/apps/smart-contracts/asset-registry/artifacts/main.parameter.transfer_parameter.tz b/apps/smart-contracts/asset-registry/artifacts/main.parameter.transfer_parameter.tz deleted file mode 100644 index ef5d06b2..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.parameter.transfer_parameter.tz +++ /dev/null @@ -1,7 +0,0 @@ -(Right - (Right - (Right - (Right - { Pair "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" - { Pair "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" 1 0 } })))) - diff --git a/apps/smart-contracts/asset-registry/artifacts/main.parameter.update_operator_parameter.tz b/apps/smart-contracts/asset-registry/artifacts/main.parameter.update_operator_parameter.tz deleted file mode 100644 index 7b1e03d6..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.parameter.update_operator_parameter.tz +++ /dev/null @@ -1,6 +0,0 @@ -(Right - (Right - (Left { Left (Pair "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" - "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" - 0) }))) - diff --git a/apps/smart-contracts/asset-registry/artifacts/main.tz b/apps/smart-contracts/asset-registry/artifacts/main.tz deleted file mode 100644 index 87beeaec..00000000 --- a/apps/smart-contracts/asset-registry/artifacts/main.tz +++ /dev/null @@ -1,1340 +0,0 @@ -{ parameter - (or (pair %mint - (string %from_uuid) - (address %to_) - (option %token_info (map string bytes))) - (or (list %approve - (pair (address %owner) - (address %spender) - (nat %token_id) - (nat %old_value) - (nat %new_value))) - (or (list %update_operators - (or (pair %addOperator (address %owner) (address %operator) (nat %token_id)) - (pair %removeOperator (address %owner) (address %operator) (nat %token_id)))) - (or (pair %balance_of - (list %requests (pair (address %owner) (nat %token_id))) - (contract %callback - (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) - (list %transfer - (pair (address %from_) (list %txs (pair (address %to_) (nat %amount) (nat %token_id))))))))) ; - storage - (pair (address %registry) - (big_map %metadata string bytes) - (big_map %ledger nat address) - (big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes))) - (nat %token_index) - (option %operators (big_map (pair address nat) (set address))) - (big_map %approvals (pair address address nat) nat)) ; - code { PUSH string "FA2_TOKEN_UNDEFINED" ; - PUSH string "FA2.1_INSUFFICIENT_ALLOWANCE" ; - PUSH string "NFT transaction amount should be 1n" ; - LAMBDA - (pair address address nat (big_map (pair address address nat) nat)) - nat - { UNPAIR 4 ; PAIR 3 ; GET ; IF_NONE { PUSH nat 0 } {} } ; - LAMBDA - (pair (big_map (pair address address nat) nat) address address nat nat) - (big_map (pair address address nat) nat) - { UNPAIR 5 ; DIG 4 ; SOME ; DIG 4 ; DIG 4 ; DIG 4 ; PAIR 3 ; UPDATE } ; - LAMBDA (pair (big_map nat address) nat) (option address) { UNPAIR ; SWAP ; GET } ; - LAMBDA - (pair (big_map nat address) address nat) - (big_map nat address) - { UNPAIR 3 ; SWAP ; SOME ; DIG 2 ; UPDATE } ; - LAMBDA - (pair address nat (big_map (pair address nat) (set address))) - unit - { UNPAIR 3 ; - SENDER ; - DUP 2 ; - DUP 2 ; - COMPARE ; - EQ ; - IF { DROP 4 } - { DUG 3 ; - PAIR ; - GET ; - IF_NONE { EMPTY_SET address } {} ; - SWAP ; - MEM ; - IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } } ; - UNIT } ; - LAMBDA - address - unit - { PUSH string "The sender can only manage operators for their own token" ; - SENDER ; - DIG 2 ; - COMPARE ; - EQ ; - IF { DROP ; UNIT } { FAILWITH } } ; - LAMBDA - (pair nat (map string bytes) (big_map nat (pair nat (map string bytes)))) - (big_map nat (pair nat (map string bytes))) - { UNPAIR 3 ; DUG 2 ; DUP 3 ; PAIR ; SOME ; DIG 2 ; UPDATE } ; - PUSH string "Minting not allowed" ; - LAMBDA - (pair (pair (lambda (pair (big_map nat address) address nat) (big_map nat address)) - (lambda (pair (big_map nat address) nat) (option address)) - string) - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat))) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - LAMBDA - (pair (lambda (pair (big_map nat address) nat) (option address)) - (pair (big_map nat address) nat)) - (option nat) - { UNPAIR ; - SWAP ; - EXEC ; - IF_NONE { NONE nat } { DROP ; PUSH nat 1 ; SOME } } ; - DUP 4 ; - APPLY ; - LAMBDA - (pair (lambda (pair (big_map nat address) nat) (option address)) - (pair (big_map nat address) address nat)) - nat - { UNPAIR ; - SWAP ; - UNPAIR 3 ; - DIG 2 ; - SWAP ; - PAIR ; - DIG 2 ; - SWAP ; - EXEC ; - IF_NONE - { DROP ; PUSH nat 0 } - { COMPARE ; EQ ; IF { PUSH nat 1 } { PUSH nat 0 } } } ; - DUP 5 ; - APPLY ; - LAMBDA - (pair (pair (lambda (pair (big_map nat address) address nat) (big_map nat address)) - (lambda (pair (big_map nat address) nat) (option address)) - string) - (pair (big_map nat address) address nat nat)) - (big_map nat address) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - UNPAIR 4 ; - DUP 3 ; - DUP 2 ; - PAIR ; - DIG 6 ; - SWAP ; - EXEC ; - DROP ; - PUSH nat 1 ; - DIG 4 ; - COMPARE ; - EQ ; - IF { DIG 4 ; DROP } { DIG 4 ; FAILWITH } ; - PAIR 3 ; - EXEC } ; - DUP 7 ; - DUP 7 ; - DUP 7 ; - PAIR 3 ; - APPLY ; - LAMBDA - (pair (pair (lambda (pair (big_map nat address) address nat) (big_map nat address)) - (lambda (pair (big_map nat address) nat) (option address)) - string) - (pair (big_map nat address) address nat nat)) - (big_map nat address) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - UNPAIR 4 ; - DUP 3 ; - DUP 2 ; - PAIR ; - DIG 6 ; - SWAP ; - EXEC ; - DROP ; - PUSH nat 1 ; - DIG 4 ; - COMPARE ; - EQ ; - IF { DIG 4 ; DROP ; DUP 2 ; DROP } { DIG 4 ; FAILWITH } ; - PAIR 3 ; - EXEC } ; - DUP 8 ; - DUP 8 ; - DUP 8 ; - PAIR 3 ; - APPLY ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DROP 3 ; - EMPTY_BIG_MAP nat address ; - DIG 5 ; - GET 5 ; - PAIR 6 } ; - DUP 10 ; - DUP 8 ; - DUP 8 ; - PAIR 3 ; - APPLY ; - DIG 5 ; - DIG 6 ; - DIG 9 ; - DROP 3 ; - LAMBDA - (pair (pair (lambda - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat)))) - string - (lambda - (pair nat (map string bytes) (big_map nat (pair nat (map string bytes)))) - (big_map nat (pair nat (map string bytes))))) - (pair (pair string address (option (map string bytes))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - UNPAIR ; - DUP 2 ; - DIG 3 ; - SWAP ; - EXEC ; - DUG 2 ; - NIL operation ; - NIL operation ; - DUP 4 ; - CAR ; - DUP 4 ; - GET 3 ; - DUP 5 ; - CAR ; - PAIR ; - VIEW "get_entry" - (pair (pair %member - (address %did) - (or %status (unit %active) (unit %revoked)) - (string %issuer) - (string %uuid)) - (pair %user - (address %did) - (or %status (unit %active) (unit %revoked)) - (string %issuer) - (string %uuid))) ; - IF_NONE { DUP 6 ; FAILWITH } {} ; - DIG 6 ; - SWAP ; - CDR ; - CAR ; - SENDER ; - COMPARE ; - EQ ; - IF { DROP } { FAILWITH } ; - DUP 4 ; - GET 9 ; - DUP ; - DUP 7 ; - CAR ; - PAIR ; - DUP 7 ; - GET 10 ; - SWAP ; - EXEC ; - IF_NONE { PUSH nat 0 } {} ; - DUP ; - PUSH nat 0 ; - SWAP ; - COMPARE ; - EQ ; - IF {} { PUSH string "Token ID already exists" ; FAILWITH } ; - DUP 2 ; - DUP 6 ; - GET 3 ; - DUP 9 ; - CAR ; - PAIR 3 ; - DUP 8 ; - GET 9 ; - SWAP ; - EXEC ; - PUSH int 1 ; - DIG 2 ; - PUSH nat 1 ; - ADD ; - DUP 4 ; - PAIR 3 ; - PUSH int 1 ; - PUSH nat 1 ; - DIG 3 ; - ADD ; - DUP 4 ; - DUP 8 ; - GET 3 ; - PAIR 4 ; - EMIT %balance_update - (pair (address %owner) (nat %token_id) (nat %new_balance) (int %diff)) ; - SWAP ; - EMIT %total_supply_update - (pair (nat %token_id) (nat %new_total_supply) (int %diff)) ; - DUP 7 ; - GET 7 ; - DUP 4 ; - GET ; - IF_NONE { EMPTY_MAP string bytes } { CDR } ; - DUP 8 ; - GET 7 ; - DUP 2 ; - DUP 6 ; - PAIR 3 ; - DUP 11 ; - SWAP ; - EXEC ; - PUSH nat 0 ; - DUP 9 ; - GET 4 ; - IF_NONE { EMPTY_MAP string bytes } {} ; - SIZE ; - COMPARE ; - EQ ; - PUSH nat 0 ; - DIG 3 ; - SIZE ; - COMPARE ; - EQ ; - AND ; - IF { DUP 7 ; - GET 4 ; - IF_NONE { PUSH string "Token info must be provided" ; FAILWITH } { DROP } } - {} ; - PUSH nat 0 ; - DUP 8 ; - GET 4 ; - IF_NONE { EMPTY_MAP string bytes } {} ; - SIZE ; - COMPARE ; - GT ; - IF { DROP ; - DUP 7 ; - GET 7 ; - DUP 7 ; - GET 4 ; - IF_NONE { EMPTY_MAP string bytes } {} ; - DUP 5 ; - PAIR 3 ; - DIG 9 ; - SWAP ; - EXEC ; - DUP 7 ; - GET 4 ; - DUP 5 ; - PAIR ; - EMIT %token_metadata_update - (pair (nat %token_id) (option %new_metadata (map string bytes))) ; - NIL operation ; - DIG 7 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 5 } - { DIG 9 ; DROP } ; - PUSH nat 1 ; - DIG 4 ; - DIG 7 ; - GET 3 ; - DUP 10 ; - CAR ; - PAIR 4 ; - DUP 8 ; - GET 5 ; - SWAP ; - EXEC ; - NIL operation ; - DIG 6 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - DIG 3 ; - CONS ; - DUG 4 ; - NIL operation ; - DIG 5 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - DIG 3 ; - CONS ; - ITER { NIL operation ; - DIG 4 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 2 } ; - DIG 4 ; - SWAP ; - UPDATE 1 ; - CAR ; - SWAP ; - DUP 4 ; - PUSH nat 1 ; - DIG 5 ; - GET 9 ; - ADD ; - UPDATE 9 ; - SWAP ; - UPDATE 7 ; - SWAP ; - UPDATE 5 ; - SWAP ; - PAIR } ; - DUP 4 ; - DUP 4 ; - DUP 4 ; - PAIR 3 ; - APPLY ; - DIG 2 ; - DIG 3 ; - DROP 2 ; - LAMBDA - (pair (pair (lambda - (pair (big_map (pair address address nat) nat) address address nat nat) - (big_map (pair address address nat) nat)) - (lambda (pair address address nat (big_map (pair address address nat) nat)) nat)) - (pair (list (pair address address nat nat nat)) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR ; - DIG 2 ; - UNPAIR ; - EMPTY_MAP (pair address address nat) (pair nat int) ; - DUP 3 ; - GET 12 ; - NIL operation ; - DIG 3 ; - ITER { DIG 2 ; - DUP 2 ; - UNPAIR 5 ; - DUP 6 ; - DUP 4 ; - DUP 4 ; - DUP 4 ; - PAIR 4 ; - DUP 13 ; - SWAP ; - EXEC ; - DIG 4 ; - SWAP ; - COMPARE ; - EQ ; - IF {} { PUSH string "FA2.1_UNSAFE_APPROVAL_CHANGE" ; FAILWITH } ; - PUSH string "FA2_NOT_OWNER" ; - SENDER ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP } { FAILWITH } ; - DIG 4 ; - PAIR 5 ; - DUP 6 ; - SWAP ; - EXEC ; - DUG 2 ; - DUP ; - GET 5 ; - DUP 2 ; - GET 3 ; - DUP 3 ; - CAR ; - PAIR 3 ; - DUP 5 ; - DUP 2 ; - GET ; - IF_NONE - { DUP 2 ; GET 7 ; DUP 3 ; GET 8 ; SUB } - { DUP 3 ; GET 7 ; DUP 4 ; GET 8 ; SUB ; SWAP ; CDR ; ADD } ; - DIG 5 ; - SWAP ; - DIG 3 ; - GET 8 ; - PAIR ; - SOME ; - DIG 2 ; - UPDATE ; - DUG 2 } ; - DIG 4 ; - DIG 5 ; - DROP 2 ; - NIL operation ; - DIG 3 ; - LAMBDA - (pair (list operation) (pair address address nat) nat int) - (list operation) - { UNPAIR ; - SWAP ; - UNPAIR ; - PUSH int 0 ; - DUP 3 ; - CDR ; - COMPARE ; - NEQ ; - IF { DUP 2 ; - CDR ; - DIG 2 ; - CAR ; - DUP 3 ; - GET 4 ; - DUP 4 ; - GET 3 ; - DIG 4 ; - CAR ; - PAIR 5 ; - EMIT %allowance_update - (pair (address %owner) - (address %spender) - (nat %token_id) - (nat %new_allowance) - (int %diff)) ; - NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } - { DROP 2 } } ; - DUG 2 ; - ITER { SWAP ; PAIR ; DUP 2 ; SWAP ; EXEC } ; - SWAP ; - DROP ; - ITER { NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } ; - SWAP ; - DIG 2 ; - SWAP ; - UPDATE 12 ; - SWAP ; - PAIR } ; - DUP 7 ; - DUP 7 ; - PAIR ; - APPLY ; - LAMBDA - (pair (lambda address unit) - (pair (list (or (pair address address nat) (pair address address nat))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - SWAP ; - UNPAIR ; - SENDER ; - DUP 3 ; - GET 11 ; - IF_NONE - { DROP 4 ; - PUSH string "The storage does not support operators management" ; - FAILWITH } - { NIL (pair address address nat bool) ; - PAIR ; - DIG 2 ; - ITER { SWAP ; - UNPAIR ; - DIG 2 ; - IF_LEFT - { UNPAIR 3 ; - DUP 2 ; - DUP 2 ; - COMPARE ; - EQ ; - IF { DIG 4 } - { DUP ; - DUP 9 ; - SWAP ; - EXEC ; - DROP ; - DUP 5 ; - DUP 4 ; - DUP 3 ; - PAIR ; - GET ; - IF_NONE { EMPTY_SET address } {} ; - DUP 3 ; - SWAP ; - PUSH bool True ; - DIG 2 ; - UPDATE ; - DIG 5 ; - SWAP ; - SOME ; - DUP 5 ; - DUP 4 ; - PAIR ; - UPDATE } ; - NIL (pair address address nat bool) ; - DIG 5 ; - NIL (pair address address nat bool) ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - PUSH bool True } - { UNPAIR 3 ; - DUP 2 ; - DUP 2 ; - COMPARE ; - EQ ; - IF { DIG 4 } - { DUP ; - DUP 9 ; - SWAP ; - EXEC ; - DROP ; - DUP 5 ; - DUP 4 ; - DUP 3 ; - PAIR ; - GET ; - IF_NONE { EMPTY_SET address } {} ; - DUP 3 ; - SWAP ; - PUSH bool False ; - DIG 2 ; - UPDATE ; - PUSH nat 0 ; - DUP 2 ; - SIZE ; - COMPARE ; - EQ ; - IF { DROP ; DIG 4 ; NONE (set address) ; DUP 5 ; DUP 4 ; PAIR ; UPDATE } - { DIG 5 ; SWAP ; SOME ; DUP 5 ; DUP 4 ; PAIR ; UPDATE } } ; - NIL (pair address address nat bool) ; - DIG 5 ; - NIL (pair address address nat bool) ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - PUSH bool True } ; - DIG 5 ; - DIG 5 ; - DIG 5 ; - PAIR 4 ; - CONS ; - PAIR } ; - DIG 3 ; - DROP ; - UNPAIR ; - DIG 3 ; - DIG 2 ; - SOME ; - UPDATE 11 ; - NIL operation ; - DIG 3 ; - DIG 3 ; - PAIR ; - EMIT %operator_update - (pair (list %newUpdates - (pair (address %owner) (address %operator) (nat %token_id) (bool %is_operator))) - (address %sender)) ; - CONS ; - PAIR } } ; - DUP 5 ; - APPLY ; - DIG 4 ; - DROP ; - LAMBDA - (pair (pair (lambda - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat)))) - string) - (pair (pair (list (pair address nat)) (contract (list (pair (pair address nat) nat)))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR ; - DIG 2 ; - UNPAIR ; - DUP 2 ; - DIG 3 ; - SWAP ; - EXEC ; - DUG 2 ; - UNPAIR ; - DUP 3 ; - NIL operation ; - DIG 3 ; - PUSH mutez 0 ; - DIG 4 ; - MAP { DUP ; - UNPAIR ; - DUP 8 ; - GET 7 ; - DUP 3 ; - MEM ; - NOT ; - IF { DUP 10 ; FAILWITH } {} ; - DUP 9 ; - CAR ; - PAIR 3 ; - DUP 8 ; - GET 9 ; - SWAP ; - EXEC ; - SWAP ; - PAIR } ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DROP 3 ; - TRANSFER_TOKENS ; - CONS ; - PAIR } ; - DUP 10 ; - DUP 6 ; - PAIR ; - APPLY ; - LAMBDA - (pair (pair (lambda - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat)))) - (lambda (pair address nat (big_map (pair address nat) (set address))) unit) - (lambda - (pair (big_map (pair address address nat) nat) address address nat nat) - (big_map (pair address address nat) nat)) - (lambda (pair address address nat (big_map (pair address address nat) nat)) nat) - string - string) - (pair (list (pair address (list (pair address nat nat)))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR 6 ; - DIG 6 ; - UNPAIR ; - DUP 2 ; - DIG 3 ; - SWAP ; - EXEC ; - DUG 2 ; - NIL operation ; - EMPTY_MAP (pair address address nat) (pair nat int) ; - EMPTY_MAP (pair address nat) (pair nat int) ; - NIL operation ; - DUP 6 ; - GET 12 ; - DIG 7 ; - PAIR 5 ; - DIG 2 ; - ITER { SWAP ; - UNPAIR 5 ; - DIG 5 ; - UNPAIR ; - DIG 6 ; - DIG 6 ; - DIG 6 ; - DIG 6 ; - DIG 6 ; - PAIR 5 ; - DIG 2 ; - ITER { SWAP ; - UNPAIR 5 ; - DIG 2 ; - DIG 3 ; - DIG 4 ; - DIG 5 ; - UNPAIR 3 ; - DUP 11 ; - GET 7 ; - DUP 4 ; - MEM ; - NOT ; - IF { DUP 16 ; FAILWITH } {} ; - DUP 8 ; - DUP 4 ; - SENDER ; - DUP 12 ; - PAIR 4 ; - DUP 15 ; - SWAP ; - EXEC ; - SENDER ; - DUP 11 ; - COMPARE ; - EQ ; - IF { DIG 8 } - { DUP 9 ; - DUP 5 ; - SENDER ; - DUP 13 ; - PAIR 4 ; - DUP 16 ; - SWAP ; - EXEC ; - PUSH nat 0 ; - DUP 2 ; - COMPARE ; - GT ; - IF { DUP 4 ; - SWAP ; - COMPARE ; - GE ; - IF { DUP 3 ; - DUP 5 ; - SENDER ; - DUP 13 ; - DIG 12 ; - DUP ; - DUP 5 ; - DUP 5 ; - DUP 5 ; - PAIR 4 ; - DUP 20 ; - SWAP ; - EXEC ; - PUSH string "FA2_INSUFFICIENT_BALANCE" ; - DUP 7 ; - DUP 3 ; - COMPARE ; - GE ; - IF { DROP } { FAILWITH } ; - DIG 5 ; - SWAP ; - SUB ; - ABS ; - DUG 4 ; - PAIR 5 ; - DUP 14 ; - SWAP ; - EXEC } - { DUP 12 ; - GET 11 ; - IF_NONE - { DIG 8 ; DROP ; DUP 15 ; FAILWITH } - { DUP 5 ; DUP 12 ; PAIR 3 ; DUP 14 ; SWAP ; EXEC ; DROP ; DIG 8 } } } - { DROP ; - DUP 12 ; - GET 11 ; - IF_NONE - { DIG 8 ; DROP ; DUP 15 ; FAILWITH } - { DUP 5 ; DUP 12 ; PAIR 3 ; DUP 14 ; SWAP ; EXEC ; DROP ; DIG 8 } } } ; - DUP ; - DUP 6 ; - SENDER ; - DUP 13 ; - PAIR 4 ; - DUP 16 ; - SWAP ; - EXEC ; - DUP 6 ; - DUP 12 ; - DUP 12 ; - CAR ; - PAIR 3 ; - DUP 11 ; - GET 9 ; - SWAP ; - EXEC ; - DUP 7 ; - DUP 6 ; - DUP 13 ; - CAR ; - PAIR 3 ; - DUP 12 ; - GET 9 ; - SWAP ; - EXEC ; - DUP 8 ; - DUP 14 ; - PAIR ; - DUP 9 ; - DUP 8 ; - PAIR ; - DUP 10 ; - SENDER ; - DUP 17 ; - PAIR 3 ; - DUP 13 ; - DUP 4 ; - PAIR ; - DUP 14 ; - DUP 4 ; - PAIR ; - DUP 14 ; - DUP 4 ; - PAIR ; - DUP 13 ; - DIG 8 ; - SUB ; - ABS ; - DUP 13 ; - DIG 8 ; - ADD ; - DIG 4 ; - UNPAIR ; - GET ; - IF_NONE - { DUP 12 ; - NEG ; - DUG 7 ; - DIG 15 ; - DIG 8 ; - DIG 3 ; - PAIR ; - DIG 7 ; - DUG 2 ; - SOME ; - DIG 2 ; - UPDATE } - { DUP 13 ; - SWAP ; - CDR ; - SUB ; - DUG 7 ; - DIG 15 ; - DIG 8 ; - DIG 3 ; - PAIR ; - SOME ; - DIG 7 ; - UPDATE } ; - DUG 12 ; - DIG 2 ; - UNPAIR ; - GET ; - IF_NONE - { DUP 9 ; - INT ; - DUG 4 ; - DIG 12 ; - DIG 5 ; - DIG 2 ; - PAIR ; - DIG 4 ; - DUG 2 ; - SOME ; - DIG 2 ; - UPDATE } - { DUP 10 ; - SWAP ; - CDR ; - ADD ; - DUG 4 ; - DIG 12 ; - DIG 5 ; - DIG 2 ; - PAIR ; - SOME ; - DIG 4 ; - UPDATE } ; - DUG 9 ; - DUP 3 ; - DUP 6 ; - COMPARE ; - NEQ ; - IF { UNPAIR ; - GET ; - IF_NONE - { DIG 3 ; - DUP 3 ; - SUB ; - SWAP ; - DIG 7 ; - DIG 2 ; - DIG 3 ; - PAIR ; - SOME ; - DIG 2 ; - UPDATE } - { DIG 4 ; - DUP 4 ; - SUB ; - SWAP ; - CDR ; - ADD ; - SWAP ; - DIG 7 ; - DIG 2 ; - DIG 3 ; - PAIR ; - SOME ; - DIG 2 ; - UPDATE } ; - DUG 4 } - { SWAP ; DIG 2 ; DIG 4 ; DROP 4 } ; - DUP 3 ; - DUP 5 ; - DUP 4 ; - DUP 12 ; - PAIR 4 ; - EMIT %transfer_event - (pair (address %from_) (address %to_) (nat %token_id) (nat %amount)) ; - NIL operation ; - DIG 8 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 6 ; - DUP 3 ; - DUP 5 ; - DUP 11 ; - DUP 11 ; - CAR ; - PAIR 4 ; - DUP 9 ; - GET 7 ; - SWAP ; - EXEC ; - DIG 8 ; - SWAP ; - UPDATE 1 ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DIG 4 ; - DIG 6 ; - DIG 7 ; - DIG 7 ; - DUP 8 ; - CAR ; - PAIR 4 ; - DUP 6 ; - GET 5 ; - SWAP ; - EXEC ; - DIG 5 ; - SWAP ; - UPDATE 1 ; - PAIR 5 } ; - SWAP ; - DROP } ; - DIG 3 ; - DIG 4 ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DROP 5 ; - UNPAIR 5 ; - DIG 6 ; - DIG 2 ; - UPDATE 12 ; - SWAP ; - CAR ; - UPDATE 5 ; - NIL operation ; - DIG 3 ; - ITER { UNPAIR ; - PUSH int 0 ; - DUP 3 ; - CDR ; - COMPARE ; - NEQ ; - IF { DUP 2 ; - CDR ; - DIG 2 ; - CAR ; - DUP 3 ; - CDR ; - DIG 3 ; - CAR ; - PAIR 4 ; - EMIT %balance_update - (pair (address %owner) (nat %token_id) (nat %new_balance) (int %diff)) ; - NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } - { DROP 2 } } ; - NIL operation ; - DIG 4 ; - ITER { UNPAIR ; - PUSH int 0 ; - DUP 3 ; - CDR ; - COMPARE ; - NEQ ; - IF { DUP 2 ; - CDR ; - DIG 2 ; - CAR ; - DUP 3 ; - GET 4 ; - DUP 4 ; - GET 3 ; - DIG 4 ; - CAR ; - PAIR 5 ; - EMIT %allowance_update - (pair (address %owner) - (address %spender) - (nat %token_id) - (nat %new_allowance) - (int %diff)) ; - NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } - { DROP 2 } } ; - DIG 3 ; - ITER { NIL operation ; - DIG 5 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 3 } ; - NIL operation ; - DIG 4 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - DUG 2 ; - NIL operation ; - DIG 3 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - PAIR } ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - PAIR 6 ; - APPLY ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DIG 8 ; - DIG 9 ; - DIG 10 ; - DROP 6 ; - PAIR 5 ; - SWAP ; - UNPAIR ; - IF_LEFT - { PAIR ; SWAP ; GET 8 ; SWAP ; EXEC } - { IF_LEFT - { PAIR ; SWAP ; GET 7 ; SWAP ; EXEC } - { IF_LEFT - { PAIR ; SWAP ; GET 5 ; SWAP ; EXEC } - { IF_LEFT - { PAIR ; SWAP ; GET 3 ; SWAP ; EXEC } - { PAIR ; SWAP ; CAR ; SWAP ; EXEC } } } } } ; - view "get_balance" - (pair (address %owner) (nat %token_id)) - nat - { UNPAIR ; - SWAP ; - GET 5 ; - DUP 2 ; - CDR ; - GET ; - IF_NONE - { DROP ; PUSH nat 0 } - { SWAP ; - CAR ; - SWAP ; - COMPARE ; - EQ ; - IF { PUSH nat 1 } { PUSH nat 0 } } } ; - view "get_total_supply" - nat - nat - { UNPAIR ; - SWAP ; - GET 5 ; - SWAP ; - GET ; - IF_NONE { NONE nat } { DROP ; PUSH nat 1 ; SOME } ; - IF_NONE { PUSH nat 0 } {} } ; - view "is_operator" - (pair (address %owner) (address %operator) (nat %token_id)) - bool - { UNPAIR ; - SWAP ; - GET 11 ; - IF_NONE - { DROP ; PUSH bool False } - { DUP 2 ; - GET 4 ; - DUP 3 ; - CAR ; - PAIR ; - GET ; - IF_NONE { DROP ; PUSH bool False } { SWAP ; GET 3 ; MEM } } } ; - view "get_allowance" - (pair (address %owner) (address %spender) (nat %token_id)) - nat - { UNPAIR ; SWAP ; GET 12 ; SWAP ; GET ; IF_NONE { PUSH nat 0 } {} } ; - view "get_token_metadata" - nat - (map string bytes) - { UNPAIR ; - SWAP ; - GET 7 ; - SWAP ; - GET ; - IF_NONE { EMPTY_MAP string bytes } { CDR } } ; - view "is_token" - nat - bool - { UNPAIR ; - SWAP ; - GET 5 ; - SWAP ; - GET ; - IF_NONE { NONE nat } { DROP ; PUSH nat 1 ; SOME } ; - IF_NONE { PUSH bool False } { DROP ; PUSH bool True } } } - diff --git a/apps/smart-contracts/asset-registry/contracts/Main.jsligo b/apps/smart-contracts/asset-registry/contracts/Main.jsligo deleted file mode 100644 index 4939ddad..00000000 --- a/apps/smart-contracts/asset-registry/contracts/Main.jsligo +++ /dev/null @@ -1,43 +0,0 @@ -#import "./data/ledger.jsligo" "Ledger" -#import "./data/metadata.jsligo" "Metadata" - -export #import "./generic/fa2.1.jsligo" "Generic" - -//// This is an NFT marketplace derived from the generic FA2.1 implementation. - -/// The main customisation happens in the two declarations below. -/// -/// The Ledger.NFT.L type and associated Ledger.NFT.ledger_module -/// are used to keep track of token-specific information. An NFT -/// it records the owner of each token, but, for example, in a simple -/// currency-like financial asset (e.g. fa2.1-single-asset.jsligo), -/// the ledger type and module would keep track of the amount owned by -/// each "shareholder-like" account. - -export type Storage = Generic.Storage; - -const specialised : Generic.Interface = - Generic.make(Ledger.NFT.ledger_module); - -const specialisedViews : Generic.InterfaceViews = - Generic.makeViews(Ledger.NFT.ledger_module); - -/// Following that, the entry points and views are exported from the -/// specialised implementation: -@entry const transfer = (p, s) => specialised.transfer([p, s]); -@entry const balance_of = (p, s) => specialised.balance_of([p, s]); -@entry const update_operators = (p, s) => specialised.update_operators([p, s]); -@entry const approve = (p, s) => specialised.approve([p, s]); -// @entry const export_ticket = (p, s) => specialised.export_ticket([p, s]); -// @entry const import_ticket = (p, s) => specialised.import_ticket([p, s]); -@entry const mint = (p, s) => specialised.mint([p, s]); - -@view const get_balance = (p, s) => specialisedViews.get_balance([p, s]); -@view const get_total_supply = (p, s) => specialisedViews.get_total_supply([p, s]); -@view const is_operator = (p, s) => specialisedViews.is_operator([p, s]); -@view const get_allowance = (p, s) => specialisedViews.get_allowance([p, s]); -@view const get_token_metadata = (p, s) => specialisedViews.get_token_metadata([p, s]); -@view const is_token = (p, s) => specialisedViews.is_token([p, s]); - -/// You can then add your own entry points like you would do in any contract, by adding e.g. -// @view const get_marketplace_name = (_params: unit, _s: Storage) : string => "My NFT Marketplace"; diff --git a/apps/smart-contracts/asset-registry/contracts/Main.parameterList.jsligo b/apps/smart-contracts/asset-registry/contracts/Main.parameterList.jsligo deleted file mode 100644 index 9bebeed8..00000000 --- a/apps/smart-contracts/asset-registry/contracts/Main.parameterList.jsligo +++ /dev/null @@ -1,32 +0,0 @@ -#import "main.jsligo" "Contract" -#import "./data/operators.jsligo" "Operators" - -// When this file was created, the smart contract was defined with an entrypoint using `@entry` that was not within a namespace. As such, the examples below are written with that assumption in mind. - -// IMPORTANT: We suggest always explicitly typing your storage values: -// E.g.: `const storage: int = 10` or `const storage: Contract.storage = 10` - -const mint_parameter: parameter_of Contract = Mint({ - from_uuid: "b939315e-ae92-4cef-bc4c-3b1e1b43df6e", - to_: "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) -}); - -const update_operator_parameter: parameter_of Contract = Update_operators([ - AddOperator({ - owner: "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" as address, - operator: "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" as address, - token_id: 0 as nat - }) -]); - -const transfer_parameter: parameter_of Contract = Transfer([{ - from_: "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6" as address, - txs: [{ - to_: "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" as address, - token_id: 0 as nat, - amount: 1 as nat - }] -}]); diff --git a/apps/smart-contracts/asset-registry/contracts/Main.storageList.jsligo b/apps/smart-contracts/asset-registry/contracts/Main.storageList.jsligo deleted file mode 100644 index ac0fb7b2..00000000 --- a/apps/smart-contracts/asset-registry/contracts/Main.storageList.jsligo +++ /dev/null @@ -1,12 +0,0 @@ -#import "main.jsligo" "Contract" -// const default_storage : Contract..storage = 10; - -const default_storage: Contract.Storage = { - registry: "KT1P2kUcD97mqQWi7WMJfJaWSKZ6yU7caGTh" as address, - token_index: 0n, - metadata: Big_map.empty, - ledger: Big_map.empty, - token_metadata: Big_map.empty, - operators: Some(Big_map.empty), - approvals: Big_map.empty, -} diff --git a/apps/smart-contracts/asset-registry/contracts/Main.test.jsligo b/apps/smart-contracts/asset-registry/contracts/Main.test.jsligo deleted file mode 100644 index 64ceb90f..00000000 --- a/apps/smart-contracts/asset-registry/contracts/Main.test.jsligo +++ /dev/null @@ -1,400 +0,0 @@ -#import "./Main.jsligo" "Contract" -#import "./data/tokenMetadata.jsligo" "TokenMetadata" - -#import "../lib/registry/registry.jsligo" "Registry" -#import "../lib/registry/storage.jsligo" "RegistryStorage" - - -const initial_storage = { - registry: "KT1P2kUcD97mqQWi7WMJfJaWSKZ6yU7caGTh" as address, - metadata: Big_map.empty as Contract.Generic.Metadata.t, - token_index: 0 as nat, - ledger: Big_map.empty as Contract.Generic.Ledger.NFT.L, - token_metadata: Big_map.empty as Contract.Generic.TokenMetadata.T, - operators: Some(Big_map.empty as Contract.Generic.Operators.t), - approvals: Big_map.empty as Contract.Generic.Approvals.T, -}; - -const registry_intial_storage = { - member_registry: Big_map.literal(list([ - [("tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy" as address), ({ - did: "tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy" as address, - status: Active(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])), - trust_anchor: { - did: "tz1ggujjYjA7oYoaZBzTg1tYSXn3VMjcgDuv" as address, - status: Active(), - uuid: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8" - }, - user_registry: Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: "tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy" as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])) -}; - -const run_mint_test = () => { - Test.Next.State.reset(3n, [] as list ); - const _admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Active(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry }, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 10tez); - - const args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - - Test.Next.State.set_source(alice); - const _result = Test.Next.Contract.transfer_exn(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), args, 0tez); - - const new_storage = { - registry: registryAddress as address, - metadata: Big_map.empty as Contract.Generic.Metadata.t, - token_index: 1 as nat, - ledger: Big_map.literal([ - [0 as nat, bob] - ]) as Contract.Generic.Ledger.NFT.L, - token_metadata: Big_map.literal([ - [0 as nat, { - token_id: 0 as nat, - token_info: Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ]) - }] - ]), - operators: Some(Big_map.empty as Contract.Generic.Operators.t), - approvals: Big_map.empty as Contract.Generic.Approvals.T, - } as Contract.Storage; - - return Assert.assert(Test.Next.Compare.eq(Test.Next.Typed_address.get_storage(orig.taddr), new_storage)); -}; - -const test_mint = run_mint_test(); - -const run_failed_minting_not_allowed_invalid_user_test = () => { - Test.Next.State.reset(3n, [] as list ); - const _admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Revoked(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry }, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 0tez); - const args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:INVALID_UUID", // invalid uuid - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - const result = Test.Next.Contract.transfer(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), args, 0tez); - - match(result) { - when(Fail(_x)): Test.Next.IO.log("Failed Minting not allowed with invalid user test as expected"); - when(Success(_s)): failwith("This should not succeed") - }; -}; - -const test_failed_minting_not_allowed_invalid_user_test = run_failed_minting_not_allowed_invalid_user_test(); - -const run_failed_minting_not_allowed_inactive_member_test = () => { - Test.Next.State.reset(3n, [] as list ); - const _admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Revoked(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry}, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 0tez); - const args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", // invalid uuid - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - const result = Test.Next.Contract.transfer(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), args, 0tez); - - match(result) { - when(Fail(_x)): Test.Next.IO.log("Failed Minting not allowed with invactive member test as expected"); - when(Success(_s)): failwith("This should not succeed") - }; -}; - -const test_failed_minting_not_allowed_inactive_member_test = run_failed_minting_not_allowed_inactive_member_test(); - -const run_failed_mint_not_NFT_test = () => { - Test.Next.State.reset(3n, [] as list ); - const _admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Active(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry }, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 0tez); - const args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - const result = Test.Next.Contract.transfer(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), args, 0tez); - - match(result) { - when(Fail(_x)): Test.Next.IO.log("Failed NON NFT test as expected"); - when(Success(_s)): failwith("This should not succeed") - }; -}; - -const test_failed_mint_not_NFT = run_failed_mint_not_NFT_test(); - -const run_failed_mint_existing_token_test = () => { - Test.Next.State.reset(3n, [] as list ); - const _admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Active(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry }, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 0tez); - const args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - const _result = Test.Next.Contract.transfer(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), args, 0tez); - const result2 = Test.Next.Contract.transfer(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), args, 0tez); - - match(result2) { - when(Fail(_x)): Test.Next.IO.log("Failed existing token test as expected"); - when(Success(_s)): failwith("This should not succeed") - }; -}; - -const test_failed_mint_existing_token = run_failed_mint_existing_token_test(); - -const run_test_transfer = () => { - Test.Next.State.reset(3n, [] as list ); - const _admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Active(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry }, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 0tez); - - const mint_args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - Test.Next.State.set_source(alice); - const _mint_result = Test.Next.Contract.transfer_exn(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), mint_args, 0tez); - - const transfer_args: Contract.Generic.Transfer.t = [{ - from_: bob as address, - txs: [{ - to_: alice as address, - token_id: 0 as nat, - amount: 1n - }] - }]; - - Test.Next.State.set_source(bob); - const _transfer_result = Test.Next.Contract.transfer_exn(Test.Next.Typed_address.get_entrypoint("transfer", orig.taddr), transfer_args, 0tez); - const new_storage = Test.Next.Typed_address.get_storage(orig.taddr); - - Assert.assert(Test.Next.Compare.eq(Big_map.find_opt(0 as nat, new_storage.ledger), Some(alice))); - return Assert.assert(Test.Next.Compare.eq(Test.Next.Typed_address.get_storage(orig.taddr), new_storage)); -}; - -const test_transfer = run_test_transfer(); - -const run_test_update_operators = () => { - Test.Next.State.reset(3n, [] as list ); - const admin = Test.Next.Account.address(0); - const bob = Test.Next.Account.address(1n); - const alice = Test.Next.Account.address(2n); - - const member_registry = Big_map.literal(list([ - [(bob as address), ({ - did: bob as address, - status: Active(), - issuer: "urn:uuid:1b752c7f-3de3-1759-bce2-46416a6823e8", - uuid: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff" - })] - ])); - - const user_registry = Big_map.literal(list([ - ["urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", ({ - did: alice as address, - status: Active(), - issuer: "urn:uuid:ecb5685d-0708-4fa8-b9e4-966a0f1d12ff", - uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab" - })] - ])); - - const registry = Test.Next.Originate.contract(contract_of(Registry), { ...registry_intial_storage, member_registry, user_registry }, 0tez); - const registryAddress = Test.Next.Typed_address.to_address(registry.taddr); - const storage = {...initial_storage, registry: registryAddress as address}; - const orig = Test.Next.Originate.contract(contract_of(Contract), storage, 0tez); - - const mint_args: Contract.Generic.Mint.MintParam = { - from_uuid: "urn:uuid:c0597222-5b0f-49fc-8078-7cbdc738c4ab", - to_: bob as address, - token_info: Some(Map.literal([ - ["", bytes`ipfs://tokenMetadataCID`] - ])) - }; - - Test.Next.State.set_source(alice); - const _mint_result = Test.Next.Contract.transfer_exn(Test.Next.Typed_address.get_entrypoint("mint", orig.taddr), mint_args, 0tez); - - const update_operators_args = [ - AddOperator( { - owner: bob as address, - operator: admin as address, - token_id: 0 as nat - }) - ]; - - Test.Next.State.set_source(bob); - const _update_operators_result = Test.Next.Contract.transfer_exn(Test.Next.Typed_address.get_entrypoint("update_operators", orig.taddr), update_operators_args, 0tez); - const new_storage = Test.Next.Typed_address.get_storage(orig.taddr); - - return Assert.assert(Test.Next.Compare.eq(Big_map.find_opt([bob, 0 as nat], Option.value_with_error("No Operators", new_storage.operators)), Some(Set.literal([admin])))); -} - -const test_update_operators = run_test_update_operators(); diff --git a/apps/smart-contracts/asset-registry/contracts/common/assertions.jsligo b/apps/smart-contracts/asset-registry/contracts/common/assertions.jsligo deleted file mode 100644 index 4420d2d8..00000000 --- a/apps/smart-contracts/asset-registry/contracts/common/assertions.jsligo +++ /dev/null @@ -1,81 +0,0 @@ -#import "./errors.jsligo" "Errors" -#import "./tzip12.datatypes.jsligo" "TZIP12Datatypes" -#import "./tzip12.interfaces.jsligo" "TZIP12Interface" - -export type status = ["Active"] | ["Revoked"] -export type Entry = -@layout("comb") -{ - user: { - did: address, - uuid: string, - issuer: string, - status: status, - }, - member: { - did: address, - status: status, - issuer: string, - uuid: string, - } -}; - -/** -* Check if the Tx sender is the token's owner -* @param owner : the address of the actual owner -*/ - -export const assert_update_permission = (owner: address): unit => { - return Assert.Error.assert( - (owner == (Tezos.get_sender())), - Errors.only_sender_manage_operators - ) -} - -/** -* Check if the token id already exists -* @param assets : the assets already minted -* @param token_id : the token id to test -*/ - -export const assert_asset_id_exists = ( - supply: nat, -) => { - return Assert.Error.assert( - supply == 0n, - Errors.token_id_already_exists - ) -}; - -/** -* Check if the sender is allowed to mint -*/ - -export const assert_minting_allowed = (from_uuid: string, member_did: address, registry_address: address) => { - // Check demim contract - const entryOpt: option<{ - member: { - did: address, - status: ["Active"] | ["Revoked"], - issuer: string, - uuid: string, - }, - user: { - did: address, - status: ["Active"] | ["Revoked"], - issuer: string, - uuid: string, - } - }> = Tezos.Next.View.call( - "get_entry", - [from_uuid, member_did], - registry_address - ); - - const entry = Option.value_with_error(Errors.minting_not_allowed, entryOpt); - - return Assert.Error.assert( - Tezos.get_sender() == entry.user.did, - Errors.minting_not_allowed - ); -} diff --git a/apps/smart-contracts/asset-registry/contracts/common/errors.jsligo b/apps/smart-contracts/asset-registry/contracts/common/errors.jsligo deleted file mode 100644 index 60b33614..00000000 --- a/apps/smart-contracts/asset-registry/contracts/common/errors.jsligo +++ /dev/null @@ -1,19 +0,0 @@ -type t = string - -export const undefined_token = "FA2_TOKEN_UNDEFINED" -export const ins_balance = "FA2_INSUFFICIENT_BALANCE" -export const no_transfer = "FA2_TX_DENIED" -export const not_owner = "FA2_NOT_OWNER" -export const not_operator = "FA2_NOT_OPERATOR" -export const not_supported = "FA2_OPERATORS_UNSUPPORTED" -export const rec_hook_fail = "FA2_RECEIVER_HOOK_FAILED" -export const send_hook_fail = "FA2_SENDER_HOOK_FAILED" -export const rec_hook_undef = "FA2_RECEIVER_HOOK_UNDEFINED" -export const send_hook_under = "FA2_SENDER_HOOK_UNDEFINED" -export const wrong_amount = "WRONG_AMOUNT" -export const token_id_already_exists = "Token ID already exists" -export const minting_not_allowed = "Minting not allowed" - - -export const only_sender_manage_operators = "The sender can only manage operators for his own token" -export const not_available = "Feature not available. Maybe use an indexer instead" diff --git a/apps/smart-contracts/asset-registry/contracts/common/tzip12.datatypes.jsligo b/apps/smart-contracts/asset-registry/contracts/common/tzip12.datatypes.jsligo deleted file mode 100644 index fc351cba..00000000 --- a/apps/smart-contracts/asset-registry/contracts/common/tzip12.datatypes.jsligo +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Token-specific metadata is stored/presented as a Michelson value of type - * (map string bytes). A few of the keys are reserved and predefined by - * TZIP-012: - * - * - * "" (empty-string): should correspond to a TZIP-016 URI which points to a JSON - * representation of the token metadata. - * - * "name": should be a UTF-8 string giving a “display name” to the token. - * - * "symbol": should be a UTF-8 string for the short identifier of the token - * (e.g. XTZ, EUR, …). - * - * "decimals": should be an integer (converted to a UTF-8 string in decimal) - * which defines the position of the decimal point in token balances for display - * purposes. - * - * In the case of a TZIP-016 URI pointing to a JSON blob, the JSON preserves the - * same 3 reserved non-empty fields: - * { "symbol": , "name": , "decimals": , ... } - * Providing a value for "decimals" is required for all token types. "name" and "symbol" are not required but it is highly recommended for most tokens to provide the values either in the map or the JSON found via the TZIP-016 URI. - * Other standards such as TZIP-021 describe token metadata schemas which reserve additional keys for different token types for greater compatibility across indexers, wallets, and tooling. -**/ - -export type tokenMetadataData = { - token_id: nat, - token_info: map -}; - -/** -* Token metadata is intended for off-chain, user-facing contexts (e.g. wallets, -* explorers, marketplaces). An earlier (superseded) specification of TZIP-012 token metadata is -* contained in the Legacy Interface section of the Legacy FA2 document. -* There is one @see tokenMetadataData per token_id -**/ - -export type tokenMetadata = big_map; - -/** -* A partial transaction (ignoring the from field) -**/ - -export type atomic_trans = { to_: address, token_id: nat, amount: nat }; - -/** -* Some transaction from a common owner address but multiple destinations @see atomic_trans -**/ - -export type transfer_from = { from_: address, txs: list }; - -/** -* Transfer entrypoint parameter -* A batch of transaction represented by a list of @see transfer_from -**/ - -export type transfer = list; - -/** -* @see balance_of request -**/ - -export type request = { owner: address, token_id: nat }; - -/** -* A callback object is a response from a @see request with a balance -**/ - -export type callback = { request, balance: nat }; - -/** -* A default Main variant with a list of @see callback -**/ - -export type callback_param = | ["Main", list]; - -/** -* balance_of entrypoint parameter -* Batch a list of balance requests @see request and @see callback_param contract -**/ - -export type balance_of = { - requests: list, - callback: contract -}; - -/** -* Operator update -**/ - -export type operator = { owner: address, operator: address, token_id: nat }; - -/** -* Add or Remove token operators variant with an @see operator update -**/ - -export type unit_update = - ["Add_operator", operator] | ["Remove_operator", operator]; - -/** -* update_operators entrypoint parameter -* A list of @see unit_update for the specified token owners and token IDs -**/ - -export type update_operators = list; diff --git a/apps/smart-contracts/asset-registry/contracts/common/tzip12.interfaces.jsligo b/apps/smart-contracts/asset-registry/contracts/common/tzip12.interfaces.jsligo deleted file mode 100644 index 4f7f272c..00000000 --- a/apps/smart-contracts/asset-registry/contracts/common/tzip12.interfaces.jsligo +++ /dev/null @@ -1,191 +0,0 @@ -#import "tzip12.datatypes.jsligo" "TZIP12Datatypes" - -#import "tzip16.datatypes.jsligo" "TZIP16Datatypes" - -export interface FA2 { - /** The ledger stores user<->token ownership - * @see storage.ledger - **/ - - type ledger; - /** A group of operators. An operator is a Tezos address that originates token transfer operation on behalf of the owner. - * @see storage.operators - **/ - - type operators; - /* Mandatory storage to be recognized as TZIP12 contract*/ - - type storage = { - extension: unit, - ledger: ledger, - operators: operators, - token_metadata: TZIP12Datatypes.tokenMetadata, - metadata: TZIP16Datatypes.metadata, - }; - type ret = [list, storage]; - /** - * Each transfer in the batch is specified between one source (from_) address and - * a list of destinations. Each transfer_destination specifies token type and the - * amount to be transferred from the source address to the destination (to_) address. - * - * FA2 does NOT specify an interface for mint and burn operations; however, if an - * FA2 token contract implements mint and burn operations, it SHOULD, when possible, - * enforce the same logic (core transfer behavior and transfer permission logic) - * applied to the token transfer operation. Mint and burn can be considered special - * cases of the transfer. Although, it is possible that mint and burn have more or - * less restrictive rules than the regular transfer. For instance, mint and burn - * operations may be invoked by a special privileged administrative address only. - * In this case, regular operator restrictions may not be applicable. - * - * Core Transfer Behavior - * FA2 token contracts MUST always implement this behavior. - * - * - * - Every transfer operation MUST happen atomically and in order. If at least one - * transfer in the batch cannot be completed, the whole transaction MUST fail, all - * token transfers MUST be reverted, and token balances MUST remain unchanged. - * - * - * - Each transfer in the batch MUST decrement token balance of the source (from_) - * address by the amount of the transfer and increment token balance of the destination - * (to_) address by the amount of the transfer. - * - * - * - If the transfer amount exceeds current token balance of the source address, - * the whole transfer operation MUST fail with the error mnemonic "FA2_INSUFFICIENT_BALANCE". - * - * - * - If the token owner does not hold any tokens of type token_id, the owner's balance - * is interpreted as zero. No token owner can have a negative balance. - * - * - * - The transfer MUST update token balances exactly as the operation - * parameters specify it. Transfer operations MUST NOT try to adjust transfer - * amounts or try to add/remove additional transfers like transaction fees. - * - * - * - Transfers of zero amount MUST be treated as normal transfers. - * - * - * - Transfers with the same address (from_ equals to_) MUST be treated as normal - * transfers. - * - * - * -If one of the specified token_ids is not defined within the FA2 contract, the - * entrypoint MUST fail with the error mnemonic "FA2_TOKEN_UNDEFINED". - * - * - * - Transfer implementations MUST apply transfer permission policy logic (either - * default transfer permission policy or - * customized one). - * If permission logic rejects a transfer, the whole operation MUST fail. - * - * - * - Core transfer behavior MAY be extended. If additional constraints on tokens - * transfer are required, FA2 token contract implementation MAY invoke additional - * permission policies. If the additional permission fails, the whole transfer - * operation MUST fail with a custom error mnemonic. - * - * - * - * Default Transfer Permission Policy - * - * - * - Token owner address MUST be able to perform a transfer of its own tokens (e. g. - * SENDER equals to from_ parameter in the transfer). - * - * - * - An operator (a Tezos address that performs token transfer operation on behalf - * of the owner) MUST be permitted to manage the specified owner's tokens before - * it invokes a transfer transaction (see update_operators). - * - * - * - If the address that invokes a transfer operation is neither a token owner nor - * one of the permitted operators, the transaction MUST fail with the error mnemonic - * "FA2_NOT_OPERATOR". If at least one of the transfers in the batch is not permitted, - * the whole transaction MUST fail. - * @param p : @see TZIP12Datatypes.transfer - * @param s : the storage - **/ - - @entry - const transfer: (p: TZIP12Datatypes.transfer, s: storage) => ret; - /** - * Gets the balance of multiple account/token pairs. Accepts a list of - * balance_of_requests and a callback contract callback which accepts a list of - * balance_of_response records. - * - * - * - There may be duplicate balance_of_request's, in which case they should not be - * deduplicated nor reordered. - * - * - * - If the account does not hold any tokens, the account - * balance is interpreted as zero. - * - * - * - If one of the specified token_ids is not defined within the FA2 contract, the - * entrypoint MUST fail with the error mnemonic "FA2_TOKEN_UNDEFINED". - * @param p : @see TZIP12Datatypes.balance_of - * @param s : the storage - **/ - - @entry - const balance_of: (p: TZIP12Datatypes.balance_of, s: storage) => ret; - /** - * Add or Remove token operators for the specified token owners and token IDs. - * - * - * - The entrypoint accepts a list of update_operator commands. If two different - * commands in the list add and remove an operator for the same token owner and - * token ID, the last command in the list MUST take effect. - * - * - * - It is possible to update operators for a token owner that does not hold any token - * balances yet. - * - * - * - Operator relation is not transitive. If C is an operator of B and if B is an - * operator of A, C cannot transfer tokens that are owned by A, on behalf of B. - * - * - * The standard does not specify who is permitted to update operators on behalf of - * the token owner. Depending on the business use case, the particular implementation - * of the FA2 contract MAY limit operator updates to a token owner (owner == SENDER) - * or be limited to an administrator. - * @param p : @see TZIP12Datatypes.update_operators - * @param s : the storage -**/ - - @entry - const update_operators: (p: TZIP12Datatypes.update_operators, s: storage) => ret; - /** OPTIONAL VIEWS **/ - //TODO waiting for next ligo feature : Interface optional fields to uncomment these lines - /** return the balance corresponding to the owner/token pair -**/ - - @view - const get_balance: (p: [address, nat], s: storage) => nat; - /** return to total number of tokens for the given token-id if known or fail if not. - **/ - - @view - const total_supply: (token_id: nat, s: storage) => nat; - /** returns the list of all the token IDs -**/ - - @view - const all_tokens: (_: unit, s: storage) => set; - /** return whether %operator is allowed to transfer %token_id tokens owned by owner - **/ - - @view - const is_operator: (op: TZIP12Datatypes.operator, s: storage) => bool; - /** It is one of the 2 ways of providing token-specific metadata, it -is defined in section Token Metadata and is not optional if -the contract does not have a %token_metadata big-map - **/ - - @view - const token_metadata: (p: nat, s: storage) => TZIP12Datatypes.tokenMetadataData; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/common/tzip16.datatypes.jsligo b/apps/smart-contracts/asset-registry/contracts/common/tzip16.datatypes.jsligo deleted file mode 100644 index 07634a51..00000000 --- a/apps/smart-contracts/asset-registry/contracts/common/tzip16.datatypes.jsligo +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file implement the TZIP-16 protocol (Contract Metadata) for Tezos - * defined here : https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-16/tzip-16.md - * - * An FA2-compliant contract SHOULD provide contract-level metadata via TZIP-016: - * - * - If a contract does not contain the TZIP-016 %metadata big-map, it must provide token-specific-metadata through the %token_metadata big-map method described above in Token Metadata. - * - * The TZIP-016 contract metadata JSON structure is described below: - * - * - * - The TZIP-016 "interfaces" field MUST be present - * - * - It should contain "TZIP-012[-]" - * - * - * - version-info is an optional string extension, precising which version of - * this document is implemented by the contract (commit hash prefix, - * e.g. 6883675 or an RFC-3339 date, - * e.g. 2020-10-23). - * - * TZIP-016 : JSON nomenclature - * { - * "name":"", (* A single string, free format.It is recommended to have “name” strings help identifying the purpose of the contract. *) - * "description":"", (* A single string, free format.Preferably a set of proper natural language paragraphs. *) - * "version":"", (* A single string, free format. It is recommended to have version strings which attempt at uniquely identifying the exact Michelson contract, or at least its behavior, as a precision w.r.t the name field. Of course, none of that can be enforced. *) - * "license":{"name":"", "details":""}, (* An extensible object { "name": , "details" : }, "details" being optional. It is recommended to use de facto standard short names when possible, see the Debian guidelines for instance. *) - * "authors":[], (* A list of strings. Each author should obey the "Print Name <'contact'>", where the 'contact' string is either an email address, or a web URI. *) - * "homepage":"", (* A single string, representing a “web” URL (e.g. HTTPS). The homepage is for human-consumption, it may be the location of the source of the contract, how to submit issue tickets, or just a more elaborate description. *) - * "source":{"tools":[], "location":""}, (* An object { "tools": [], "location": } describing the source code which was transformed or generated the Michelson code of the contract. "tools" is an informal list of compilers/code-generators/libraries/post-processors used to generate the originated code, if possible with version information. The goal is to attempt to provide enough information for interested parties to reproduce the Michelson from its source, or at least to inspect it. *) - * "interfaces":[], (* A list of strings. Each string should allow the consumer of the metadata to know which interfaces and behaviors the contract claims to obey (other than the obvious TZIP-016). In the case of standards defined as TZIPs in the present repository, the string should obey the pattern "TZIP-" where is additional information prefixed with a space character. Example: an FA2 contract would (at least) have an "interfaces" field containing ["TZIP-012"] or ["TZIP-012 git 6544de32"]. *) - * "errors":[], (* A list of “error translation” objects, which allow one to interpret error values output by the contract using the FAILWITH instruction. The interpretation is a larger data-structure, for instance, to provide to a wallet-user with a more understandable error message to act on (usually a string or bytes natural language text value). They are either: *) - * "views":[] (* A list of off-chain-view objects, defined in the following section. *) - * } - **/ - -export type metadata = big_map; diff --git a/apps/smart-contracts/asset-registry/contracts/data/admin.jsligo b/apps/smart-contracts/asset-registry/contracts/data/admin.jsligo deleted file mode 100644 index 2df541b2..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/admin.jsligo +++ /dev/null @@ -1,7 +0,0 @@ -// #import "storage.jsligo" "Storage" - -export type T = address; - -// export const isCallerAdmin = (s: Storage.T): bool => { -// return caller == admin; -// }; diff --git a/apps/smart-contracts/asset-registry/contracts/data/amount.jsligo b/apps/smart-contracts/asset-registry/contracts/data/amount.jsligo deleted file mode 100644 index 27737045..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/amount.jsligo +++ /dev/null @@ -1 +0,0 @@ -export type T = nat; diff --git a/apps/smart-contracts/asset-registry/contracts/data/approvals.jsligo b/apps/smart-contracts/asset-registry/contracts/data/approvals.jsligo deleted file mode 100644 index d9c87b38..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/approvals.jsligo +++ /dev/null @@ -1,61 +0,0 @@ -#import "./errors.jsligo" "Errors" -#import "./token.jsligo" "Token" -#import "./amount.jsligo" "Amount" - -export type owner = address; -export type spender = address; - -export type T = big_map<[owner, spender, Token.T], Amount.T>; - -export const get_amount = ( - owner: owner, - spender: spender, - token_id: Token.T, - approvals: T, -): Amount.T => { - return match(Big_map.find_opt([owner, spender, token_id], approvals)) { - when(Some(amount)): do { - return amount - }; - when(None): do { - return (0 as nat) - }; - }; -}; - -export const set_amount = ( - approvals: T, - owner: owner, - spender: spender, - token_id: Token.T, - amount_: Amount.T -): T => { - return Big_map.update([owner, spender, token_id], Some(amount_), approvals); -}; - -export const decrease_approved_amount = ( - approvals: T, - from_: owner, - spender: spender, - token_id: Token.T, - amount_: Amount.T -): T => { - let balance_ = get_amount(from_, spender, token_id, approvals); - Assert.Error.assert((balance_ >= amount_), Errors.ins_balance); - balance_ = abs(balance_ - amount_); - - return set_amount(approvals, from_, spender, token_id, balance_); -}; - -const increase_approved_amount = ( - approvals: T, - to_: owner, - spender: spender, - token_id: Token.T, - amount_: Amount.T -): T => { - let balance_ = get_amount(to_, spender, token_id, approvals); - balance_ = balance_ + amount_; - - return set_amount(approvals, to_, spender, token_id, balance_); -}; diff --git a/apps/smart-contracts/asset-registry/contracts/data/errors.jsligo b/apps/smart-contracts/asset-registry/contracts/data/errors.jsligo deleted file mode 100644 index 7853fac0..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/errors.jsligo +++ /dev/null @@ -1,26 +0,0 @@ -type t = string; - -export const undefined_token = "FA2_TOKEN_UNDEFINED"; -export const ins_balance = "FA2_INSUFFICIENT_BALANCE"; -export const no_transfer = "FA2_TX_DENIED"; -export const not_owner = "FA2_NOT_OWNER"; -export const not_operator = "FA2_NOT_OPERATOR"; -export const not_supported = "FA2_OPERATORS_UNSUPPORTED"; -export const rec_hook_fail = "FA2_RECEIVER_HOOK_FAILED"; -export const send_hook_fail = "FA2_SENDER_HOOK_FAILED"; -export const rec_hook_undef = "FA2_RECEIVER_HOOK_UNDEFINED"; -export const send_hook_under = "FA2_SENDER_HOOK_UNDEFINED"; - -export const invalid_ticket = "FA2.1_INVALID_TICKET"; -export const invalid_destination = "FA2.1_INVALID_DESTINATION"; -export const unsafe_approval = "FA2.1_UNSAFE_APPROVAL_CHANGE"; -export const insufficient_allowance = "FA2.1_INSUFFICIENT_ALLOWANCE"; - -export const cannot_create_ticket = "Ticket cannot be created (amount is problably 0)"; -export const storage_has_no_operators = "The storage does not support operators management"; -export const only_sender_manage_operators = "The sender can only manage operators for their own token"; -export const amount_net_expected = "NFT transaction amount should be 1n"; - -export const invalid_proxy = "FA2.1_INVALID_PROXY"; - -export const not_admin = "SENDER_NOT_ADMIN"; diff --git a/apps/smart-contracts/asset-registry/contracts/data/ledger.jsligo b/apps/smart-contracts/asset-registry/contracts/data/ledger.jsligo deleted file mode 100644 index 0d8c0145..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/ledger.jsligo +++ /dev/null @@ -1,153 +0,0 @@ -#import "./errors.jsligo" "Errors" -#import "./token.jsligo" "Token" -#import "./amount.jsligo" "Amount" - -type owner = address; - -export type ledger_module = { - data : L; - empty : L; - increase : (p : [L, owner, Token.T, Amount.T]) => L; - decrease : (p : [L, owner, Token.T, Amount.T]) => L; - balance_of : (p: [L, owner, Token.T]) => Amount.T; - supply: (p: [L, Token.T]) => option; -}; - -//@inline -export const decrease_token_amount_for_user = ( - ledger_module: ledger_module, - from_: owner, - token_id: Token.T, - amount_: nat -): ledger_module => { - const data = ledger_module.decrease([ledger_module.data, from_, token_id, amount_]); - - return { ...ledger_module, data }; -}; - -//@inline -export const increase_token_amount_for_user = ( - to_: owner, - token_id: Token.T, - amount_: nat, - ledger_module: ledger_module -): ledger_module => { - const data = ledger_module.increase([ledger_module.data, to_, token_id, amount_]); - - return { ...ledger_module, data }; -}; - -//@inline -export const get_supply = ( - token_id: Token.T, - ledger_module: ledger_module -): option => - ledger_module.supply([ledger_module.data, token_id]); - -//@inline -export const get_for_user = ( - owner: owner, - token_id: Token.T, - ledger_module: ledger_module -): Amount.T => { - return ledger_module.balance_of([ledger_module.data, owner, token_id]); -}; - - -/* Possible types as defined in the TZIP-12 */ - -export namespace Common_Asset { - export const balance_of = (value: option): Amount.T => { - match(value) { - when(Some(v)): do { return v }; - when(None()): do { return (0 as nat) }; - }; - }; - - export const add_to_val = (amount_: Amount.T, old_value: option): Amount.T => { - const value = balance_of(old_value); - - return value + amount_; - }; - - export const sub_to_val = (amount_: Amount.T, old_value: option): Amount.T => { - const value = balance_of(old_value); - Assert.Error.assert(value >= amount_, Errors.ins_balance); - - return abs(value - amount_); - }; -}; - -export namespace NFT { - export type L = big_map; - - export const empty: L = Big_map.empty; - - export const _balance_of = (address: address, value: option): Amount.T => { - return match(value) { - when(Some(own)): do { return (own == address ? (1 as nat) : (0 as nat)) }; - when(None()): do { return (0 as nat) }; - }; - }; - - export const add_to_val = (address: address, amount: Amount.T): option => { - return amount == (1 as nat) ? Some(address) : failwith(Errors.amount_net_expected); - }; - - export const sub_to_val = (amount: Amount.T): option => { - return amount == (1 as nat) ? (None() as option) : failwith(Errors.amount_net_expected); - }; - - export const get_for_user = (ledger: L, token_id: Token.T): option => { - return Big_map.find_opt(token_id, ledger); - }; - - export const set_for_user = (ledger: L, owner: owner, token_id: Token.T): L => { - return Big_map.update(token_id, Some(owner), ledger); - }; - - export const decrease = ( - [ledger, from_, token_id, amount_] : [L, owner, Token.T, Amount.T] - ): L => { - get_for_user(ledger, token_id); - sub_to_val(amount_); - - return set_for_user(ledger, from_, token_id); - }; - - export const increase = ( - [ledger, to_, token_id, amount_] : [L, owner, Token.T, Amount.T] - ): L => { - get_for_user(ledger, token_id); - add_to_val(to_, amount_); - - return set_for_user(ledger, to_, token_id); - }; - - export const balance_of = ( - [ledger, owner, token_id]: [L, owner, Token.T] - ): Amount.T => { - const b = _balance_of(owner, get_for_user(ledger, token_id)); - return (b as Amount.T); - }; - - export const supply = ( - [ledger, token_id]: [L, Token.T] - ): option => { - return match(get_for_user(ledger, token_id)) { - when(Some(_)): Some(1n); - when(None()): None(); - }; - }; - - export const ledger_module = (data: L): ledger_module => { - return { - data, - empty, - increase, - decrease, - balance_of, - supply, - }; - }; -} diff --git a/apps/smart-contracts/asset-registry/contracts/data/metadata.jsligo b/apps/smart-contracts/asset-registry/contracts/data/metadata.jsligo deleted file mode 100644 index 20ed7bf5..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/metadata.jsligo +++ /dev/null @@ -1,15 +0,0 @@ -/* -{ - "name":"", (* Contract name, recommended *) - "description":"", (* details information *) - "version":"", (* semver version number *) - "license":{"name":"", "details":""}, (* details is optional *) - "authors":[], (* List of authors with format "Name<'contact'>" *) - "homepage":"", (* URL for human-consumption *) - "source":{"tools":[], "location":""}, (* High-level language source *) - "interfaces":[], (* TZIP-XYZ others than TZIP-016 *) - "errors":[], (* List of errors translation object : {"error":,"expension":, "languages":[]} *) - "views":[] (* List of off-chain-view objects *) -} */ - -export type t = big_map; diff --git a/apps/smart-contracts/asset-registry/contracts/data/operators.jsligo b/apps/smart-contracts/asset-registry/contracts/data/operators.jsligo deleted file mode 100644 index cfd51c73..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/operators.jsligo +++ /dev/null @@ -1,75 +0,0 @@ -#import "errors.jsligo" "Errors" -#import "token.jsligo" "Token" - -type owner = address; -type operator = address; - -export type t = big_map<[owner, Token.T], set>; - -export const assert_authorisation = ( - from_ : address, - token_id : Token.T, - operators : t -): unit => { - const sender_ = Tezos.get_sender(); - if (sender_ == from_) { - return; - } else { - const authorized = match(Big_map.find_opt([from_, token_id], operators)) { - when(Some(v)): do { return v }; - when(None): do { return Set.empty }; - }; - - if (Set.mem(sender_, authorized)) { - return; - } else { - failwith(Errors.not_operator); - } - }; -}; - -const assert_update_permission = (owner: owner): unit => { - Assert.Error.assert(owner == Tezos.get_sender(), Errors.only_sender_manage_operators); -}; - -export const add_operator = ( - operators: t, - owner: owner, - operator: operator, - token_id: Token.T -): t => { - if (owner == operator) { - return operators; - } else { - assert_update_permission(owner); - let auth = match(Big_map.find_opt([owner, token_id], operators)) { - when(Some(v)): do { return v }; - when(None): do { return Set.empty }; - }; - auth = Set.add(operator, auth); - return Big_map.update([owner, token_id], Some(auth), operators); - }; -}; - -export const remove_operator = ( - operators: t, - owner: owner, - operator: operator, - token_id: Token.T -): t => { - if (owner == operator) { - return operators; - } else { - assert_update_permission(owner); - let auth = match(Big_map.find_opt([owner, token_id], operators)) { - when(Some(v)): do { return v }; - when(None): do { return Set.empty }; - }; - auth = Set.remove(operator, auth); - if (Set.size(auth) == (0 as nat)) { - return Big_map.remove([owner, token_id], operators); - } else { - return Big_map.update([owner, token_id], Some(auth), operators); - }; - }; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/data/proxy.jsligo b/apps/smart-contracts/asset-registry/contracts/data/proxy.jsligo deleted file mode 100644 index 701aaaa8..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/proxy.jsligo +++ /dev/null @@ -1 +0,0 @@ -export type T = address; diff --git a/apps/smart-contracts/asset-registry/contracts/data/storage.jsligo b/apps/smart-contracts/asset-registry/contracts/data/storage.jsligo deleted file mode 100644 index 842b38fe..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/storage.jsligo +++ /dev/null @@ -1,68 +0,0 @@ -#import "./errors.jsligo" "Errors" -#import "./metadata.jsligo" "Metadata" -#import "./token.jsligo" "Token" -#import "./operators.jsligo" "Operators" -#import "./approvals.jsligo" "Approvals" -#import "./tokenMetadata.jsligo" "TokenMetadata" -#import "./ledger.jsligo" "Ledger" -#import "./proxy.jsligo" "Proxy" - -export type T = { - registry: address; - metadata: Metadata.t; - ledger: L; - token_metadata: TokenMetadata.T; - token_index: nat; - operators: option; - approvals: Approvals.T; -}; - -export const token_exist = (s: T, token_id): bool => { - return Big_map.mem(token_id, s.token_metadata); -}; - -export const get_token_index = (s: T): nat => { - return s.token_index; -}; - -export const set_next_token_index = (s: T): T => { - return { ...s, token_index: s.token_index + 1n }; -}; - -export const assert_token_exist = (s: T, token_id): unit => { - if (!token_exist(s, token_id)) { - failwith(Errors.undefined_token); - }; -}; - -export const get_ledger = (s: T): L => { - return s.ledger; -}; - -export const set_ledger = (s: T, ledger: L): T => { - return { ...s, ledger: ledger }; -}; - -export const get_operators = (s: T): option => { - return s.operators; -}; - -export const set_operators = (s: T, operators: Operators.t): T => { - return { ...s, operators: Some(operators) }; -}; - -export const get_approvals = (s: T): Approvals.T => { - return s.approvals; -}; - -export const set_approvals = (s: T, approvals: Approvals.T): T => { - return { ...s, approvals }; -}; - -export const get_token_metadata = (s: T): TokenMetadata.T => { - return s.token_metadata; -}; - -export const set_token_metadata = (s: T, token_metadata: TokenMetadata.T): T => { - return { ...s, token_metadata }; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/data/token.jsligo b/apps/smart-contracts/asset-registry/contracts/data/token.jsligo deleted file mode 100644 index 726f7847..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/token.jsligo +++ /dev/null @@ -1,3 +0,0 @@ -export type T = nat; - - diff --git a/apps/smart-contracts/asset-registry/contracts/data/tokenMetadata.jsligo b/apps/smart-contracts/asset-registry/contracts/data/tokenMetadata.jsligo deleted file mode 100644 index bd3c2af4..00000000 --- a/apps/smart-contracts/asset-registry/contracts/data/tokenMetadata.jsligo +++ /dev/null @@ -1,22 +0,0 @@ -#import "./token.jsligo" "Token" - -export type data = { - token_id : Token.T; - token_info: map; -}; - -export type T = big_map; - -export const get_token_info = (tokenId: Token.T, tokenMetadata: T, ): map => { - return match(Big_map.find_opt(tokenId, tokenMetadata)) { - when(Some(token)): do { return token.token_info }; - when(None()): do { return Map.empty }; - }; -}; - -export const set_token_info = (tokenId: Token.T, tokenInfo: map, tokenMetadata: T): T => { - return Big_map.update(tokenId, Some({ - token_id: tokenId, - token_info: tokenInfo - }), tokenMetadata); -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/approve.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/approve.jsligo deleted file mode 100644 index 91f95606..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/approve.jsligo +++ /dev/null @@ -1,92 +0,0 @@ -#import "../data/errors.jsligo" "Errors" -#import "../data/token.jsligo" "Token" -#import "../data/approvals.jsligo" "Approvals" -#import "../data/storage.jsligo" "Storage" - -type Storage = Storage.T; - -type approve = -// @layout comb -{ - owner : address; - spender : address; - token_id : Token.T; - old_value : nat; - new_value : nat; -}; - -type approvals = list; -export type T = approvals; - - -type allowance_update_type = -@layout("comb") -{ - owner : address; - spender : address; - token_id : Token.T; - new_allowance : nat; - diff : int; -}; - -type event_map_value = [nat, int]; -type event_map_key = [address, address, Token.T]; - -const _approve = (approve: approve, approvals: Approvals.T): Approvals.T => { - const { owner, spender, token_id, old_value, new_value } = approve; - const amount = Approvals.get_amount(owner, spender, token_id, approvals); - Assert.Error.assert(amount == old_value, Errors.unsafe_approval); - Assert.Error.assert(owner == Tezos.get_sender(), Errors.not_owner); - return Approvals.set_amount(approvals, owner, spender, token_id, new_value); -}; - -export const approve = ( - to_approve: approvals, - storage: Storage -): [list, Storage] => { - let event_approvals: map = Map.empty; - let newApprovals: Approvals.T = Storage.get_approvals(storage); - let finalOperations = list([]); - - for (const a of to_approve) { - newApprovals = _approve(a, newApprovals); - - const key: event_map_key = [a.owner, a.spender, a.token_id]; - const oldData: option = Map.find_opt(key, event_approvals); - - let diff: int = 0; - match(oldData) { - when(Some(data)): do { diff = data[1] + (a.new_value - a.old_value)}; - when(None): do { diff = a.new_value - a.old_value }; - }; - event_approvals = Map.add(key, [a.new_value, diff], event_approvals); - } - let finalEventApprovals: list = Map.fold( - ([acc, [key, value]]: [list, [event_map_key, event_map_value]]) => { - if (value[1] != 0) { - const event_data: allowance_update_type = { - owner: key[0], - spender: key[1], - token_id: key[2], - new_allowance: value[0], - diff: value[1] - }; - const event_balance = Tezos.emit("%allowance_update", event_data); - return list([event_balance, ...acc]); - } - return acc; - }, - event_approvals, - list([]) - ) - - /** Reverse event list **/ - - for (const op of finalEventApprovals) { - finalOperations = list([op, ...finalOperations]); - } - - const newStorage = Storage.set_approvals(storage, newApprovals); - - return [finalOperations, newStorage]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/balance_of.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/balance_of.jsligo deleted file mode 100644 index 62932eb7..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/balance_of.jsligo +++ /dev/null @@ -1,58 +0,0 @@ -#import "../data/token.jsligo" "Token" -#import "../data/amount.jsligo" "Amount" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" - -type Storage = Storage.T; - -type request = { - owner : address; - token_id : Token.T; -}; - -type callback = -// @layout comb -{ - request : request; - balance : Amount.T; -}; - -type balance_of = -// @layout comb -{ - requests : list; - callback : contract>; -}; -export type T = balance_of; - -type LedgerModule = Ledger.ledger_module; - -const get_balance_info = ( - storage : Storage, - ledger_module : LedgerModule, - request : request -) : callback => { - const { owner, token_id } = request; - Storage.assert_token_exist(storage, token_id); - - return { request, balance : ledger_module.balance_of([ledger_module.data, owner, token_id]) }; -}; - -export const balance_of = ( - balance: balance_of, - storage: Storage, - ledgerModule: LedgerModule -) : [list, Storage] => { - const { requests, callback } = balance; - - return [list([ - Tezos.Next.Operation.transaction( - List.map( - (request) => get_balance_info(storage, ledgerModule, request), - requests - ), - (0 as tez), - callback - ) - ]), storage]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/burn.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/burn.jsligo deleted file mode 100644 index 38edca40..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/burn.jsligo +++ /dev/null @@ -1,113 +0,0 @@ -#import "../data/amount.jsligo" "Amount" -#import "../data/errors.jsligo" "Errors" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/token.jsligo" "Token" -#import "../data/tokenMetadata.jsligo" "TokenMetadata" -#import "./transfer.jsligo" "Transfer" -#import "../data/approvals.jsligo" "Approvals" - -type Storage = Storage.T; -type LedgerModule = Ledger.ledger_module; - -type BurnParam = { - from_ : address; - token_id : Token.T; - amount : Amount.T; -}; - -type total_supply_update_type = -@layout("comb") -{ - token_id: Token.T, - new_total_supply: nat, - diff: int -}; - -type balance_event_data = -@layout("comb") -{ - owner: address, - token_id: nat, - new_balance: nat, - diff: int -}; - -type allowance_update_type = -@layout("comb") -{ - owner : address; - spender : address; - token_id : Token.T; - new_allowance : nat; - diff : int; -}; - -export type T = BurnParam; - - -type Burn = BurnParam; -export type T = BurnParam; - -export const burn = ( - burnParam: BurnParam, - storage: Storage, - ledger: LedgerModule -): [list, Storage] => { - let operations = list([]); - const { from_, token_id, amount } = burnParam; - - Storage.assert_token_exist(storage, token_id); - - const approvals = Storage.get_approvals(storage); - - const oldApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, approvals); - - const authorizedApprovals = Transfer.authorize_transfer(storage, approvals, from_, token_id, amount); - - const newApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, authorizedApprovals); - - if (oldApprovals != newApprovals) { - const allowance_update: allowance_update_type = { - owner: from_, - spender: Tezos.get_sender(), - token_id: token_id, - new_allowance: newApprovals, - diff: newApprovals - oldApprovals; - }; - const allowance_event_op = Tezos.emit("%allowance_update", allowance_update); - operations = list([allowance_event_op, ...operations]); - } - - const newLedger = Ledger.decrease_token_amount_for_user(ledger, from_, token_id, amount); - - let newStorage = Storage.set_approvals(storage, authorizedApprovals); - newStorage = Storage.set_ledger(newStorage, newLedger.data); - - let oldSupplyOpt = Ledger.get_supply(token_id, ledger); - let oldSupply = match(oldSupplyOpt) { - when (Some(supply)): do { return supply; }; - when (None): do { return (amount as nat); }; - }; - const balance = Ledger.get_for_user(from_, token_id, ledger); - const supply_update: total_supply_update_type = - { - token_id: token_id, - new_total_supply: abs(oldSupply - amount), - diff: -amount, - }; - const balance_update: balance_event_data = - { - owner: from_, - token_id: token_id, - new_balance: abs(balance - amount), - diff: -amount, - }; - const event_balance = Tezos.emit("%balance_update", balance_update); - const event_supply = Tezos.emit("%total_supply_update", supply_update); - - operations = list([event_supply, ...operations]); - operations = list([event_balance, ...operations]); - - return [operations, newStorage]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/export_ticket.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/export_ticket.jsligo deleted file mode 100644 index 7d6e039a..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/export_ticket.jsligo +++ /dev/null @@ -1,151 +0,0 @@ -#import "../data/errors.jsligo" "Errors" -#import "../data/token.jsligo" "Token" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/approvals.jsligo" "Approvals" -#import "./transfer.jsligo" "Transfer" - -type Storage = Storage.T; - -type ExportedTicket = ticket<[Token.T, option]>; - -type TicketToExport = - // @layout comb - { - from_ : address; - token_id : Token.T; - amount : nat; - }; - -type ExportTicketRequest = { - to_ : address; - ticketsToExport : list; -}; - -type ExportTicketsTo = { - to_ : address; - ticketsToExport : list; - }; - -type ExportTicketOperation = { - destination : option
; - requests : list; -}; - -type balance_event_data = - @layout("comb") - { - owner: address, - token_id: nat, - new_balance: nat, - diff: int - }; - -type allowance_update_type = - @layout("comb") -{ - owner: address, - spender: address, - token_id: nat, - new_allowance: nat, - diff: int -}; - -type ExportTicket = ExportTicketOperation; -export type T = ExportTicket; - -type LedgerModule = Ledger.ledger_module; - -const create_ticket = ( - storage: Storage, - ticketToExport : TicketToExport, - ledger: LedgerModule -) : [list, ExportedTicket, LedgerModule, Storage] => { - const { from_, token_id, amount } = ticketToExport; - let operations : list = list([]); - - /** Allowance & Operator checks **/ - - Storage.assert_token_exist(storage, token_id); - const approvals = Storage.get_approvals(storage); - - const oldApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, approvals); - const authorizedApprovals = Transfer.authorize_transfer(storage, approvals, from_, token_id, amount); - const newApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, authorizedApprovals); - - if (oldApprovals != newApprovals) { - const allowance_update: allowance_update_type = { - owner: from_, - spender: Tezos.get_sender(), - token_id: token_id, - new_allowance: newApprovals, - diff: newApprovals - oldApprovals; - }; - const allowance_event_op = Tezos.emit("%allowance_update", allowance_update); - operations = list([allowance_event_op, ...operations]); - } - const balance = Ledger.get_for_user(from_, token_id, ledger); - const balance_update: balance_event_data = - { - owner: from_, - token_id: token_id, - new_balance: abs(balance - amount), - diff: -amount, - }; - const event_balance = Tezos.emit("%balance_update", balance_update); - operations = list([event_balance, ...operations]); - const newLedger = Ledger.decrease_token_amount_for_user(ledger, from_, token_id, amount); - let newStorage = Storage.set_approvals(storage, authorizedApprovals); - newStorage = Storage.set_ledger(newStorage, newLedger.data); - const ticket = Option.value_with_error( - Errors.cannot_create_ticket, - Tezos.Next.Ticket.create([token_id, None()], amount) - ); - return [operations, ticket, newLedger, newStorage]; -}; - -export const export_tickets = ( - op : ExportTicket, - storage : Storage, - ledger : LedgerModule -) : [list, Storage] => { - let operations : list = list([]); - let finalOperations = list([]); - let newLedger = ledger; - let finalStorage = storage; - - if (Option.is_none(op.destination)) { - for (const request of op.requests) { - for (const tk of request.ticketsToExport) { - const [newOps, ticket, updatedLedger, newStorage] = create_ticket(storage, tk, newLedger); - newLedger = updatedLedger; - operations = list([...newOps, ...operations]); - const ticketReceiver: contract = Tezos.get_contract_with_error(request.to_, Errors.invalid_destination); - operations = list([Tezos.Next.Operation.transaction(ticket, 0tez, ticketReceiver), ...operations]); - finalStorage = newStorage; - } - } - } - if (Option.is_some(op.destination)) { - for (const request of op.requests) { - for (const tk of request.ticketsToExport) { - const [newOps, ticket, updatedLedger, newStorage] = create_ticket(storage, tk, newLedger); - newLedger = updatedLedger; - operations = list([...newOps, ...operations]); - let ticketOps : list = list([ticket]); - let finalTicketOps : list = list([{to_: request.to_, ticketsToExport: ticketOps}]); - const ticketReceiver: contract> = Tezos.get_contract_with_error(Option.value_with_error(Errors.invalid_destination, op.destination), Errors.invalid_destination); - operations = list([Tezos.Next.Operation.transaction(finalTicketOps, 0tez, ticketReceiver), ...operations]); - finalStorage = newStorage; - } - } - } - - /** Reverse operations list **/ - - for (const op of operations) { - finalOperations = list([op, ...finalOperations]); - } - - return [finalOperations, Storage.set_ledger(finalStorage, newLedger.data)]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/import_ticket.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/import_ticket.jsligo deleted file mode 100644 index f0d5bbb4..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/import_ticket.jsligo +++ /dev/null @@ -1,112 +0,0 @@ -#import "../data/errors.jsligo" "Errors" -#import "../data/token.jsligo" "Token" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/amount.jsligo" "Amount" - -type Storage = Storage.T; - -type imported_ticket = ticket<[Token.T, option]>; - -type tickets_to_import_to = { - to_ : address; - tickets_to_import : list; -}; - -type balance_event_data = - @layout("comb") - { - owner: address, - token_id: nat, - new_balance: nat, - diff: int - }; - -export type transaction = - @layout("comb") -{ - to_ : option
; - token_id : Token.T; - amount : Amount.T; -}; - -export type transfer = - @layout("comb") -{ - from_ : option
; - txs : list; -}; - -type import_ticket = list; -export type T = import_ticket; - -type LedgerModule = Ledger.ledger_module; - -const make_transaction = (to_: option
, token_id: Token.T, amount: Amount.T): transaction => { - return { to_; token_id; amount }; -} - -const make_transfer = (from_: option
, txs: list): transfer => { - return { from_; txs }; -} - -// @inline -const assert_ticketer_is_self_address = (ticketer : address) : unit => - Assert.Error.assert(Tezos.get_self_address() == ticketer, Errors.invalid_ticket); - -const import_ticket_to = ( - to_ : address, - imported_ticket : imported_ticket, - [transactions, ledger, operations] : [list, LedgerModule, list] -) : [list, LedgerModule, list] => { - let operationsEvent = operations; - const [[ticketer, [[token_id, _data], amount]], _] = Tezos.Next.Ticket.read(imported_ticket); - assert_ticketer_is_self_address(ticketer); - const newLedger = Ledger.increase_token_amount_for_user(to_, token_id, amount, ledger); - const transaction = make_transaction(Some(to_), token_id, amount); - const balance = Ledger.get_for_user(to_, token_id, ledger); - const balance_update: balance_event_data = - { - owner: to_, - token_id: token_id, - new_balance: balance + amount, - diff: int(amount), - }; - const event_balance = Tezos.emit("%balance_update", balance_update); - operationsEvent = list([event_balance, ...operationsEvent]); - return [list([transaction, ...transactions]), newLedger, operationsEvent]; -}; - -export const import_tickets_to = ( - tickets_to_import_to : tickets_to_import_to, - [transfers, ledger, operations] : [list, LedgerModule, list] -): [list, LedgerModule, list] => { - const { to_, tickets_to_import } = tickets_to_import_to; - const [transaction, newLedger, events] = List.fold_left( ([r, t]) => import_ticket_to(to_, t, r), [list([]), ledger, operations], tickets_to_import ); - const transfer = make_transfer(None(), transaction); - - return [list([transfer, ...transfers]), newLedger, events]; -}; - -export const import_tickets = ( - importTicket : import_ticket, - storage : Storage, - ledger: LedgerModule -) : [list, Storage] => { - let operations = list([]); - let finalOperations = list([]); - - const [_transactions, newLedger, events] = List.fold_left( - ([r, t]) => import_tickets_to(t, r), - [list([]), ledger, operations], - importTicket - ); - - /** Reverse operations list **/ - - for (const op of events) { - finalOperations = list([op, ...finalOperations]); - } - - return [finalOperations, Storage.set_ledger(storage, newLedger.data)]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/lambda_export.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/lambda_export.jsligo deleted file mode 100644 index 7d25caa9..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/lambda_export.jsligo +++ /dev/null @@ -1,106 +0,0 @@ -#import "../data/errors.jsligo" "Errors" -#import "../data/token.jsligo" "Token" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/approvals.jsligo" "Approvals" -#import "./transfer.jsligo" "Transfer" - -type Storage = Storage.T; - -type ExportedTicket = ticket<[Token.T, option]>; - -type TicketToExport = - // @layout comb - { - from_ : address; - token_id : Token.T; - amount : nat; - }; - -type destination = (tickets: list) => list; - -type ExportTicketsTo = - // @layout comb - { - ticketsToExport : list; - destination : destination; - }; - -type ExportTicket = ExportTicketsTo; -export type T = ExportTicket; - -type ProxyParameters = { - tickets: list, - action: (tickets: list) => list -}; - -type balance_event_data = - @layout("comb") - { - owner: address, - token_id: nat, - new_balance: nat, - diff: int - }; - -type allowance_update_type = - @layout("comb") -{ - owner: address, - spender: address, - token_id: nat, - new_allowance: nat, - diff: int -}; - -type LedgerModule = Ledger.ledger_module; - -const create_ticket = ( - storage: Storage, - ticketToExport : TicketToExport, - ledger: LedgerModule -) : [list, ExportedTicket, LedgerModule, Storage] => { - const { from_, token_id, amount } = ticketToExport; - - let operations : list = list([]); - - /** Allowance & Operator checks **/ - - Storage.assert_token_exist(storage, token_id); - const approvals = Storage.get_approvals(storage); - - const oldApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, approvals); - const authorizedApprovals = Transfer.authorize_transfer(storage, approvals, from_, token_id, amount); - const newApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, authorizedApprovals); - - if (oldApprovals != newApprovals) { - const allowance_update: allowance_update_type = { - owner: from_, - spender: Tezos.get_sender(), - token_id: token_id, - new_allowance: newApprovals, - diff: newApprovals - oldApprovals; - }; - const allowance_event_op = Tezos.emit("%allowance_update", allowance_update); - operations = list([allowance_event_op, ...operations]); - } - const balance = Ledger.get_for_user(from_, token_id, ledger); - const balance_update: balance_event_data = - { - owner: from_, - token_id: token_id, - new_balance: abs(balance - amount), - diff: -amount, - }; - const event_balance = Tezos.emit("%balance_update", balance_update); - operations = list([event_balance, ...operations]); - const newLedger = Ledger.decrease_token_amount_for_user(ledger, from_, token_id, amount); - let newStorage = Storage.set_approvals(storage, authorizedApprovals); - newStorage = Storage.set_ledger(newStorage, newLedger.data); - - const ticket = Option.value_with_error( - Errors.cannot_create_ticket, - Tezos.create_ticket([token_id, None()], amount) - ); - return [operations, ticket, newLedger, newStorage]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/mint.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/mint.jsligo deleted file mode 100644 index 1d4cc4c6..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/mint.jsligo +++ /dev/null @@ -1,121 +0,0 @@ -#import "../data/amount.jsligo" "Amount" -#import "../data/errors.jsligo" "Errors" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/token.jsligo" "Token" -#import "../data/tokenMetadata.jsligo" "TokenMetadata" -#import "../common/assertions.jsligo" "Assertions" -#import "../common/errors.jsligo" "Errors" - -type Storage = Storage.T; -type LedgerModule = Ledger.ledger_module; - -export type MintParam = -@layout("comb") -{ - from_uuid : string; - to_ : address; - token_info : option>; -}; - -type total_supply_update_type = -@layout("comb") -{ - token_id: Token.T, - new_total_supply: nat, - diff: int -}; - -type balance_event_data = -@layout("comb") -{ - owner: address, - token_id: nat, - new_balance: nat, - diff: int -}; - -type metadata_update_type = -@layout("comb") -{ - token_id: Token.T, - new_metadata: option> -}; - -type Mint = MintParam; -export type T = MintParam; - -export const mint = ( - mint: Mint, - storage: Storage, - ledger: LedgerModule -): [list, Storage] => { - let operations = list([]); - let finalOperations = list([]); - // Assert.Error.assert(storage.extension.admin == Tezos.get_sender(), Errors.not_admin); - - // Assert is user allowed to mint - Assertions.assert_minting_allowed(mint.from_uuid, mint.to_, storage.registry); - const token_index = Storage.get_token_index(storage); - let oldSupplyOpt = Ledger.get_supply(token_index, ledger); - let oldSupply = match(oldSupplyOpt) { - when (Some(supply)): do { return supply; }; - when (None): do { return (0 as nat); }; - }; - - Assertions.assert_asset_id_exists(oldSupply); - - const balance = Ledger.get_for_user(mint.to_, token_index, ledger); - const supply_update: total_supply_update_type = - { - token_id: token_index, - new_total_supply: 1n + oldSupply, - diff: 1, - }; - const balance_update: balance_event_data = - { - owner: mint.to_, - token_id: token_index, - new_balance: balance + 1n, - diff: 1, - }; - const event_balance = Tezos.emit("%balance_update", balance_update); - const event_supply = Tezos.emit("%total_supply_update", supply_update); - let new_token_info = match (mint.token_info) { - when (Some(token_metadata)): do { return token_metadata; }; - when (None): do { return Map.empty; }; - }; - let token_info = TokenMetadata.get_token_info(token_index, storage.token_metadata); - let newTokenMetadata = TokenMetadata.set_token_info(token_index, token_info, storage.token_metadata); - if (Map.size(token_info) == (0 as nat) && Map.size(new_token_info) == (0 as nat)) { - token_info = Option.value_with_error("Token info must be provided", mint.token_info); - }; - if(Map.size(new_token_info) > (0 as nat)) { - newTokenMetadata = TokenMetadata.set_token_info(token_index, new_token_info, storage.token_metadata); - const metadata_event_data: metadata_update_type = { - token_id: token_index, - new_metadata: mint.token_info - } - const metadata_event = Tezos.emit("%token_metadata_update", { metadata_event_data }); - operations = list([metadata_event, ...operations]); - } - const newLedger = Ledger.increase_token_amount_for_user(mint.to_, token_index, 1n, ledger); - operations = list([event_supply, ...operations]); - operations = list([event_balance, ...operations]); - - /** Reverse operations list **/ - - for (const op of operations) { - finalOperations = list([op, ...finalOperations]); - } - - return [ - finalOperations, - Storage.set_ledger( - Storage.set_token_metadata( - Storage.set_next_token_index(storage), - newTokenMetadata), - newLedger.data - ) - ]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/transfer.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/transfer.jsligo deleted file mode 100644 index 38e36a64..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/transfer.jsligo +++ /dev/null @@ -1,235 +0,0 @@ -#import "../data/token.jsligo" "Token" -#import "../data/amount.jsligo" "Amount" -#import "../data/approvals.jsligo" "Approvals" -#import "../data/operators.jsligo" "Operators" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/errors.jsligo" "Errors" - -type storage = Storage.T; - -type atomic_trans = -// @layout comb -{ - to_ : address; - amount : Amount.T; - token_id : Token.T; -}; - -type transfer_from = { - from_ : address; - txs : list; -}; - -type balance_event_data = - @layout("comb") - { - owner: address, - token_id: nat, - new_balance: nat, - diff: int - }; - -type allowance_update_type = - @layout("comb") -{ - owner: address, - spender: address, - token_id: nat, - new_allowance: nat, - diff: int -}; - -type transfer_event_type = - @layout("comb") -{ - from_: address, - to_: address, - token_id: nat, - amount: nat -}; - -type transfer = list; -export type t = transfer; - -type ledger_module = Ledger.ledger_module; - -export const authorize_transfer = ( - storage: storage, - approvals: Approvals.T, - from_: address, - token_id: Token.T, - amount: Amount.T -): Approvals.T => { - - if (from_ == Tezos.get_sender()) { - return approvals; - } - - const current_allowance: nat = Approvals.get_amount(from_, Tezos.get_sender(), token_id, approvals); - - if (current_allowance > (0 as nat)) { - if (current_allowance >= amount) { - return Approvals.decrease_approved_amount(approvals, from_, Tezos.get_sender(), token_id, amount); - } - } - - return match(Storage.get_operators(storage)) { - when(Some(operators)): do { - Operators.assert_authorisation(from_, token_id, operators); - return approvals; - }; - when(None()): do { - failwith(Errors.insufficient_allowance); - }; - }; -}; - -type event_map_key = [address, Token.T]; -type allowance_event_map_key = [address, address, Token.T]; -type event_map_value = [nat, int]; - -const atomic_trans = ( - storage : storage, - from_ : address, - [[ledger, approvals, operations, event_balance, event_allowance], transfer] : [[ledger_module, Approvals.T, list, map, map], atomic_trans] -): [ledger_module, Approvals.T, list, map, map] => { - let operationsEvent = operations; - let event_balance_map: map = event_balance; - let event_allowance_map: map = event_allowance; - - const { to_, token_id, amount } = transfer; - Storage.assert_token_exist(storage, token_id); - - const oldApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, approvals); - const authorizedApprovals = authorize_transfer(storage, approvals, from_, token_id, amount); - const newApprovals = Approvals.get_amount(from_, Tezos.get_sender(), token_id, authorizedApprovals); - const balance_from = Ledger.get_for_user(from_, token_id, ledger); - const balance_to = Ledger.get_for_user(to_, token_id, ledger); - - let diff_from: int = 0; - let diff_to: int = 0; - let diff_allowance: int = 0; - const key_from: event_map_key = [from_, token_id]; - const key_to: event_map_key = [to_, token_id]; - const key_allowance: allowance_event_map_key = [from_, Tezos.get_sender(), token_id]; - - const oldData_from: option = Map.find_opt(key_from, event_balance_map); - const oldData_to: option = Map.find_opt(key_to, event_balance_map); - const oldData_allowance: option = Map.find_opt(key_allowance, event_allowance_map); - let new_balance_from: nat = abs(balance_from - amount); - let new_balance_to: nat = balance_to + amount; - - match(oldData_from) { - when(Some(data)): do { diff_from = data[1] - amount; - event_balance_map = Map.update(key_from, Some([new_balance_from, diff_from]), event_balance_map)}; - when(None): do { diff_from = - amount; - event_balance_map = Map.add(key_from, [new_balance_from, diff_from], event_balance_map); }; - }; - - match(oldData_to) { - when(Some(data)): do { diff_to = data[1] + amount; - event_balance_map = Map.update(key_to, Some([new_balance_to, diff_to]), event_balance_map);}; - when(None): do { diff_to = int(amount); - event_balance_map = Map.add(key_to, [new_balance_to, diff_to], event_balance_map); }; - }; - - if (oldApprovals != newApprovals) { - match(oldData_allowance) { - when(Some(data)): do { diff_allowance = data[1] + (newApprovals - oldApprovals); - event_allowance_map = Map.update(key_allowance, Some([newApprovals, diff_allowance]), event_allowance_map);}; - when(None): do { diff_allowance = newApprovals - oldApprovals; - event_allowance_map = Map.add(key_allowance, [newApprovals, diff_allowance], event_allowance_map);}; - }; - } - const transfer_event_data: transfer_event_type = - { - from_: from_, - to_: to_, - token_id: token_id, - amount: amount - }; - const transfer_event_op = Tezos.emit("%transfer_event", transfer_event_data); - operationsEvent = list([transfer_event_op, ...operationsEvent]); - - const newLedger = Ledger.decrease_token_amount_for_user(ledger, from_, token_id, amount); - - return [Ledger.increase_token_amount_for_user(to_, token_id, amount, newLedger), authorizedApprovals, operationsEvent, event_balance_map, event_allowance_map]; -}; - -const transfer_from = ( - storage: storage, - [[ledger, approvals, operations, event_balance, event_allowance], transfer] : [[ledger_module, Approvals.T, list, map, map], transfer_from] -): [ledger_module, Approvals.T, list, map, map] => { - const { from_, txs } = transfer; - let currentOperations = operations; - let event_balance_map: map = event_balance; - let event_allowance_map: map = event_allowance; - - return List.fold_left(atomic_trans(storage, from_), [ledger, approvals, currentOperations, event_balance_map, event_allowance_map], txs); -} - -export const transfer = ( - transfer: transfer, - storage: storage, - ledger: ledger_module -): [list, storage] => { - let operations = list([]); - let finalOperations = list([]); - let event_balance_map: map = Map.empty; - let event_allowance_map: map = Map.empty; - - const approvals = Storage.get_approvals(storage); - const [newLedger, newApprovals, operationsEvent, event_balance, event_allowance] = List.fold_left(transfer_from(storage), [ledger, approvals, operations, event_balance_map, event_allowance_map ], transfer); - - let newStorage = Storage.set_approvals(storage, newApprovals); - newStorage = Storage.set_ledger(newStorage, newLedger.data); - - let balance_updates: list = Map.fold( - ([acc, [key, value]]: [list, [event_map_key, event_map_value]]) => { - if (value[1] != 0) { - const data: balance_event_data = - { - owner: key[0], - token_id: key[1], - new_balance: value[0], - diff: value[1] - }; - const event_balance = Tezos.emit("%balance_update", data); - return list([event_balance, ...acc]); - } - return acc; - }, - event_balance, - list([]) - ) - - let allowance_updates: list = Map.fold( - ([acc, [key, value]]: [list, [allowance_event_map_key, event_map_value]]) => { - if (value[1] != 0) { - const data: allowance_update_type = - { - owner: key[0], - spender: key[1], - token_id: key[2], - new_allowance: value[0], - diff: value[1] - }; - const event_allowance_op = Tezos.emit("%allowance_update", data); - return list([event_allowance_op, ...acc]); - } - return acc; - }, - event_allowance, - list([]) - ) - - /** Reverse operations list **/ - - for (const op of operationsEvent) { - finalOperations = list([op, ...finalOperations]); - } - finalOperations = list([...allowance_updates, ...finalOperations]); - finalOperations = list([...balance_updates, ...finalOperations]); - return [finalOperations, newStorage]; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/entrypoints/update.jsligo b/apps/smart-contracts/asset-registry/contracts/entrypoints/update.jsligo deleted file mode 100644 index fa3447cc..00000000 --- a/apps/smart-contracts/asset-registry/contracts/entrypoints/update.jsligo +++ /dev/null @@ -1,91 +0,0 @@ -#import "../data/errors.jsligo" "Errors" -#import "../data/operators.jsligo" "Operators" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/token.jsligo" "Token" - -type Storage = Storage.T; - -type operator = -// @layout comb -{ - owner : address; - operator : address; - token_id : nat; -}; - -export type operator_update = -@layout("comb") -{ - owner : address; - operator : address; - token_id : Token.T; - is_operator : bool; -}; - -type operator_update_event = -@layout("comb") -{ - sender : address; - operator_update: list; -}; - -export type unit_update = -| ["AddOperator", operator] -| ["RemoveOperator", operator]; - -type update_operators = list; -export type T = update_operators; - -const _update_ops = ( - [updates, operators] : [list, Operators.t], - update : unit_update -) : [list, Operators.t] => { - return match(update) { - when(AddOperator(operator)): do { - const { owner, operator, token_id } = operator; - const newOperators = Operators.add_operator(operators, owner, operator, token_id); - const updatedOp: operator_update = { - owner, - operator, - token_id, - is_operator: true - }; - return [list([updatedOp, ...updates]), newOperators]; - }; - when(RemoveOperator(operator)): do { - const { owner, operator, token_id } = operator; - const newOperators = Operators.remove_operator(operators, owner, operator, token_id); - const updatedOp: operator_update = { - owner, - operator, - token_id, - is_operator: true - }; - - return [list([updatedOp, ...updates]), newOperators]; - }; - }; -}; - -export const update_ops = ( - updates: update_operators, - storage: Storage -) : [list, Storage] => { - const sender = Tezos.get_sender(); - return match(Storage.get_operators(storage)) { - when(Some(operators)): do { - const [newUpdates, newOperators] = List.fold_left( - ([acc, item]) => _update_ops(acc, item), - [list([]), operators], - updates - ); - - return [ - list([ Tezos.emit("%operator_update", { sender, newUpdates }) ]), - Storage.set_operators(storage, newOperators) - ]; - }; - when(None()): failwith(Errors.storage_has_no_operators); - }; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/generic/fa2.1.jsligo b/apps/smart-contracts/asset-registry/contracts/generic/fa2.1.jsligo deleted file mode 100644 index e7e30652..00000000 --- a/apps/smart-contracts/asset-registry/contracts/generic/fa2.1.jsligo +++ /dev/null @@ -1,67 +0,0 @@ -/* - * DISCLAIMER - * This implementation of FA2.1 norm is work in progress, this implementation is not yet ready for production. - */ - -export #import "../data/errors.jsligo" "Errors" -export #import "../data/metadata.jsligo" "Metadata" -export #import "../data/token.jsligo" "Token" -export #import "../data/ledger.jsligo" "Ledger" -export #import "../data/operators.jsligo" "Operators" -export #import "../data/approvals.jsligo" "Approvals" -export #import "../data/tokenMetadata.jsligo" "TokenMetadata" -export #import "../data/storage.jsligo" "Storage" -export #import "../entrypoints/transfer.jsligo" "Transfer" -export #import "../entrypoints/balance_of.jsligo" "Balance_of" -export #import "../entrypoints/update.jsligo" "Update" -export #import "../entrypoints/approve.jsligo" "Approve" -export #import "../entrypoints/mint.jsligo" "Mint" -export #import "./views.jsligo" "Views" - -type LedgerModule = Ledger.ledger_module; -export type Storage = Storage.T; - -// A is the extension for the storage -// L is the ledger type - -export type Interface = { - transfer: (ps : [Transfer.t, Storage]) => [list, Storage], - balance_of: (ps: [Balance_of.T, Storage]) => [list, Storage], - update_operators: (ps : [Update.T, Storage]) => [list, Storage], - approve: (ps : [Approve.T, Storage]) => [list, Storage], - mint: (ps : [Mint.T, Storage]) => [list, Storage], -}; - -export type InterfaceViews = { - get_balance: (ps: [Views.get_balance_T, Storage]) => Views.get_balance_R, - get_total_supply: (ps: [Views.get_total_supply_T, Storage]) => Views.get_total_supply_R, - is_operator: (ps: [Views.is_operator_T, Storage]) => Views.is_operator_R, - get_allowance: (ps: [Views.get_allowance_T, Storage]) => Views.get_allowance_R, - get_token_metadata: (ps: [Views.get_token_metadata_T, Storage]) => Views.get_token_metadata_R, - is_token: (ps: [Views.is_token_T, Storage]) => Views.is_token_R, -}; - -export const make = (makeLedger: (l: L) => LedgerModule) : Interface => { - const ledger = (s : Storage) : LedgerModule => makeLedger(s.ledger); - - return { - transfer: ([p, s]) => Transfer.transfer(p, s, ledger(s)), - balance_of: ([p, s]) => Balance_of.balance_of(p, s, ledger(s)), - update_operators: ([p, s]) => Update.update_ops(p, s), - approve: ([p, s]) => Approve.approve(p, s), - mint: ([p, s]) => Mint.mint(p, s, ledger(s)), - }; -}; - -export const makeViews = (makeLedger: (l: L) => LedgerModule) : InterfaceViews => { - const ledger = (s : Storage) : LedgerModule => makeLedger(s.ledger); - - return { - get_balance: ([p, s]) => Views.get_balance(p, s, ledger(s)), - get_total_supply: ([p, s]) => Views.get_total_supply(p, s, ledger(s)), - is_operator: ([p, s]) => Views.is_operator(p, s, ledger(s)), - get_allowance: ([p, s]) => Views.get_allowance(p, s, ledger(s)), - get_token_metadata: ([p, s]) => Views.get_token_metadata(p, s, ledger(s)), - is_token: ([p, s]) => Views.is_token(p, s, ledger(s)), - }; -}; diff --git a/apps/smart-contracts/asset-registry/contracts/generic/views.jsligo b/apps/smart-contracts/asset-registry/contracts/generic/views.jsligo deleted file mode 100644 index 133b5033..00000000 --- a/apps/smart-contracts/asset-registry/contracts/generic/views.jsligo +++ /dev/null @@ -1,103 +0,0 @@ -// Import necessary modules -#import "../data/token.jsligo" "Token" -#import "../data/ledger.jsligo" "Ledger" -#import "../data/storage.jsligo" "Storage" -#import "../data/admin.jsligo" "Admin" - -//type ExtendedStorage = { -// admin: Admin.T; -//}; -//type ParametricStorage = Storage.T; -//type Ledger = Ledger.ledger_module; -//export type Storage = ParametricStorage; - -export type Storage = Storage.T; -type LedgerModule = Ledger.ledger_module; - -export type get_total_supply_T = Token.T; -export type get_total_supply_R = nat; - -export const get_total_supply = ( - token_id: get_total_supply_T, - s: Storage, - ledgerModule: LedgerModule -) : get_total_supply_R => - Option.value(0n, ledgerModule.supply([s.ledger, token_id])); - - /*{ - return match(Big_map.find_opt(token_id, s.ledger.supply)) { - when(Some(n)): do { return n }; - when(None): do { return 0n }; - }; -};*/ - -export type get_balance_T = {owner: address; token_id: Token.T}; -export type get_balance_R = nat; - -export const get_balance = ( - params: get_balance_T, - s: Storage, - ledgerModule: LedgerModule -) : get_balance_R => - ledgerModule.balance_of([s.ledger, params.owner, params.token_id]); - -export type is_token_T = Token.T; -export type is_token_R = bool; - -export const is_token = ( - token_id: is_token_T, - s: Storage, - ledgerModule: LedgerModule -) : is_token_R => - match (ledgerModule.supply([s.ledger, token_id])) { - when(Some(_n)): true; - when(None): false; - }; - -export type get_token_metadata_T = Token.T; -export type get_token_metadata_R = map; - -export const get_token_metadata = ( - token_id: get_token_metadata_T, - s: Storage, - _ledgerModule: LedgerModule -) : get_token_metadata_R => { - return match(Big_map.find_opt(token_id, s.token_metadata)) { - when(Some(token)): do { return token.token_info }; - when(None): do { return Map.empty }; - }; -}; - -export type get_allowance_T = {owner: address; spender: address; token_id: nat}; -export type get_allowance_R = nat; - -export const get_allowance = ( - params: get_allowance_T, - s: Storage, - _ledgerModule: LedgerModule -) : get_allowance_R => { - const key = [params.owner, params.spender, params.token_id]; - return match(Big_map.find_opt(key, s.approvals)) { - when(Some(n)): do { return n }; - when(None): do { return 0n }; - }; -}; - -export type is_operator_T = {owner: address; operator: address; token_id: nat}; -export type is_operator_R = bool; - -export const is_operator = ( - params: is_operator_T, - s: Storage, - _ledgerModule: LedgerModule -) : is_operator_R => { - return match(s.operators) { - when(Some(operators)): do { - return match(Big_map.find_opt([params.owner, params.token_id], operators)) { - when(Some(operators)): do { return Set.mem(params.operator, operators) }; - when(None): do { return false }; - }; - }; - when(None): do { return false }; - } -}; diff --git a/apps/smart-contracts/asset-registry/lib/registry/conditions.jsligo b/apps/smart-contracts/asset-registry/lib/registry/conditions.jsligo deleted file mode 100644 index b2e82c26..00000000 --- a/apps/smart-contracts/asset-registry/lib/registry/conditions.jsligo +++ /dev/null @@ -1,22 +0,0 @@ -#import "errors.jsligo" "Errors" -#import "storage.jsligo" "Storage" - -export namespace Guards { - export const caller_is_trust_anchor = (trust_anchor_did: address) : unit => - Assert.Error.assert( - Tezos.get_sender() == trust_anchor_did, - Errors.incorrect_sender - ); - - export const account_is_active = (account_status: Storage.Types.status) : unit => - Assert.Error.assert( - account_status == Active(), - Errors.inactive_account - ); - - export const caller_is_parent_member = ([uuid, member]: [string, Storage.Types.member_credential_record]) : unit => - Assert.Error.assert( - member.uuid == uuid, - Errors.incorrect_sender - ); -} diff --git a/apps/smart-contracts/asset-registry/lib/registry/errors.jsligo b/apps/smart-contracts/asset-registry/lib/registry/errors.jsligo deleted file mode 100644 index 23968f53..00000000 --- a/apps/smart-contracts/asset-registry/lib/registry/errors.jsligo +++ /dev/null @@ -1,2 +0,0 @@ -export const incorrect_sender = "Incorrect sender" -export const inactive_account = "Inactive account" diff --git a/apps/smart-contracts/asset-registry/lib/registry/registry.jsligo b/apps/smart-contracts/asset-registry/lib/registry/registry.jsligo deleted file mode 100644 index 869aa68a..00000000 --- a/apps/smart-contracts/asset-registry/lib/registry/registry.jsligo +++ /dev/null @@ -1,85 +0,0 @@ -#import "conditions.jsligo" "Conditions" -#import "storage.jsligo" "Storage" -#import "utils.jsligo" "Utils" - -@entry -const add_member = ([ uuid, did ]: [ string, address ], store: Storage.Types.store): Storage.Types.return_ => { - // guard: is contract called by trust_anchor - const trust_anchor_did = Utils.TrustAnchor.get_trust_anchor_did(store); - Conditions.Guards.caller_is_trust_anchor(trust_anchor_did); - - // guard: trust anchor is active - const account_status = Utils.TrustAnchor.get_account_status(store); - Conditions.Guards.account_is_active(account_status); - - const trust_anchor_uuid = Utils.TrustAnchor.get_trust_anchor_uuid(store); - - const record = { - did, - uuid, - status: Active(), - issuer: trust_anchor_uuid, - }; - - const new_store = Utils.Member.add_member(record, store); - const member_added = Tezos.emit("%member_added", record); - return [list([member_added]), new_store]; -} - -@entry -const add_user = ([user_uuid, user_did, parent_uuid]: [string, address, string], store: Storage.Types.store): Storage.Types.return_ => { - const member = Utils.Member.get_member(store); - - // guard: is contract called by parent member - // guard: is parent member active - Conditions.Guards.caller_is_parent_member([parent_uuid, member]); - Conditions.Guards.account_is_active(member.status); - - const record: Storage.Types.user_credential_record = { - did: user_did, - uuid: user_uuid, - status: Active(), - issuer: parent_uuid, - }; - - const new_store = Utils.User.add_user(record, store); - const user_added = Tezos.emit("%user_added", record); - return [list([user_added]), new_store]; -} - -@entry -const revoke_member_credentials = (did: address, store: Storage.Types.store): Storage.Types.return_ => { - // guard: is contract called by trust_anchor - const trust_anchor_did = Utils.TrustAnchor.get_trust_anchor_did(store); - Conditions.Guards.caller_is_trust_anchor(trust_anchor_did); - - const new_store = Utils.Member.revoke_member_credentials(did, store); - const member_revoked = Tezos.emit("%member_revoked", did); - return [list([member_revoked]), new_store]; -} - -@entry -const revoke_user_credentials = ([user_uuid, parent_uuid]: [string, string], store: Storage.Types.store): Storage.Types.return_ => { - const member = Utils.Member.get_member(store); - - // guard: is contract called by parent member - // guard: is member account active - Conditions.Guards.caller_is_parent_member([parent_uuid, member]); - Conditions.Guards.account_is_active(member.status); - - const new_store = Utils.User.revoke_user_credentials(user_uuid, store); - const user_revoked = Tezos.emit("%user_revoked", user_uuid); - return [list([user_revoked]), new_store]; -} - -@view -const get_permissions = ([user_uuid, member_did]: [string, address], store: Storage.Types.store): bool => { - const permissions = Utils.User.get_permissions(user_uuid, member_did, store); - return permissions; -} - -@view -const get_entry = ([user_uuid, member_did], store: Storage.Types.store) => { - const record = Utils.Entry.get_entry(user_uuid, member_did, store); - return record; -} diff --git a/apps/smart-contracts/asset-registry/lib/registry/storage.jsligo b/apps/smart-contracts/asset-registry/lib/registry/storage.jsligo deleted file mode 100644 index 89eca241..00000000 --- a/apps/smart-contracts/asset-registry/lib/registry/storage.jsligo +++ /dev/null @@ -1,31 +0,0 @@ -export namespace Types { - export type status = ["Active"] | ["Revoked"] - - export type trust_anchor = { - did: address, - status: status, - uuid: string, - } - - export type member_credential_record = { - did: address, - status: status, - issuer: string, - uuid: string, - } - - export type user_credential_record = { - did: address, - status: status, - issuer: string, - uuid: string, - } - - export type store = { - trust_anchor: trust_anchor, - member_registry: big_map, - user_registry: big_map, - } - - export type return_ = [list, store] -} diff --git a/apps/smart-contracts/asset-registry/lib/registry/utils.jsligo b/apps/smart-contracts/asset-registry/lib/registry/utils.jsligo deleted file mode 100644 index 99ea19b4..00000000 --- a/apps/smart-contracts/asset-registry/lib/registry/utils.jsligo +++ /dev/null @@ -1,99 +0,0 @@ -#import "storage.jsligo" "Storage" - -export namespace TrustAnchor { - export const get_trust_anchor_did = (store: Storage.Types.store) => store.trust_anchor.did - export const get_account_status = (store: Storage.Types.store) => store.trust_anchor.status - export const get_trust_anchor_uuid = (store: Storage.Types.store) => store.trust_anchor.uuid -} - -export namespace Member { - export const get_member = (store: Storage.Types.store) => { - const caller = Tezos.get_sender(); - return match(Big_map.find_opt(caller as address, store.member_registry)) { - when(Some(member)): member - when(None()): failwith("Member not found") as Storage.Types.member_credential_record - }; - } - - export const add_member = (record: Storage.Types.member_credential_record, store: Storage.Types.store) => { - return { - ...store, - member_registry: Big_map.add(record.did, record, store.member_registry) - } - } - - export const revoke_member_credentials = (did: address, store: Storage.Types.store) => { - const member = match(Big_map.find_opt(did, store.member_registry)) { - when(Some(member)): member - when(None()): failwith("Member not found") as Storage.Types.member_credential_record - }; - return { - ...store, - member_registry: Big_map.update(did, Some({ - ...member, - status: Revoked(), - }), store.member_registry) - } - } -} - -export namespace User { - export const add_user = (record: Storage.Types.user_credential_record, store: Storage.Types.store) => { - return { - ...store, - user_registry: Big_map.add(record.uuid, record, store.user_registry) - } - } - - export const revoke_user_credentials = (uuid: string, store: Storage.Types.store) => { - const user = match(Big_map.find_opt(uuid, store.user_registry)) { - when(Some(user)): user - when(None()): failwith("User not found") as Storage.Types.user_credential_record - }; - return { - ...store, - user_registry: Big_map.update(uuid, Some({ - ...user, - status: Revoked(), - }), store.user_registry) - } - } - - export const get_permissions = (uuid: string, member_address: address, store: Storage.Types.store) => { - const user = match(Big_map.find_opt(uuid, store.user_registry)) { - when(Some(user)): user - when(None()): failwith("User not found") as Storage.Types.user_credential_record - }; - - const member = match(Big_map.find_opt(member_address, store.member_registry)) { - when(Some(member)): member - when(None()): failwith("Member not found") as Storage.Types.member_credential_record - }; - - if (member.uuid != user.issuer) { - failwith("Member is not the issuer of the user"); - }; - - return user.status == Active() && member.status == Active(); - } -} - -export namespace Entry { - export const get_entry = (uuid: string, member_address: address, store: Storage.Types.store) => { - const user = match(Big_map.find_opt(uuid, store.user_registry)) { - when(Some(user)): user - when(None()): failwith("User not found") as Storage.Types.user_credential_record - }; - - const member = match(Big_map.find_opt(member_address, store.member_registry)) { - when(Some(member)): member - when(None()): failwith("Member not found") as Storage.Types.member_credential_record - }; - - if (member.uuid != user.issuer) { - failwith("Member is not the issuer of the user"); - }; - - return { user, member }; - } -} diff --git a/apps/smart-contracts/asset-registry/package-lock.json b/apps/smart-contracts/asset-registry/package-lock.json deleted file mode 100644 index e1c93ebc..00000000 --- a/apps/smart-contracts/asset-registry/package-lock.json +++ /dev/null @@ -1,1782 +0,0 @@ -{ - "name": "asset-registry", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "asset-registry", - "version": "1.0.0", - "license": "ISC", - "devDependencies": { - "@taqueria/plugin-core": "^0.56.0", - "@taqueria/plugin-flextesa": "^0.56.0", - "@taqueria/plugin-ligo": "^0.56.0", - "@taqueria/plugin-taquito": "^0.56.0", - "@taqueria/plugin-tzcompose": "^0.56.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.4.tgz", - "integrity": "sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "dev": true, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@peculiar/asn1-schema": { - "version": "2.3.13", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", - "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", - "dev": true, - "dependencies": { - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - } - }, - "node_modules/@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "dev": true, - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@peculiar/webcrypto": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", - "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", - "dev": true, - "dependencies": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2", - "webcrypto-core": "^1.8.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/@stablelib/binary": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", - "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", - "dev": true, - "dependencies": { - "@stablelib/int": "^1.0.1" - } - }, - "node_modules/@stablelib/blake2b": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/blake2b/-/blake2b-1.0.1.tgz", - "integrity": "sha512-B3KyKoBAjkIFeH7romcF96i+pVFYk7K2SBQ1pZvaxV+epSBXJ+n0C66esUhyz6FF+5FbdQVm77C5fzGFcEZpKA==", - "dev": true, - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/bytes": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/bytes/-/bytes-1.0.1.tgz", - "integrity": "sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==", - "dev": true - }, - "node_modules/@stablelib/constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-1.0.1.tgz", - "integrity": "sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==", - "dev": true - }, - "node_modules/@stablelib/ed25519": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz", - "integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==", - "dev": true, - "dependencies": { - "@stablelib/random": "^1.0.2", - "@stablelib/sha512": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/hash": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", - "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==", - "dev": true - }, - "node_modules/@stablelib/hmac": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hmac/-/hmac-1.0.1.tgz", - "integrity": "sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==", - "dev": true, - "dependencies": { - "@stablelib/constant-time": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/int": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", - "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==", - "dev": true - }, - "node_modules/@stablelib/keyagreement": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz", - "integrity": "sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==", - "dev": true, - "dependencies": { - "@stablelib/bytes": "^1.0.1" - } - }, - "node_modules/@stablelib/nacl": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@stablelib/nacl/-/nacl-1.0.4.tgz", - "integrity": "sha512-PJ2U/MrkXSKUM8C4qFs87WeCNxri7KQwR8Cdwm9q2sweGuAtTvOJGuW0F3N+zn+ySLPJA98SYWSSpogMJ1gCmw==", - "dev": true, - "dependencies": { - "@stablelib/poly1305": "^1.0.1", - "@stablelib/random": "^1.0.2", - "@stablelib/wipe": "^1.0.1", - "@stablelib/x25519": "^1.0.3", - "@stablelib/xsalsa20": "^1.0.2" - } - }, - "node_modules/@stablelib/pbkdf2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/pbkdf2/-/pbkdf2-1.0.1.tgz", - "integrity": "sha512-d5jwK6jW1DkMyzqY8D1Io+fRXcsUVr95lk5LKX9ghaUdAITTc1ZL0bff+R0IrwSixbHluxhnivG7vDw59AZ/Nw==", - "dev": true, - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/hmac": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/poly1305": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/poly1305/-/poly1305-1.0.1.tgz", - "integrity": "sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==", - "dev": true, - "dependencies": { - "@stablelib/constant-time": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/random": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", - "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", - "dev": true, - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/salsa20": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@stablelib/salsa20/-/salsa20-1.0.2.tgz", - "integrity": "sha512-nfjKzw0KTKrrKBasEP+j7UP4I8Xudom8lVZIBCp0kQNARXq72IlSic0oabg2FC1NU68L4RdHrNJDd8bFwrphYA==", - "dev": true, - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/constant-time": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/sha512": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz", - "integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==", - "dev": true, - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/wipe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", - "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==", - "dev": true - }, - "node_modules/@stablelib/x25519": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stablelib/x25519/-/x25519-1.0.3.tgz", - "integrity": "sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==", - "dev": true, - "dependencies": { - "@stablelib/keyagreement": "^1.0.1", - "@stablelib/random": "^1.0.2", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@stablelib/xsalsa20": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@stablelib/xsalsa20/-/xsalsa20-1.0.2.tgz", - "integrity": "sha512-7XdBGbcNgBShmuhDXv1G1WPVCkjZdkb1oPMzSidO7Fve0MHntH6TjFkj5bfLI+aRE+61weO076vYpP/jmaAYog==", - "dev": true, - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/salsa20": "^1.0.2", - "@stablelib/wipe": "^1.0.1" - } - }, - "node_modules/@taqueria/lib-ligo": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/lib-ligo/-/lib-ligo-0.56.0.tgz", - "integrity": "sha512-FI5v7jtumr6bWlOjLMUC++FoTEil+x6Eo715UVI9L6JL5KHV4FZeb4izy2eyMcHEoICGM/wfGRp2WdBI7eb9Fw==", - "dev": true, - "dependencies": { - "@taqueria/node-sdk": "^0.56.0", - "fast-glob": "^3.3.2" - } - }, - "node_modules/@taqueria/node-sdk": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/node-sdk/-/node-sdk-0.56.0.tgz", - "integrity": "sha512-xdw5lKPOLfsEFz2ct9BvKugoO5RrTW+S+YEjPTu5qVKgd7ciADqxvweGufnZYX4edN+JiVHSy308OlYghkqBEg==", - "dev": true, - "dependencies": { - "@taqueria/protocol": "^0.56.0", - "@taquito/signer": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", - "i18next": "^23.7.8", - "node-fetch": "^3.3.2", - "rambda": "^9.1.0", - "shell-quote": "^1.8.1", - "stacktrace-js": "^2.0.2", - "ts-pattern": "^5.0.6", - "why-is-node-running": "^2.2.2", - "yargs": "^17.7.2", - "zod": "^3.22.4" - } - }, - "node_modules/@taqueria/plugin-core": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-core/-/plugin-core-0.56.0.tgz", - "integrity": "sha512-6ZfYisiLVWhxUdx/LRP3IcluE4VmsHdiWd0vXBb/6djDqyFtxD0CJ7Yrv4dsA9/AX4CZQN4nxyzo1YjL552JUA==", - "dev": true, - "dependencies": { - "@taqueria/node-sdk": "^0.56.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-flextesa": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-flextesa/-/plugin-flextesa-0.56.0.tgz", - "integrity": "sha512-bvOgRoAtH9H9xqdqzBCwdLtwg+SNUQG45dMxb40d/LZnssxdVxaVVcvrb9A5YavvakWDIFcT+LWezB2YKXb0RA==", - "dev": true, - "dependencies": { - "@taqueria/node-sdk": "^0.56.0", - "@taqueria/protocol": "^0.56.0", - "async-retry": "^1.3.3", - "bignumber.js": "^9.1.2", - "fast-glob": "^3.3.2", - "portfinder": "^1.0.32", - "rambda": "^9.1.0" - } - }, - "node_modules/@taqueria/plugin-ligo": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-ligo/-/plugin-ligo-0.56.0.tgz", - "integrity": "sha512-CdnZVuHuPhk/GxVuEt/uAzzCTtdCsBVxow31XvY34CpdOpy+l36Nk7xD6TVA9PIckfT7bHzTUFyr4yYj/YhvHg==", - "dev": true, - "dependencies": { - "@taqueria/lib-ligo": "^0.56.0", - "@taqueria/node-sdk": "^0.56.0", - "fast-glob": "^3.3.2" - } - }, - "node_modules/@taqueria/plugin-taquito": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-taquito/-/plugin-taquito-0.56.0.tgz", - "integrity": "sha512-AlVeLwr7JhbmvPsQOSmDiDlRV8n/kcDGVhkf8cWGzrNw2QuKUEnonnIn2+TNhIoLLDonq3AF702j7pZT+5qdAA==", - "dev": true, - "dependencies": { - "@taqueria/node-sdk": "^0.56.0", - "@taquito/michel-codec": "^20.0.1", - "@taquito/signer": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "fast-glob": "^3.3.2", - "wtfnode": "^0.9.1" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-tzcompose": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-tzcompose/-/plugin-tzcompose-0.56.0.tgz", - "integrity": "sha512-Gtnt6qQASHxRIahtK7WJF1UEYUrt3hmLzj3NIVpN1G3RCZDXt8a/7lUMfaCQfKJAy3xxOTwZb36HZhY++AsNig==", - "dev": true, - "dependencies": { - "@taqueria/node-sdk": "^0.56.0" - } - }, - "node_modules/@taqueria/protocol": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@taqueria/protocol/-/protocol-0.56.0.tgz", - "integrity": "sha512-lpFACySGtKAyEj3SM7vzjugkUzjQIrsrNkddynBz0KaewFeN4QoS0GaIDB6todYoGbVeyX+Ic5xhKYITQQXpxQ==", - "dev": true, - "dependencies": { - "@peculiar/webcrypto": "^1.4.5", - "@taquito/signer": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", - "batching-toposort": "^1.2.0", - "fluture": "^14.0.0", - "i18next": "^23.8.1", - "node-fetch": "^3.3.2", - "rambda": "^9.1.0", - "rambdax": "^11.0.0", - "shell-quote": "^1.8.1", - "stacktrace-js": "^2.0.2", - "ts-pattern": "^5.0.6", - "why-is-node-running": "^2.2.2", - "yargs": "^17.7.2", - "zod": "^3.22.4" - } - }, - "node_modules/@taquito/core": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/core/-/core-20.0.1.tgz", - "integrity": "sha512-/NvTkS8Enz5zxm481h7Ld5+MTa3/q84PMqtQ+HN3Mniv4EshnX5uIGfbdXdCQoaAeVdJOCeNIZDgeP6ZnkomRA==", - "dev": true, - "dependencies": { - "json-stringify-safe": "^5.0.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/http-utils": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-20.0.1.tgz", - "integrity": "sha512-belYNmWoT49IF8o51gEB5je5Wz54+C7Q5hmvh7modl7fG0qE8VD1ulSH+WjuZsFTPJdNEAfCe0O50Vb5tNzw2w==", - "dev": true, - "dependencies": { - "@taquito/core": "^20.0.1", - "node-fetch": "^2.7.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/http-utils/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/@taquito/local-forging": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-20.0.1.tgz", - "integrity": "sha512-+XYHnoAYXpOYA4WbUvUO86F6uoUh1anaNQGD544ySaonJW1ZgwhylrGvvTVjQfFSqqP3TRWn69EqINco+hX7gA==", - "dev": true, - "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/utils": "^20.0.1", - "bignumber.js": "^9.1.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/michel-codec": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-20.0.1.tgz", - "integrity": "sha512-TB6fJS4ArW4p1mqR28cjKbYs4cbLz/wnf8bHI/4ubxpiPcARZkja7r4U89D+Lb6Kn1Er+USPIMdbRTkP011e0w==", - "dev": true, - "dependencies": { - "@taquito/core": "^20.0.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/michelson-encoder": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-20.0.1.tgz", - "integrity": "sha512-YfMLpxDL/Qd9AlIfjlCsXYiE07ReZRAqvj+mI/Q8sPsKpqrkjvhyieNUQDLVqMDRcWLBWUSIqccr7UVRlQ/+BQ==", - "dev": true, - "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/rpc": "^20.0.1", - "@taquito/utils": "^20.0.1", - "bignumber.js": "^9.1.2", - "fast-json-stable-stringify": "^2.1.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/rpc": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-20.0.1.tgz", - "integrity": "sha512-Ec6fXoehjLpfILpVAHZ1NJz6cAaguEFs9McK2Ct4RRKmVhModgrVPAGXn17rb7fLXwOLP3MCzqSgFPToY7ZIFA==", - "dev": true, - "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/http-utils": "^20.0.1", - "@taquito/utils": "^20.0.1", - "bignumber.js": "^9.1.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/signer": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/signer/-/signer-20.0.1.tgz", - "integrity": "sha512-/ROKpEINTnjewctMAKsYrcR7smi96Gvl4TxvjNqVt8Ee5Layh1zDzVWlCe/gWOD/eIzR1kIFfVUS59I7Q//paQ==", - "dev": true, - "dependencies": { - "@stablelib/blake2b": "^1.0.1", - "@stablelib/ed25519": "^1.0.3", - "@stablelib/hmac": "^1.0.1", - "@stablelib/nacl": "^1.0.4", - "@stablelib/pbkdf2": "^1.0.1", - "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", - "@types/bn.js": "^5.1.2", - "bip39": "3.1.0", - "elliptic": "^6.5.4", - "pbkdf2": "^3.1.2", - "typedarray-to-buffer": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/taquito": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-20.0.1.tgz", - "integrity": "sha512-BcRNWcUGOWfthFPgPf12U1ZIf1xSyy1ZS4xU5TciuxI395LnKTz6I3WfmMggsZzWxqEgi/Lj8GXjji7DCtaZRg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/http-utils": "^20.0.1", - "@taquito/local-forging": "^20.0.1", - "@taquito/michel-codec": "^20.0.1", - "@taquito/michelson-encoder": "^20.0.1", - "@taquito/rpc": "^20.0.1", - "@taquito/utils": "^20.0.1", - "bignumber.js": "^9.1.2", - "rxjs": "^7.8.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@taquito/utils": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-20.0.1.tgz", - "integrity": "sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w==", - "dev": true, - "dependencies": { - "@stablelib/blake2b": "^1.0.1", - "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.1", - "@types/bs58check": "^2.1.0", - "bignumber.js": "^9.1.2", - "blakejs": "^1.2.1", - "bs58check": "^3.0.1", - "buffer": "^6.0.3", - "elliptic": "^6.5.4", - "typedarray-to-buffer": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@types/bn.js": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", - "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-xpXaQlOIY1KoXlA/ytHGHpEIU87PJt+g9SH7nC6HdCgaBwT2IEZIwBMHbjuX6BpnfbiUMlmwqurdLDwXpcdmSA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "22.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz", - "integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "dev": true, - "dependencies": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/async-retry": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", - "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", - "dev": true, - "dependencies": { - "retry": "0.13.1" - } - }, - "node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/batching-toposort": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/batching-toposort/-/batching-toposort-1.2.0.tgz", - "integrity": "sha512-HDf0OOv00dqYGm+M5tJ121RTzX0sK9fxzBMKXYsuQrY0pKSOJjc5qa0DUtzvCGkgIVf1YON2G1e/MHEdHXVaRQ==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/bip39": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", - "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", - "dev": true, - "dependencies": { - "@noble/hashes": "^1.2.0" - } - }, - "node_modules/blakejs": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", - "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", - "dev": true - }, - "node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dev": true, - "dependencies": { - "base-x": "^4.0.0" - } - }, - "node_modules/bs58check": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", - "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", - "dev": true, - "dependencies": { - "@noble/hashes": "^1.2.0", - "bs58": "^5.0.0" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/elliptic": { - "version": "6.5.7", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", - "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/error-stack-parser": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", - "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", - "dev": true, - "dependencies": { - "stackframe": "^1.3.4" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fluture": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/fluture/-/fluture-14.0.0.tgz", - "integrity": "sha512-pENtLF948a8DfduVKugT8edTAbFi4rBS94xjHwzLanQqIu5PYtLGl+xqs6H8TaIRL7z/B0cDpswdINzH/HRUGA==", - "dev": true, - "dependencies": { - "sanctuary-show": "^2.0.0", - "sanctuary-type-identifiers": "^3.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dev": true, - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/i18next": { - "version": "23.14.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.14.0.tgz", - "integrity": "sha512-Y5GL4OdA8IU2geRrt2+Uc1iIhsjICdHZzT9tNwQ3TVqdNzgxHToGCKf/TPRP80vTCAP6svg2WbbJL+Gx5MFQVA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://locize.com" - }, - { - "type": "individual", - "url": "https://locize.com/i18next.html" - }, - { - "type": "individual", - "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" - } - ], - "dependencies": { - "@babel/runtime": "^7.23.2" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dev": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/portfinder": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", - "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", - "dev": true, - "dependencies": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", - "dev": true, - "dependencies": { - "tslib": "^2.6.1" - } - }, - "node_modules/pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/rambda": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-9.2.1.tgz", - "integrity": "sha512-6Dp+QQVQuAuhwBlbIvL2FjJVHCKF29W+n9ca/BMTVDqpj+Q7KKqUh7UAINEna8aaB2/oRvPuL5hViCTQARa70Q==", - "dev": true - }, - "node_modules/rambdax": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/rambdax/-/rambdax-11.1.1.tgz", - "integrity": "sha512-q6DRSOMRwg/yEWUvempmAxKSXeo4+qPmwVhQOxozW2W43rJ/yFF8F8lG7FTSpmBlH0CkFMqld1tuCcxbmpmwQw==", - "dev": true - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/sanctuary-show": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sanctuary-show/-/sanctuary-show-2.0.0.tgz", - "integrity": "sha512-REj4ZiioUXnDLj6EpJ9HcYDIEGaEexmB9Fg5o6InZR9f0x5PfnnC21QeU9SZ9E7G8zXSZPNjy8VRUK4safbesw==", - "dev": true - }, - "node_modules/sanctuary-type-identifiers": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sanctuary-type-identifiers/-/sanctuary-type-identifiers-3.0.0.tgz", - "integrity": "sha512-YFXYcG0Ura1dSPd/1xLYtE2XAWUEsBHhMTZvYBOvwT8MeFQwdUOCMm2DC+r94z6H93FVq0qxDac8/D7QpJj6Mg==", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stack-generator": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz", - "integrity": "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==", - "dev": true, - "dependencies": { - "stackframe": "^1.3.4" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "node_modules/stackframe": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", - "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==", - "dev": true - }, - "node_modules/stacktrace-gps": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz", - "integrity": "sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==", - "dev": true, - "dependencies": { - "source-map": "0.5.6", - "stackframe": "^1.3.4" - } - }, - "node_modules/stacktrace-js": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz", - "integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==", - "dev": true, - "dependencies": { - "error-stack-parser": "^2.0.6", - "stack-generator": "^2.0.5", - "stacktrace-gps": "^3.0.4" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/ts-pattern": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.3.1.tgz", - "integrity": "sha512-1RUMKa8jYQdNfmnK4jyzBK3/PS/tnjcZ1CW0v1vWDeYe5RBklc/nquw03MEoB66hVBm4BnlCfmOqDVxHyT1DpA==", - "dev": true - }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true - }, - "node_modules/typedarray-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz", - "integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/webcrypto-core": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", - "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", - "dev": true, - "dependencies": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wtfnode": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/wtfnode/-/wtfnode-0.9.3.tgz", - "integrity": "sha512-MXjgxJovNVYUkD85JBZTKT5S5ng/e56sNuRZlid7HcGTNrIODa5UPtqE3i0daj7fJ2SGj5Um2VmiphQVyVKK5A==", - "dev": true, - "bin": { - "wtfnode": "proxy.js" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - } -} diff --git a/apps/smart-contracts/asset-registry/package.json b/apps/smart-contracts/asset-registry/package.json deleted file mode 100644 index a52ce9be..00000000 --- a/apps/smart-contracts/asset-registry/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "asset-registry", - "version": "1.0.0", - "description": "", - "main": "index.js", - "keywords": [], - "author": "", - "license": "ISC", - "devDependencies": { - "@taqueria/plugin-core": "^0.56.0", - "@taqueria/plugin-flextesa": "^0.56.0", - "@taqueria/plugin-ligo": "^0.56.0", - "@taqueria/plugin-taquito": "^0.56.0", - "@taqueria/plugin-tzcompose": "^0.56.0" - } -} diff --git a/apps/smart-contracts/asset-registry/project.json b/apps/smart-contracts/asset-registry/project.json deleted file mode 100644 index cb1093db..00000000 --- a/apps/smart-contracts/asset-registry/project.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "asset-registry" -} diff --git a/apps/smart-contracts/asset-registry/readme.md b/apps/smart-contracts/asset-registry/readme.md deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/smart-contracts/asset-registry/tzcompose.yml b/apps/smart-contracts/asset-registry/tzcompose.yml deleted file mode 100644 index 11290d2c..00000000 --- a/apps/smart-contracts/asset-registry/tzcompose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: alpha - -pipelines: - deploy-contracts: - - task: deploy - alias: nft-contract - script: - code: - file: artifacts/main.json - storage: - file: artifacts/main.default_storage.json diff --git a/apps/smart-contracts/deploy/deploy.mjs b/apps/smart-contracts/deploy/deploy.mjs deleted file mode 100644 index 8657987a..00000000 --- a/apps/smart-contracts/deploy/deploy.mjs +++ /dev/null @@ -1,1432 +0,0 @@ -import { InMemorySigner, importKey } from '@taquito/signer' -import { MichelsonMap, TezosToolkit } from '@taquito/taquito' -import { stringToBytes } from '@taquito/utils' -import { default as config } from '../asset-registry/.taq/config.local.development.json' with { type: "json" } -import { default as configStaging } from '../asset-registry/.taq/config.local.testing.json' with { type: "json" } - - -let RPC = 'http://localhost:8732' -let privateKey = config.accounts.bob.secretKey.replace('unencrypted:', '') - -if (process.env.ENV === 'staging') { - RPC = 'https://ghostnet.ecadinfra.com' - privateKey = configStaging.accounts.taqOperatorAccount.privateKey -} - -if (process.env.ENV === 'production') { - RPC = 'https://mainnet.ecadinfra.com' -} - -const Tezos = new TezosToolkit(RPC) - -const contract = ` -{ parameter - (or (pair %mint - (string %from_uuid) - (address %to_) - (option %token_info (map string bytes))) - (or (list %approve - (pair (address %owner) - (address %spender) - (nat %token_id) - (nat %old_value) - (nat %new_value))) - (or (list %update_operators - (or (pair %addOperator (address %owner) (address %operator) (nat %token_id)) - (pair %removeOperator (address %owner) (address %operator) (nat %token_id)))) - (or (pair %balance_of - (list %requests (pair (address %owner) (nat %token_id))) - (contract %callback - (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) - (list %transfer - (pair (address %from_) (list %txs (pair (address %to_) (nat %amount) (nat %token_id))))))))) ; - storage - (pair (address %registry) - (big_map %metadata string bytes) - (big_map %ledger nat address) - (big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes))) - (nat %token_index) - (option %operators (big_map (pair address nat) (set address))) - (big_map %approvals (pair address address nat) nat)) ; - code { PUSH string "FA2_TOKEN_UNDEFINED" ; - PUSH string "FA2.1_INSUFFICIENT_ALLOWANCE" ; - PUSH string "NFT transaction amount should be 1n" ; - LAMBDA - (pair address address nat (big_map (pair address address nat) nat)) - nat - { UNPAIR 4 ; PAIR 3 ; GET ; IF_NONE { PUSH nat 0 } {} } ; - LAMBDA - (pair (big_map (pair address address nat) nat) address address nat nat) - (big_map (pair address address nat) nat) - { UNPAIR 5 ; DIG 4 ; SOME ; DIG 4 ; DIG 4 ; DIG 4 ; PAIR 3 ; UPDATE } ; - LAMBDA (pair (big_map nat address) nat) (option address) { UNPAIR ; SWAP ; GET } ; - LAMBDA - (pair (big_map nat address) address nat) - (big_map nat address) - { UNPAIR 3 ; SWAP ; SOME ; DIG 2 ; UPDATE } ; - LAMBDA - (pair address nat (big_map (pair address nat) (set address))) - unit - { UNPAIR 3 ; - SENDER ; - DUP 2 ; - DUP 2 ; - COMPARE ; - EQ ; - IF { DROP 4 } - { DUG 3 ; - PAIR ; - GET ; - IF_NONE { EMPTY_SET address } {} ; - SWAP ; - MEM ; - IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } } ; - UNIT } ; - LAMBDA - address - unit - { PUSH string "The sender can only manage operators for their own token" ; - SENDER ; - DIG 2 ; - COMPARE ; - EQ ; - IF { DROP ; UNIT } { FAILWITH } } ; - LAMBDA - (pair nat (map string bytes) (big_map nat (pair nat (map string bytes)))) - (big_map nat (pair nat (map string bytes))) - { UNPAIR 3 ; DUG 2 ; DUP 3 ; PAIR ; SOME ; DIG 2 ; UPDATE } ; - PUSH string "Minting not allowed" ; - LAMBDA - (pair (pair (lambda (pair (big_map nat address) address nat) (big_map nat address)) - (lambda (pair (big_map nat address) nat) (option address)) - string) - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat))) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - LAMBDA - (pair (lambda (pair (big_map nat address) nat) (option address)) - (pair (big_map nat address) nat)) - (option nat) - { UNPAIR ; - SWAP ; - EXEC ; - IF_NONE { NONE nat } { DROP ; PUSH nat 1 ; SOME } } ; - DUP 4 ; - APPLY ; - LAMBDA - (pair (lambda (pair (big_map nat address) nat) (option address)) - (pair (big_map nat address) address nat)) - nat - { UNPAIR ; - SWAP ; - UNPAIR 3 ; - DIG 2 ; - SWAP ; - PAIR ; - DIG 2 ; - SWAP ; - EXEC ; - IF_NONE - { DROP ; PUSH nat 0 } - { COMPARE ; EQ ; IF { PUSH nat 1 } { PUSH nat 0 } } } ; - DUP 5 ; - APPLY ; - LAMBDA - (pair (pair (lambda (pair (big_map nat address) address nat) (big_map nat address)) - (lambda (pair (big_map nat address) nat) (option address)) - string) - (pair (big_map nat address) address nat nat)) - (big_map nat address) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - UNPAIR 4 ; - DUP 3 ; - DUP 2 ; - PAIR ; - DIG 6 ; - SWAP ; - EXEC ; - DROP ; - PUSH nat 1 ; - DIG 4 ; - COMPARE ; - EQ ; - IF { DIG 4 ; DROP } { DIG 4 ; FAILWITH } ; - PAIR 3 ; - EXEC } ; - DUP 7 ; - DUP 7 ; - DUP 7 ; - PAIR 3 ; - APPLY ; - LAMBDA - (pair (pair (lambda (pair (big_map nat address) address nat) (big_map nat address)) - (lambda (pair (big_map nat address) nat) (option address)) - string) - (pair (big_map nat address) address nat nat)) - (big_map nat address) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - UNPAIR 4 ; - DUP 3 ; - DUP 2 ; - PAIR ; - DIG 6 ; - SWAP ; - EXEC ; - DROP ; - PUSH nat 1 ; - DIG 4 ; - COMPARE ; - EQ ; - IF { DIG 4 ; DROP ; DUP 2 ; DROP } { DIG 4 ; FAILWITH } ; - PAIR 3 ; - EXEC } ; - DUP 8 ; - DUP 8 ; - DUP 8 ; - PAIR 3 ; - APPLY ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DROP 3 ; - EMPTY_BIG_MAP nat address ; - DIG 5 ; - GET 5 ; - PAIR 6 } ; - DUP 10 ; - DUP 8 ; - DUP 8 ; - PAIR 3 ; - APPLY ; - DIG 5 ; - DIG 6 ; - DIG 9 ; - DROP 3 ; - LAMBDA - (pair (pair (lambda - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat)))) - string - (lambda - (pair nat (map string bytes) (big_map nat (pair nat (map string bytes)))) - (big_map nat (pair nat (map string bytes))))) - (pair (pair string address (option (map string bytes))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR 3 ; - DIG 3 ; - UNPAIR ; - DUP 2 ; - DIG 3 ; - SWAP ; - EXEC ; - DUG 2 ; - NIL operation ; - NIL operation ; - DUP 4 ; - CAR ; - DUP 4 ; - GET 3 ; - DUP 5 ; - CAR ; - PAIR ; - VIEW "get_entry" - (pair (pair %member - (address %did) - (or %status (unit %active) (unit %revoked)) - (string %issuer) - (string %uuid)) - (pair %user - (address %did) - (or %status (unit %active) (unit %revoked)) - (string %issuer) - (string %uuid))) ; - IF_NONE { DUP 6 ; FAILWITH } {} ; - DIG 6 ; - SWAP ; - CDR ; - CAR ; - SENDER ; - COMPARE ; - EQ ; - IF { DROP } { FAILWITH } ; - DUP 4 ; - GET 9 ; - DUP ; - DUP 7 ; - CAR ; - PAIR ; - DUP 7 ; - GET 10 ; - SWAP ; - EXEC ; - IF_NONE { PUSH nat 0 } {} ; - DUP ; - PUSH nat 0 ; - SWAP ; - COMPARE ; - EQ ; - IF {} { PUSH string "Token ID already exists" ; FAILWITH } ; - DUP 2 ; - DUP 6 ; - GET 3 ; - DUP 9 ; - CAR ; - PAIR 3 ; - DUP 8 ; - GET 9 ; - SWAP ; - EXEC ; - PUSH int 1 ; - DIG 2 ; - PUSH nat 1 ; - ADD ; - DUP 4 ; - PAIR 3 ; - PUSH int 1 ; - PUSH nat 1 ; - DIG 3 ; - ADD ; - DUP 4 ; - DUP 8 ; - GET 3 ; - PAIR 4 ; - EMIT %balance_update - (pair (address %owner) (nat %token_id) (nat %new_balance) (int %diff)) ; - SWAP ; - EMIT %total_supply_update - (pair (nat %token_id) (nat %new_total_supply) (int %diff)) ; - DUP 7 ; - GET 7 ; - DUP 4 ; - GET ; - IF_NONE { EMPTY_MAP string bytes } { CDR } ; - DUP 8 ; - GET 7 ; - DUP 2 ; - DUP 6 ; - PAIR 3 ; - DUP 11 ; - SWAP ; - EXEC ; - PUSH nat 0 ; - DUP 9 ; - GET 4 ; - IF_NONE { EMPTY_MAP string bytes } {} ; - SIZE ; - COMPARE ; - EQ ; - PUSH nat 0 ; - DIG 3 ; - SIZE ; - COMPARE ; - EQ ; - AND ; - IF { DUP 7 ; - GET 4 ; - IF_NONE { PUSH string "Token info must be provided" ; FAILWITH } { DROP } } - {} ; - PUSH nat 0 ; - DUP 8 ; - GET 4 ; - IF_NONE { EMPTY_MAP string bytes } {} ; - SIZE ; - COMPARE ; - GT ; - IF { DROP ; - DUP 7 ; - GET 7 ; - DUP 7 ; - GET 4 ; - IF_NONE { EMPTY_MAP string bytes } {} ; - DUP 5 ; - PAIR 3 ; - DIG 9 ; - SWAP ; - EXEC ; - DUP 7 ; - GET 4 ; - DUP 5 ; - PAIR ; - EMIT %token_metadata_update - (pair (nat %token_id) (option %new_metadata (map string bytes))) ; - NIL operation ; - DIG 7 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 5 } - { DIG 9 ; DROP } ; - PUSH nat 1 ; - DIG 4 ; - DIG 7 ; - GET 3 ; - DUP 10 ; - CAR ; - PAIR 4 ; - DUP 8 ; - GET 5 ; - SWAP ; - EXEC ; - NIL operation ; - DIG 6 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - DIG 3 ; - CONS ; - DUG 4 ; - NIL operation ; - DIG 5 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - DIG 3 ; - CONS ; - ITER { NIL operation ; - DIG 4 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 2 } ; - DIG 4 ; - SWAP ; - UPDATE 1 ; - CAR ; - SWAP ; - DUP 4 ; - PUSH nat 1 ; - DIG 5 ; - GET 9 ; - ADD ; - UPDATE 9 ; - SWAP ; - UPDATE 7 ; - SWAP ; - UPDATE 5 ; - SWAP ; - PAIR } ; - DUP 4 ; - DUP 4 ; - DUP 4 ; - PAIR 3 ; - APPLY ; - DIG 2 ; - DIG 3 ; - DROP 2 ; - LAMBDA - (pair (pair (lambda - (pair (big_map (pair address address nat) nat) address address nat nat) - (big_map (pair address address nat) nat)) - (lambda (pair address address nat (big_map (pair address address nat) nat)) nat)) - (pair (list (pair address address nat nat nat)) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR ; - DIG 2 ; - UNPAIR ; - EMPTY_MAP (pair address address nat) (pair nat int) ; - DUP 3 ; - GET 12 ; - NIL operation ; - DIG 3 ; - ITER { DIG 2 ; - DUP 2 ; - UNPAIR 5 ; - DUP 6 ; - DUP 4 ; - DUP 4 ; - DUP 4 ; - PAIR 4 ; - DUP 13 ; - SWAP ; - EXEC ; - DIG 4 ; - SWAP ; - COMPARE ; - EQ ; - IF {} { PUSH string "FA2.1_UNSAFE_APPROVAL_CHANGE" ; FAILWITH } ; - PUSH string "FA2_NOT_OWNER" ; - SENDER ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP } { FAILWITH } ; - DIG 4 ; - PAIR 5 ; - DUP 6 ; - SWAP ; - EXEC ; - DUG 2 ; - DUP ; - GET 5 ; - DUP 2 ; - GET 3 ; - DUP 3 ; - CAR ; - PAIR 3 ; - DUP 5 ; - DUP 2 ; - GET ; - IF_NONE - { DUP 2 ; GET 7 ; DUP 3 ; GET 8 ; SUB } - { DUP 3 ; GET 7 ; DUP 4 ; GET 8 ; SUB ; SWAP ; CDR ; ADD } ; - DIG 5 ; - SWAP ; - DIG 3 ; - GET 8 ; - PAIR ; - SOME ; - DIG 2 ; - UPDATE ; - DUG 2 } ; - DIG 4 ; - DIG 5 ; - DROP 2 ; - NIL operation ; - DIG 3 ; - LAMBDA - (pair (list operation) (pair address address nat) nat int) - (list operation) - { UNPAIR ; - SWAP ; - UNPAIR ; - PUSH int 0 ; - DUP 3 ; - CDR ; - COMPARE ; - NEQ ; - IF { DUP 2 ; - CDR ; - DIG 2 ; - CAR ; - DUP 3 ; - GET 4 ; - DUP 4 ; - GET 3 ; - DIG 4 ; - CAR ; - PAIR 5 ; - EMIT %allowance_update - (pair (address %owner) - (address %spender) - (nat %token_id) - (nat %new_allowance) - (int %diff)) ; - NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } - { DROP 2 } } ; - DUG 2 ; - ITER { SWAP ; PAIR ; DUP 2 ; SWAP ; EXEC } ; - SWAP ; - DROP ; - ITER { NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } ; - SWAP ; - DIG 2 ; - SWAP ; - UPDATE 12 ; - SWAP ; - PAIR } ; - DUP 7 ; - DUP 7 ; - PAIR ; - APPLY ; - LAMBDA - (pair (lambda address unit) - (pair (list (or (pair address address nat) (pair address address nat))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - SWAP ; - UNPAIR ; - SENDER ; - DUP 3 ; - GET 11 ; - IF_NONE - { DROP 4 ; - PUSH string "The storage does not support operators management" ; - FAILWITH } - { NIL (pair address address nat bool) ; - PAIR ; - DIG 2 ; - ITER { SWAP ; - UNPAIR ; - DIG 2 ; - IF_LEFT - { UNPAIR 3 ; - DUP 2 ; - DUP 2 ; - COMPARE ; - EQ ; - IF { DIG 4 } - { DUP ; - DUP 9 ; - SWAP ; - EXEC ; - DROP ; - DUP 5 ; - DUP 4 ; - DUP 3 ; - PAIR ; - GET ; - IF_NONE { EMPTY_SET address } {} ; - DUP 3 ; - SWAP ; - PUSH bool True ; - DIG 2 ; - UPDATE ; - DIG 5 ; - SWAP ; - SOME ; - DUP 5 ; - DUP 4 ; - PAIR ; - UPDATE } ; - NIL (pair address address nat bool) ; - DIG 5 ; - NIL (pair address address nat bool) ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - PUSH bool True } - { UNPAIR 3 ; - DUP 2 ; - DUP 2 ; - COMPARE ; - EQ ; - IF { DIG 4 } - { DUP ; - DUP 9 ; - SWAP ; - EXEC ; - DROP ; - DUP 5 ; - DUP 4 ; - DUP 3 ; - PAIR ; - GET ; - IF_NONE { EMPTY_SET address } {} ; - DUP 3 ; - SWAP ; - PUSH bool False ; - DIG 2 ; - UPDATE ; - PUSH nat 0 ; - DUP 2 ; - SIZE ; - COMPARE ; - EQ ; - IF { DROP ; DIG 4 ; NONE (set address) ; DUP 5 ; DUP 4 ; PAIR ; UPDATE } - { DIG 5 ; SWAP ; SOME ; DUP 5 ; DUP 4 ; PAIR ; UPDATE } } ; - NIL (pair address address nat bool) ; - DIG 5 ; - NIL (pair address address nat bool) ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - PUSH bool True } ; - DIG 5 ; - DIG 5 ; - DIG 5 ; - PAIR 4 ; - CONS ; - PAIR } ; - DIG 3 ; - DROP ; - UNPAIR ; - DIG 3 ; - DIG 2 ; - SOME ; - UPDATE 11 ; - NIL operation ; - DIG 3 ; - DIG 3 ; - PAIR ; - EMIT %operator_update - (pair (list %newUpdates - (pair (address %owner) (address %operator) (nat %token_id) (bool %is_operator))) - (address %sender)) ; - CONS ; - PAIR } } ; - DUP 5 ; - APPLY ; - DIG 4 ; - DROP ; - LAMBDA - (pair (pair (lambda - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat)))) - string) - (pair (pair (list (pair address nat)) (contract (list (pair (pair address nat) nat)))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR ; - DIG 2 ; - UNPAIR ; - DUP 2 ; - DIG 3 ; - SWAP ; - EXEC ; - DUG 2 ; - UNPAIR ; - DUP 3 ; - NIL operation ; - DIG 3 ; - PUSH mutez 0 ; - DIG 4 ; - MAP { DUP ; - UNPAIR ; - DUP 8 ; - GET 7 ; - DUP 3 ; - MEM ; - NOT ; - IF { DUP 10 ; FAILWITH } {} ; - DUP 9 ; - CAR ; - PAIR 3 ; - DUP 8 ; - GET 9 ; - SWAP ; - EXEC ; - SWAP ; - PAIR } ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DROP 3 ; - TRANSFER_TOKENS ; - CONS ; - PAIR } ; - DUP 10 ; - DUP 6 ; - PAIR ; - APPLY ; - LAMBDA - (pair (pair (lambda - (pair address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - (pair (big_map nat address) - (big_map nat address) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat nat) (big_map nat address)) - (lambda (pair (big_map nat address) address nat) nat) - (lambda (pair (big_map nat address) nat) (option nat)))) - (lambda (pair address nat (big_map (pair address nat) (set address))) unit) - (lambda - (pair (big_map (pair address address nat) nat) address address nat nat) - (big_map (pair address address nat) nat)) - (lambda (pair address address nat (big_map (pair address address nat) nat)) nat) - string - string) - (pair (list (pair address (list (pair address nat nat)))) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat))) - (pair (list operation) - address - (big_map string bytes) - (big_map nat address) - (big_map nat (pair nat (map string bytes))) - nat - (option (big_map (pair address nat) (set address))) - (big_map (pair address address nat) nat)) - { UNPAIR ; - UNPAIR 6 ; - DIG 6 ; - UNPAIR ; - DUP 2 ; - DIG 3 ; - SWAP ; - EXEC ; - DUG 2 ; - NIL operation ; - EMPTY_MAP (pair address address nat) (pair nat int) ; - EMPTY_MAP (pair address nat) (pair nat int) ; - NIL operation ; - DUP 6 ; - GET 12 ; - DIG 7 ; - PAIR 5 ; - DIG 2 ; - ITER { SWAP ; - UNPAIR 5 ; - DIG 5 ; - UNPAIR ; - DIG 6 ; - DIG 6 ; - DIG 6 ; - DIG 6 ; - DIG 6 ; - PAIR 5 ; - DIG 2 ; - ITER { SWAP ; - UNPAIR 5 ; - DIG 2 ; - DIG 3 ; - DIG 4 ; - DIG 5 ; - UNPAIR 3 ; - DUP 11 ; - GET 7 ; - DUP 4 ; - MEM ; - NOT ; - IF { DUP 16 ; FAILWITH } {} ; - DUP 8 ; - DUP 4 ; - SENDER ; - DUP 12 ; - PAIR 4 ; - DUP 15 ; - SWAP ; - EXEC ; - SENDER ; - DUP 11 ; - COMPARE ; - EQ ; - IF { DIG 8 } - { DUP 9 ; - DUP 5 ; - SENDER ; - DUP 13 ; - PAIR 4 ; - DUP 16 ; - SWAP ; - EXEC ; - PUSH nat 0 ; - DUP 2 ; - COMPARE ; - GT ; - IF { DUP 4 ; - SWAP ; - COMPARE ; - GE ; - IF { DUP 3 ; - DUP 5 ; - SENDER ; - DUP 13 ; - DIG 12 ; - DUP ; - DUP 5 ; - DUP 5 ; - DUP 5 ; - PAIR 4 ; - DUP 20 ; - SWAP ; - EXEC ; - PUSH string "FA2_INSUFFICIENT_BALANCE" ; - DUP 7 ; - DUP 3 ; - COMPARE ; - GE ; - IF { DROP } { FAILWITH } ; - DIG 5 ; - SWAP ; - SUB ; - ABS ; - DUG 4 ; - PAIR 5 ; - DUP 14 ; - SWAP ; - EXEC } - { DUP 12 ; - GET 11 ; - IF_NONE - { DIG 8 ; DROP ; DUP 15 ; FAILWITH } - { DUP 5 ; DUP 12 ; PAIR 3 ; DUP 14 ; SWAP ; EXEC ; DROP ; DIG 8 } } } - { DROP ; - DUP 12 ; - GET 11 ; - IF_NONE - { DIG 8 ; DROP ; DUP 15 ; FAILWITH } - { DUP 5 ; DUP 12 ; PAIR 3 ; DUP 14 ; SWAP ; EXEC ; DROP ; DIG 8 } } } ; - DUP ; - DUP 6 ; - SENDER ; - DUP 13 ; - PAIR 4 ; - DUP 16 ; - SWAP ; - EXEC ; - DUP 6 ; - DUP 12 ; - DUP 12 ; - CAR ; - PAIR 3 ; - DUP 11 ; - GET 9 ; - SWAP ; - EXEC ; - DUP 7 ; - DUP 6 ; - DUP 13 ; - CAR ; - PAIR 3 ; - DUP 12 ; - GET 9 ; - SWAP ; - EXEC ; - DUP 8 ; - DUP 14 ; - PAIR ; - DUP 9 ; - DUP 8 ; - PAIR ; - DUP 10 ; - SENDER ; - DUP 17 ; - PAIR 3 ; - DUP 13 ; - DUP 4 ; - PAIR ; - DUP 14 ; - DUP 4 ; - PAIR ; - DUP 14 ; - DUP 4 ; - PAIR ; - DUP 13 ; - DIG 8 ; - SUB ; - ABS ; - DUP 13 ; - DIG 8 ; - ADD ; - DIG 4 ; - UNPAIR ; - GET ; - IF_NONE - { DUP 12 ; - NEG ; - DUG 7 ; - DIG 15 ; - DIG 8 ; - DIG 3 ; - PAIR ; - DIG 7 ; - DUG 2 ; - SOME ; - DIG 2 ; - UPDATE } - { DUP 13 ; - SWAP ; - CDR ; - SUB ; - DUG 7 ; - DIG 15 ; - DIG 8 ; - DIG 3 ; - PAIR ; - SOME ; - DIG 7 ; - UPDATE } ; - DUG 12 ; - DIG 2 ; - UNPAIR ; - GET ; - IF_NONE - { DUP 9 ; - INT ; - DUG 4 ; - DIG 12 ; - DIG 5 ; - DIG 2 ; - PAIR ; - DIG 4 ; - DUG 2 ; - SOME ; - DIG 2 ; - UPDATE } - { DUP 10 ; - SWAP ; - CDR ; - ADD ; - DUG 4 ; - DIG 12 ; - DIG 5 ; - DIG 2 ; - PAIR ; - SOME ; - DIG 4 ; - UPDATE } ; - DUG 9 ; - DUP 3 ; - DUP 6 ; - COMPARE ; - NEQ ; - IF { UNPAIR ; - GET ; - IF_NONE - { DIG 3 ; - DUP 3 ; - SUB ; - SWAP ; - DIG 7 ; - DIG 2 ; - DIG 3 ; - PAIR ; - SOME ; - DIG 2 ; - UPDATE } - { DIG 4 ; - DUP 4 ; - SUB ; - SWAP ; - CDR ; - ADD ; - SWAP ; - DIG 7 ; - DIG 2 ; - DIG 3 ; - PAIR ; - SOME ; - DIG 2 ; - UPDATE } ; - DUG 4 } - { SWAP ; DIG 2 ; DIG 4 ; DROP 4 } ; - DUP 3 ; - DUP 5 ; - DUP 4 ; - DUP 12 ; - PAIR 4 ; - EMIT %transfer_event - (pair (address %from_) (address %to_) (nat %token_id) (nat %amount)) ; - NIL operation ; - DIG 8 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 6 ; - DUP 3 ; - DUP 5 ; - DUP 11 ; - DUP 11 ; - CAR ; - PAIR 4 ; - DUP 9 ; - GET 7 ; - SWAP ; - EXEC ; - DIG 8 ; - SWAP ; - UPDATE 1 ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DIG 4 ; - DIG 6 ; - DIG 7 ; - DIG 7 ; - DUP 8 ; - CAR ; - PAIR 4 ; - DUP 6 ; - GET 5 ; - SWAP ; - EXEC ; - DIG 5 ; - SWAP ; - UPDATE 1 ; - PAIR 5 } ; - SWAP ; - DROP } ; - DIG 3 ; - DIG 4 ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DROP 5 ; - UNPAIR 5 ; - DIG 6 ; - DIG 2 ; - UPDATE 12 ; - SWAP ; - CAR ; - UPDATE 5 ; - NIL operation ; - DIG 3 ; - ITER { UNPAIR ; - PUSH int 0 ; - DUP 3 ; - CDR ; - COMPARE ; - NEQ ; - IF { DUP 2 ; - CDR ; - DIG 2 ; - CAR ; - DUP 3 ; - CDR ; - DIG 3 ; - CAR ; - PAIR 4 ; - EMIT %balance_update - (pair (address %owner) (nat %token_id) (nat %new_balance) (int %diff)) ; - NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } - { DROP 2 } } ; - NIL operation ; - DIG 4 ; - ITER { UNPAIR ; - PUSH int 0 ; - DUP 3 ; - CDR ; - COMPARE ; - NEQ ; - IF { DUP 2 ; - CDR ; - DIG 2 ; - CAR ; - DUP 3 ; - GET 4 ; - DUP 4 ; - GET 3 ; - DIG 4 ; - CAR ; - PAIR 5 ; - EMIT %allowance_update - (pair (address %owner) - (address %spender) - (nat %token_id) - (nat %new_allowance) - (int %diff)) ; - NIL operation ; - DIG 2 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS } - { DROP 2 } } ; - DIG 3 ; - ITER { NIL operation ; - DIG 5 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - CONS ; - DUG 3 } ; - NIL operation ; - DIG 4 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - DUG 2 ; - NIL operation ; - DIG 3 ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - SWAP ; - NIL operation ; - SWAP ; - ITER { CONS } ; - ITER { CONS } ; - PAIR } ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - DUP 11 ; - PAIR 6 ; - APPLY ; - DIG 5 ; - DIG 6 ; - DIG 7 ; - DIG 8 ; - DIG 9 ; - DIG 10 ; - DROP 6 ; - PAIR 5 ; - SWAP ; - UNPAIR ; - IF_LEFT - { PAIR ; SWAP ; GET 8 ; SWAP ; EXEC } - { IF_LEFT - { PAIR ; SWAP ; GET 7 ; SWAP ; EXEC } - { IF_LEFT - { PAIR ; SWAP ; GET 5 ; SWAP ; EXEC } - { IF_LEFT - { PAIR ; SWAP ; GET 3 ; SWAP ; EXEC } - { PAIR ; SWAP ; CAR ; SWAP ; EXEC } } } } } ; - view "get_balance" - (pair (address %owner) (nat %token_id)) - nat - { UNPAIR ; - SWAP ; - GET 5 ; - DUP 2 ; - CDR ; - GET ; - IF_NONE - { DROP ; PUSH nat 0 } - { SWAP ; - CAR ; - SWAP ; - COMPARE ; - EQ ; - IF { PUSH nat 1 } { PUSH nat 0 } } } ; - view "get_total_supply" - nat - nat - { UNPAIR ; - SWAP ; - GET 5 ; - SWAP ; - GET ; - IF_NONE { NONE nat } { DROP ; PUSH nat 1 ; SOME } ; - IF_NONE { PUSH nat 0 } {} } ; - view "is_operator" - (pair (address %owner) (address %operator) (nat %token_id)) - bool - { UNPAIR ; - SWAP ; - GET 11 ; - IF_NONE - { DROP ; PUSH bool False } - { DUP 2 ; - GET 4 ; - DUP 3 ; - CAR ; - PAIR ; - GET ; - IF_NONE { DROP ; PUSH bool False } { SWAP ; GET 3 ; MEM } } } ; - view "get_allowance" - (pair (address %owner) (address %spender) (nat %token_id)) - nat - { UNPAIR ; SWAP ; GET 12 ; SWAP ; GET ; IF_NONE { PUSH nat 0 } {} } ; - view "get_token_metadata" - nat - (map string bytes) - { UNPAIR ; - SWAP ; - GET 7 ; - SWAP ; - GET ; - IF_NONE { EMPTY_MAP string bytes } { CDR } } ; - view "is_token" - nat - bool - { UNPAIR ; - SWAP ; - GET 5 ; - SWAP ; - GET ; - IF_NONE { NONE nat } { DROP ; PUSH nat 1 ; SOME } ; - IF_NONE { PUSH bool False } { DROP ; PUSH bool True } } } -` -const metadata = new MichelsonMap() -metadata.set('', stringToBytes('tezos-storage:content')) -metadata.set( - 'content', - stringToBytes( - JSON.stringify({ - version: 'v1.0', - name: 'Test NFT Contract', - authors: [], - homepage: 'https://', - interfaces: ['TZIP-012', 'TZIP-016'], - license: { - name: 'MIT', - }, - views: ['get_balance'], - }), - ), -) - -const deploy = async () => { - await importKey(Tezos, privateKey) - return Tezos.contract - .originate({ - code: contract, - storage: { - registry: 'KT1PaDvx6vApsvZchR7m3LCRQLJ1cR6C778y', - token_index: 0n, - metadata, - ledger: [], - token_metadata: [], - operators: [], - approvals: [], - }, - }) - .then(originationOp => { - console.log(`Waiting for confirmation of origination for ${originationOp.contractAddress}...`) - return originationOp.contract() - }) - .then(contract => { - console.log(contract) - console.log(`Origination completed.`) - }) - .catch(error => console.log(`Error: ${JSON.stringify(error, null, 2)}`)) -} - -deploy() - -const mint = async () => { - await importKey(Tezos, privateKey); - const contract = await Tezos.contract.at('KT1UczDBLUq4ZE6qewCeWWGvs4VkuUF5LQvL') - - const token_info_map = new MichelsonMap(); - token_info_map.set("", stringToBytes('ipfs://')) - - const operation = await contract.methodsObject.mint({ - from_uuid: 'urn:uuid:', - to_: 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', - token_id: 10, - amount: 1, - token_info: token_info_map - }).send() - await operation.confirmation() - console.log('Operation hash:', operation.hash) -} - -// mint() - -// const signer = new InMemorySigner("REPLACE WITH LOCAL SANDBOX KEY"); -// const bytes = "0xc0050707070707070a0000001601b752c7f3de31759bce246416a6823e86b9756c6c00000107070a0000000e5550444154454420504f4c4943590a00000016011d4eb86a702a4c4342943b4b1d9ef41ca299b641000707000000848b95ca0c"; -// const signature = signer.sign(bytes).then(console.log); diff --git a/apps/smart-contracts/jest.config.ts b/apps/smart-contracts/jest.config.ts deleted file mode 100644 index 428b8fc7..00000000 --- a/apps/smart-contracts/jest.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'smart-contracts', - preset: '../../jest.preset.js', - testEnvironment: 'node', - transform: { - '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], - }, - moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/apps/smart-contracts', -} diff --git a/apps/smart-contracts/ligo.json b/apps/smart-contracts/ligo.json deleted file mode 100644 index 18a1e415..00000000 --- a/apps/smart-contracts/ligo.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dependencies": {} -} diff --git a/apps/smart-contracts/package.json b/apps/smart-contracts/package.json deleted file mode 100644 index 9c97fabe..00000000 --- a/apps/smart-contracts/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "smart-contracts", - "version": "0.0.1", - "license": "Apache-2.0", - "private": true -} diff --git a/apps/smart-contracts/project.json b/apps/smart-contracts/project.json deleted file mode 100644 index 476c33e7..00000000 --- a/apps/smart-contracts/project.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "name": "smart-contracts", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "apps/smart-contracts/src", - "projectType": "application", - "tags": [], - "targets": { - "assetRegistry:tezos:start": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["TAQ_FLEXTESA_IMAGE=\"oxheadalpha/flextesa:20230915\" taq start sandbox assetRegistry"], - "parallel": false - } - }, - "assetRegistry:tezos:stop": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq stop sandbox assetRegistry"], - "parallel": false - } - }, - "assetRegistry:tezos:listAccounts": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq list accounts assetRegistry"], - "parallel": false - } - }, - "assetRegistry:contract:originate": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq originate IncDec.tz"], - "parallel": false - } - }, - "assetRegistry:contract:mint:sandbox": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": [ - "taq transfer Main/Main --entrypoint mint --param main.parameter.mint_parameter.tz --env development" - ], - "parallel": false - } - }, - "assetRegistry:contract:mint:ghostnet": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq transfer Main/Main --entrypoint mint --param main.parameter.mint_parameter.tz --env testing"], - "parallel": false - } - }, - "assetRegistry:contract:transfer:sandbox": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": [ - "taq transfer Main --entrypoint transfer --param main.parameter.transfer_parameter.tz --env development" - ], - "parallel": false - } - }, - "assetRegistry:contract:transfer:ghostnet": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": [ - "taq transfer Main --entrypoint transfer --param main.parameter.transfer_parameter.tz --env testing" - ], - "parallel": false - } - }, - "assetRegistry:contract:update_operators:sandbox": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": [ - "taq transfer Main --entrypoint update_operators --param main.parameter.update_operators_parameter.tz --env development" - ], - "parallel": false - } - }, - "assetRegistry:contract:update_operators:ghostnet": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": [ - "taq transfer Main --entrypoint update_operators --param main.parameter.update_operators_parameter.tz --env testing" - ], - "parallel": false - } - }, - "assetRegistry:contract:originate:ghostnet": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq originate IncDec.tz --env development"], - "parallel": false - } - }, - "assetRegistry:contract:compile:json": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq compile Main.jsligo --json"], - "parallel": false - } - }, - "assetRegistry:contract:compile": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts/asset-registry", - "commands": ["taq compile Main.jsligo"], - "parallel": false - } - }, - "assetRegistry:contract:originate:sandbox": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts", - "commands": ["ENV=sandbox node ./deploy/deploy.mjs"], - "parallel": false - } - }, - "assetRegistry:contract:originate:staging": { - "executor": "nx:run-commands", - "options": { - "cwd": "apps/smart-contracts", - "commands": ["ENV=staging node ./deploy/deploy.mjs"], - "parallel": false - } - } - } -} diff --git a/apps/smart-contracts/tsconfig.app.json b/apps/smart-contracts/tsconfig.app.json deleted file mode 100644 index f5e2e085..00000000 --- a/apps/smart-contracts/tsconfig.app.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["node"] - }, - "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], - "include": ["src/**/*.ts"] -} diff --git a/apps/smart-contracts/tsconfig.json b/apps/smart-contracts/tsconfig.json deleted file mode 100644 index 3b72f2b9..00000000 --- a/apps/smart-contracts/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "files": [], - "include": [], - "compilerOptions": { - "esModuleInterop": true - } -} diff --git a/apps/smart-contracts/tsconfig.spec.json b/apps/smart-contracts/tsconfig.spec.json deleted file mode 100644 index f6d8ffcc..00000000 --- a/apps/smart-contracts/tsconfig.spec.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] -}