Skip to content

Commit

Permalink
update ligo and taqueria versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zamrokk committed Sep 22, 2023
1 parent 14d8ab9 commit 57fd94e
Show file tree
Hide file tree
Showing 6 changed files with 406 additions and 904 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,14 @@ On `transfer,balance_of and update_ops` functions, change :
Change the initial storage to

```ligolang
#include "nft.jsligo"
#import "nft.jsligo" "Contract"
#import "@ligo/fa/lib/fa2/asset/multi_asset.jsligo" "MULTIASSET"
const default_storage =
{
administrators: Set.literal(
list(["tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" as address])
) as set<address>,
offers: Map.empty as map<[address, nat], offer>,
offers: Map.empty as map<[address, nat], Contract.offer>,
ledger: Big_map.empty as MULTIASSET.Ledger.t,
metadata: Big_map.literal(
list(
Expand Down Expand Up @@ -247,12 +248,13 @@ const default_storage =
set<[MULTIASSET.owner, MULTIASSET.token_id]>,
token_ids: Set.empty as set<MULTIASSET.token_id>
};
```

Compile again and deploy to ghostnet

```bash
TAQ_LIGO_IMAGE=ligolang/ligo:0.71.1 taq compile nft.jsligo
TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile nft.jsligo
taq deploy nft.tz -e "testing"
```

Expand Down
6 changes: 3 additions & 3 deletions solution/.taq/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
"plugins": [
{
"type": "npm",
"name": "@taqueria/plugin-ligo"
"name": "@taqueria/plugin-taquito"
},
{
"type": "npm",
"name": "@taqueria/plugin-taquito"
"name": "@taqueria/plugin-contract-types"
},
{
"type": "npm",
"name": "@taqueria/plugin-contract-types"
"name": "@taqueria/plugin-ligo"
}
]
}
239 changes: 123 additions & 116 deletions solution/.taq/state.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
// WARNING: This file is autogenerated and should NOT be modified
{
"build": "6a57340",
"configHash": "74e300d3b0d67c9d2ce77651481f1790b01032718a8e1fc8b8df634dbea9ca04",
"build": "dcdfa46",
"configHash": "b792016328b3dfdfb382392c5825a23c65806fad5d40043edbb1fed3ffb6623e",
"tasks": {
"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"
},
"deploy": {
"type": "npm",
"name": "@taqueria/plugin-taquito"
Expand All @@ -42,6 +22,26 @@
"generate types": {
"type": "npm",
"name": "@taqueria/plugin-contract-types"
},
"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"
}
},
"operations": {},
Expand All @@ -52,100 +52,6 @@
}
},
"plugins": [
{
"name": "@taqueria/plugin-ligo",
"version": "0.1",
"schema": "1.0",
"alias": "ligo",
"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 <sourceFile>",
"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
}
]
},
{
"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 <sourceFile>",
"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 <sourceFileName>",
"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-taquito",
"version": "0.1",
Expand Down Expand Up @@ -294,6 +200,107 @@
],
"operations": [],
"templates": []
},
{
"name": "@taqueria/plugin-ligo",
"version": "0.1",
"schema": "1.0",
"alias": "ligo",
"postInstall": "node /home/zamrokk/training-nft-4/solution/node_modules/@taqueria/plugin-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 <sourceFile>",
"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 <sourceFile>",
"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 <sourceFileName>",
"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"
}
]
}
]
}
5 changes: 3 additions & 2 deletions solution/contracts/nft.storageList.jsligo
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include "nft.jsligo"
#import "nft.jsligo" "Contract"
#import "@ligo/fa/lib/fa2/asset/multi_asset.jsligo" "MULTIASSET"
const default_storage =
{
administrators: Set.literal(
list(["tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" as address])
) as set<address>,
offers: Map.empty as map<[address, nat], offer>,
offers: Map.empty as map<[address, nat], Contract.offer>,
ledger: Big_map.empty as MULTIASSET.Ledger.t,
metadata: Big_map.literal(
list(
Expand Down
Loading

0 comments on commit 57fd94e

Please sign in to comment.