Skip to content

Commit

Permalink
sync with docs.tezos.com
Browse files Browse the repository at this point in the history
  • Loading branch information
zamrokk committed Nov 8, 2023
1 parent 4d8728c commit 2e6889a
Show file tree
Hide file tree
Showing 12 changed files with 2,184 additions and 1,546 deletions.
2,779 changes: 1,390 additions & 1,389 deletions README.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion solution/.taq/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"testing": {
"type": "simple",
"label": "ghostnet",
"rpcUrl": "https://ghostnet.ecadinfra.com"
"rpcUrl": "https://ghostnet.tezos.marigold.dev"
},
"production": {
"type": "simple",
Expand All @@ -61,6 +61,10 @@
"type": "npm",
"name": "@taqueria/plugin-taquito"
},
{
"type": "npm",
"name": "@taqueria/plugin-octez-client"
},
{
"type": "npm",
"name": "@taqueria/plugin-contract-types"
Expand Down
131 changes: 126 additions & 5 deletions solution/.taq/state.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// WARNING: This file is autogenerated and should NOT be modified
{
"build": "dcdfa46",
"configHash": "0ba15639dfdc6101118723048dea6ea22f23fc2c217abc1fc2b30003cd67effb",
"build": "0b37e42",
"configHash": "546923f2c7515a39aa0ef0d5d1dc817d38aa9a407997749f10419cd2e7b5bc3f",
"tasks": {
"ligo": {
"type": "npm",
Expand All @@ -20,8 +20,24 @@
"name": "@taqueria/plugin-ligo"
},
"get-image": {
"type": "npm",
"name": "@taqueria/plugin-ligo"
"task": "get-image",
"command": "get-image",
"description": "Provided by more than one plugin. The option --plugin is required.",
"hidden": true,
"handler": "proxy",
"options": [
{
"flag": "plugin",
"description": "Specify which plugin should be used to execute this task",
"required": true,
"choices": [
"@taqueria/plugin-ligo",
"ligo",
"@taqueria/plugin-octez-client",
"tezos-client"
]
}
]
},
"deploy": {
"type": "npm",
Expand All @@ -39,6 +55,22 @@
"type": "npm",
"name": "@taqueria/plugin-taquito"
},
"client": {
"type": "npm",
"name": "@taqueria/plugin-octez-client"
},
"typecheck": {
"type": "npm",
"name": "@taqueria/plugin-octez-client"
},
"typecheck-all": {
"type": "npm",
"name": "@taqueria/plugin-octez-client"
},
"simulate": {
"type": "npm",
"name": "@taqueria/plugin-octez-client"
},
"generate types": {
"type": "npm",
"name": "@taqueria/plugin-contract-types"
Expand All @@ -57,7 +89,7 @@
"version": "0.1",
"schema": "1.0",
"alias": "ligo",
"postInstall": "node /home/zamrokk/training-nft-3/solution/node_modules/@taqueria/plugin-ligo/postinstall.js",
"postInstall": "node /home/zamrokk/training-nft-3/solution/node_modules/@taqueria/lib-ligo/postinstall.js",
"tasks": [
{
"task": "ligo",
Expand Down Expand Up @@ -264,6 +296,95 @@
"operations": [],
"templates": []
},
{
"name": "@taqueria/plugin-octez-client",
"version": "0.1",
"schema": "1.0",
"alias": "tezos-client",
"tasks": [
{
"task": "client",
"command": "client",
"description": "This task allows you to run arbitrary octez-client 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 octez-client binary, wrapped in quotes",
"type": "string",
"required": true
}
]
},
{
"task": "typecheck",
"command": "typecheck <sourceFile>",
"aliases": [
"tc"
],
"description": "Typecheck a Michelson contract",
"encoding": "json",
"handler": "proxy",
"positionals": [
{
"placeholder": "sourceFile",
"description": "The name of the Michelson contract you wish to typecheck"
}
]
},
{
"task": "typecheck-all",
"command": "typecheck-all",
"description": "Typecheck all Michelson contracts in the artifacts directory",
"encoding": "json",
"handler": "proxy"
},
{
"task": "simulate",
"command": "simulate <sourceFile>",
"aliases": [
"sim"
],
"description": "Run a Michelson contract as a simulation",
"encoding": "json",
"handler": "proxy",
"options": [
{
"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": "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": true
},
{
"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
}
],
"positionals": [
{
"placeholder": "sourceFile",
"description": "The name of the Michelson contract you wish to simulate"
}
]
},
{
"task": "get-image",
"command": "get-image",
"description": "Gets the name of the image to be used",
"hidden": true,
"handler": "proxy"
}
],
"operations": [],
"templates": []
},
{
"name": "@taqueria/plugin-contract-types",
"version": "0.1",
Expand Down
40 changes: 24 additions & 16 deletions solution/.taq/testing-state.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,53 @@
{
"operations": {},
"tasks": {
"@taqueria/plugin-taquito.deploy.1696518968789": {
"@taqueria/plugin-taquito.deploy.1699456432249": {
"task": "deploy",
"plugin": "@taqueria/plugin-taquito",
"time": 1696518968789,
"time": 1699456432249,
"output": [
{
"contract": "nft.tz",
"address": "KT18sgGX5nu4BzwV2JtpQy4KCqc8cZU5MwnN",
"address": "KT1UhE1Jd1bJqJGfW3kHChXCB7CA3UTkqpkb",
"alias": "nft",
"balanceInMutez": "0",
"destination": "https://ghostnet.ecadinfra.com"
"destination": "https://ghostnet.tezos.marigold.dev"
}
]
},
"@taqueria/plugin-taquito.deploy.1696852728145": {
"@taqueria/plugin-taquito.deploy.1699456678660": {
"task": "deploy",
"plugin": "@taqueria/plugin-taquito",
"time": 1696852728145,
"time": 1699456678660,
"output": [
{
"contract": "nft.tz",
"address": "KT1KyV1Hprert33AAz5B94CLkqAHdKZU56dq",
"alias": "nft",
"balanceInMutez": "0",
"destination": "https://ghostnet.ecadinfra.com"
"address": "KT1F56e28pcdTFJot999SWdXr7vuDPu7yYSo",
"alias": "nft"
}
]
},
"@taqueria/plugin-taquito.deploy.1696938882527": {
"@taqueria/plugin-taquito.deploy.1699458045314": {
"task": "deploy",
"plugin": "@taqueria/plugin-taquito",
"time": 1696938882528,
"time": 1699458045314,
"output": [
{
"contract": "nft.tz",
"address": "KT1EUWEeR9RHMb5q5jeW5jbhxBFHbLTqQgiZ",
"alias": "nft",
"balanceInMutez": "0",
"destination": "https://ghostnet.ecadinfra.com"
"address": "KT18nfu16UutxZNazugLwdnFce78PRTPPTon",
"alias": "nft"
}
]
},
"@taqueria/plugin-taquito.deploy.1699458834528": {
"task": "deploy",
"plugin": "@taqueria/plugin-taquito",
"time": 1699458834528,
"output": [
{
"contract": "nft.tz",
"address": "KT1TLy8qo1rfGtGmraUUQFWeBDSeM6vAQ8f5",
"alias": "nft"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion solution/app/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_CONTRACT_ADDRESS=KT1EUWEeR9RHMb5q5jeW5jbhxBFHbLTqQgiZ
VITE_CONTRACT_ADDRESS=KT1TLy8qo1rfGtGmraUUQFWeBDSeM6vAQ8f5
VITE_PINATA_API_KEY=701d3e9951e2ad5e7d63
VITE_PINATA_API_SECRET=adc566d96514e6ddd076ad531c36b536e7b6f33b36625c136f2100d2909da880
VITE_TEZOS_NODE=https://ghostnet.tezos.marigold.dev
Expand Down
2 changes: 1 addition & 1 deletion solution/app/src/nft.code.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion solution/artifacts/nft.default_storage.tz
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{}
{ Elt "" 0x74657a6f732d73746f726167653a64617461 ;
Elt "data"
0x7b0a202020202020226e616d65223a22464132204e4654204d61726b6574706c616365222c0a202020202020226465736372697074696f6e223a224578616d706c65206f662046413220696d706c656d656e746174696f6e222c0a2020202020202276657273696f6e223a22302e302e31222c0a202020202020226c6963656e7365223a7b226e616d65223a224d4954227d2c0a20202020202022617574686f7273223a5b224d617269676f6c643c636f6e74616374406d617269676f6c642e6465763e225d2c0a20202020202022686f6d6570616765223a2268747470733a2f2f6d617269676f6c642e646576222c0a20202020202022736f75726365223a7b0a202020202020202022746f6f6c73223a5b224c69676f225d2c0a2020202020202020226c6f636174696f6e223a2268747470733a2f2f6769746875622e636f6d2f6c69676f6c616e672f636f6e74726163742d636174616c6f6775652f747265652f6d61696e2f6c69622f666132227d2c0a20202020202022696e7465726661636573223a5b22545a49502d303132225d2c0a202020202020226572726f7273223a205b5d2c0a202020202020227669657773223a205b5d0a2020202020207d }
0x7b0a202020202020202020226e616d65223a22464132204e4654204d61726b6574706c616365222c0a202020202020202020226465736372697074696f6e223a224578616d706c65206f662046413220696d706c656d656e746174696f6e222c0a2020202020202020202276657273696f6e223a22302e302e31222c0a202020202020202020226c6963656e7365223a7b226e616d65223a224d4954227d2c0a20202020202020202022617574686f7273223a5b224d617269676f6c643c636f6e74616374406d617269676f6c642e6465763e225d2c0a20202020202020202022686f6d6570616765223a2268747470733a2f2f6d617269676f6c642e646576222c0a20202020202020202022736f75726365223a7b0a202020202020202020202022746f6f6c73223a5b224c69676f225d2c0a2020202020202020202020226c6f636174696f6e223a2268747470733a2f2f6769746875622e636f6d2f6c69676f6c616e672f636f6e74726163742d636174616c6f6775652f747265652f6d61696e2f6c69622f666132227d2c0a20202020202020202022696e7465726661636573223a5b22545a49502d303132225d2c0a202020202020202020226572726f7273223a205b5d2c0a202020202020202020227669657773223a205b5d0a2020202020202020207d }
{}
{})

20 changes: 10 additions & 10 deletions solution/contracts/nft.jsligo
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#import "@ligo/fa/lib/fa2/asset/single_asset.impl.jsligo" "FA2Impl"

/* ERROR MAP FOR UI DISPLAY or TESTS
const errorMap : map<string,string> = Map.literal(list([
["0", "Enter a positive and not null amount"],
["1", "Operation not allowed, you need to be administrator"],
["2", "You cannot sell more than your current balance"],
["3", "Cannot find the offer you entered for buying"],
["4", "You entered a quantity to buy than is more than the offer quantity"],
["5", "Not enough funds, you need to pay at least quantity * offer price to get the tokens"],
["6", "Cannot find the contract relative to implicit address"],
]));
*/
const errorMap : map<string,string> = Map.literal(list([
["0", "Enter a positive and not null amount"],
["1", "Operation not allowed, you need to be administrator"],
["2", "You cannot sell more than your current balance"],
["3", "Cannot find the offer you entered for buying"],
["4", "You entered a quantity to buy than is more than the offer quantity"],
["5", "Not enough funds, you need to pay at least quantity * offer price to get the tokens"],
["6", "Cannot find the contract relative to implicit address"],
]));
*/

export type offer = { quantity: nat, price: nat };

Expand Down
8 changes: 2 additions & 6 deletions solution/contracts/nft.parameterList.jsligo
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#import "nft.jsligo" "Contract"

// Define your parameter values as a list of LIGO variable definitions
// 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.

// If your parameter is a simple value, you can define it directly
// E.g. const default_parameter = 10

// For added type-safety, you can reference the type of your parameter from the contract
// E.g. const default_parameter : parameter_of Contract = 10
// IMPORTANT: We suggest always explicitly typing your parameter values:
// E.g.: `const parameter: int = 10` or `const parameter: Contract.parameter = 10`
26 changes: 13 additions & 13 deletions solution/contracts/nft.storageList.jsligo
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ const default_storage: Contract.storage = {
"data",
bytes
`{
"name":"FA2 NFT Marketplace",
"description":"Example of FA2 implementation",
"version":"0.0.1",
"license":{"name":"MIT"},
"authors":["Marigold<[email protected]>"],
"homepage":"https://marigold.dev",
"source":{
"tools":["Ligo"],
"location":"https://github.com/ligolang/contract-catalogue/tree/main/lib/fa2"},
"interfaces":["TZIP-012"],
"errors": [],
"views": []
}`
"name":"FA2 NFT Marketplace",
"description":"Example of FA2 implementation",
"version":"0.0.1",
"license":{"name":"MIT"},
"authors":["Marigold<[email protected]>"],
"homepage":"https://marigold.dev",
"source":{
"tools":["Ligo"],
"location":"https://github.com/ligolang/contract-catalogue/tree/main/lib/fa2"},
"interfaces":["TZIP-012"],
"errors": [],
"views": []
}`
]
]
)
Expand Down
Loading

0 comments on commit 2e6889a

Please sign in to comment.