From 5266537c4059af5f31c5f6f9e984989dbbd87591 Mon Sep 17 00:00:00 2001 From: Benjamin Fuentes Date: Mon, 25 Sep 2023 15:04:52 +0200 Subject: [PATCH 1/4] ok for LigoV1 minus the README and also the taqueria compilation for storage and parameters --- README.md | 24 +- solution/.taq/development-state.json | 100 +++--- solution/.taq/state.json | 2 +- solution/contracts/pokeGame.jsligo | 335 +++++++++--------- .../contracts/pokeGame.storageList.jsligo | 54 +-- solution/contracts/pokeGameLambda.jsligo | 86 ++--- solution/contracts/proxy.jsligo | 184 +++++----- solution/contracts/proxy.storageList.jsligo | 20 +- solution/contracts/unit_pokeGame.jsligo | 99 +++--- 9 files changed, 434 insertions(+), 470 deletions(-) diff --git a/README.md b/README.md index 0e27923..08588f5 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ Time to compile and play with the CLI ```bash npm i -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo ``` Redeploy to testnet @@ -295,7 +295,7 @@ const default_parameter : parameter_of PokeGame = UpdateFeedbackFunction((_oracl Compile all and call an init transaction ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo taq call pokeGame --param pokeGame.parameter.default_parameter.tz -e testing ``` @@ -688,7 +688,7 @@ const default_storage = { Compile ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo ``` All good :ok_hand: @@ -892,7 +892,7 @@ const getView = ([viewName, store]: [string, storage]): bytes => { Compile ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo ``` #### We have all ready for deployment :rocket: @@ -910,7 +910,7 @@ const default_storage = { Then compile and deploy it ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo taq deploy proxy.tz -e testing ``` @@ -942,7 +942,7 @@ const default_storage = { ``` ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo taq deploy pokeGame.tz -e testing ``` @@ -1029,7 +1029,7 @@ const initProxyWithV1: parameter_of Proxy = Compile & Call it ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo taq call proxy --param proxy.default_storage.tz -e testing ``` @@ -1058,8 +1058,8 @@ output : Go on frontend side, recompile all and generate typescript classes ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile pokeGame.jsligo -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo taq generate types ./app/src ``` @@ -1353,7 +1353,7 @@ const storageV2 = { ``` ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo taq deploy pokeGame.tz -e testing --storage pokeGame.storage.storageV2.tz ``` @@ -1506,7 +1506,7 @@ const initProxyWithV2: parameter_of Proxy = Call the proxy to do the changes ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo taq call proxy --param proxy.parameter.initProxyWithV2.tz -e testing ``` @@ -1543,7 +1543,7 @@ const changeVersionV1ToV2: parameter_of Proxy = ``` ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.71.1 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo taq call proxy --param proxy.parameterList.changeVersionV1ToV2.tz -e testing ``` diff --git a/solution/.taq/development-state.json b/solution/.taq/development-state.json index 7e1949c..a811b89 100644 --- a/solution/.taq/development-state.json +++ b/solution/.taq/development-state.json @@ -12,10 +12,21 @@ } ] }, - "@taqueria/plugin-ligo.compile.1691764048195": { + "@taqueria/plugin-ligo.test.1693841086075": { + "task": "test", + "plugin": "@taqueria/plugin-ligo", + "time": 1693841086075, + "output": [ + { + "contract": "unit_pokeGame.jsligo", + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2807n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"Init\"} ; \"feedback\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a(None)\nSuccess (1359n)\n\"calling _testPokeGame on proxy : \"\nKT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a(None)\nSuccess (1357n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + } + ] + }, + "@taqueria/plugin-ligo.compile.1695645337434": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1691764048195, + "time": 1695645337434, "output": [ { "contract": "proxy.jsligo", @@ -23,7 +34,7 @@ }, { "contract": "proxy.storageList.jsligo", - "artifact": "artifacts/proxy.default_storage.tz\n" + "artifact": "" }, { "contract": "proxy.parameterList.jsligo", @@ -31,59 +42,48 @@ } ] }, - "@taqueria/plugin-ligo.compile.1691764068045": { + "@taqueria/plugin-ligo.compile.1695645359213": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1691764068045, + "time": 1695645359213, "output": [ { - "contract": "pokeGameLambda.jsligo", - "artifact": "artifacts/pokeGameLambda.tz" - } - ] - }, - "@taqueria/plugin-ligo.compile.1691764160054": { - "task": "compile", - "plugin": "@taqueria/plugin-ligo", - "time": 1691764160054, - "output": [ - { - "contract": "pokeGameLambda.jsligo", - "artifact": "artifacts/pokeGameLambda.tz" + "contract": "proxy.jsligo", + "artifact": "artifacts/proxy.tz" }, { - "contract": "pokeGameLambda.storageList.jsligo", - "artifact": "No storage expressions found\n" + "contract": "proxy.storageList.jsligo", + "artifact": "artifacts/proxy.default_storage.tz\n" }, { - "contract": "pokeGameLambda.parameterList.jsligo", - "artifact": "No parameter expressions found\n" + "contract": "proxy.parameterList.jsligo", + "artifact": "" } ] }, - "@taqueria/plugin-ligo.compile.1693837601857": { + "@taqueria/plugin-ligo.compile.1695645579035": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1693837601857, + "time": 1695645579035, "output": [ { - "contract": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz" + "contract": "proxy.jsligo", + "artifact": "artifacts/proxy.tz" }, { - "contract": "pokeGame.storageList.jsligo", - "artifact": "artifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\n" + "contract": "proxy.storageList.jsligo", + "artifact": "" }, { - "contract": "pokeGame.parameterList.jsligo", - "artifact": "No parameter expressions found\n" + "contract": "proxy.parameterList.jsligo", + "artifact": "" } ] }, - "@taqueria/plugin-ligo.compile.1693837613825": { + "@taqueria/plugin-ligo.compile.1695645633346": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1693837613825, + "time": 1695645633346, "output": [ { "contract": "proxy.jsligo", @@ -99,21 +99,29 @@ } ] }, - "@taqueria/plugin-ligo.test.1693840595479": { - "task": "test", + "@taqueria/plugin-ligo.compile.1695645758806": { + "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1693840595479, + "time": 1695645758806, "output": [ { - "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" + "contract": "proxy.jsligo", + "artifact": "artifacts/proxy.tz" + }, + { + "contract": "proxy.storageList.jsligo", + "artifact": "" + }, + { + "contract": "proxy.parameterList.jsligo", + "artifact": "" } ] }, - "@taqueria/plugin-ligo.test.1693840607049": { + "@taqueria/plugin-ligo.test.1695646630863": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1693840607049, + "time": 1695646630864, "output": [ { "contract": "unit_pokeGame.jsligo", @@ -121,10 +129,10 @@ } ] }, - "@taqueria/plugin-ligo.test.1693840649257": { + "@taqueria/plugin-ligo.test.1695646773177": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1693840649257, + "time": 1695646773177, "output": [ { "contract": "unit_pokeGame.jsligo", @@ -132,10 +140,10 @@ } ] }, - "@taqueria/plugin-ligo.test.1693840690077": { + "@taqueria/plugin-ligo.test.1695647004986": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1693840690077, + "time": 1695647004986, "output": [ { "contract": "unit_pokeGame.jsligo", @@ -143,14 +151,14 @@ } ] }, - "@taqueria/plugin-ligo.test.1693841086075": { + "@taqueria/plugin-ligo.test.1695647046376": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1693841086075, + "time": 1695647046376, "output": [ { "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2807n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"Init\"} ; \"feedback\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a(None)\nSuccess (1359n)\n\"calling _testPokeGame on proxy : \"\nKT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a(None)\nSuccess (1357n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" } ] } diff --git a/solution/.taq/state.json b/solution/.taq/state.json index fec0995..c891e65 100644 --- a/solution/.taq/state.json +++ b/solution/.taq/state.json @@ -1,6 +1,6 @@ // WARNING: This file is autogenerated and should NOT be modified { - "build": "72f27cf", + "build": "dcdfa46", "configHash": "f2656a55015d2ecada534d41983a72fd2b6c2498405360dc60ec1c1bbbc169e7", "tasks": { "ligo": { diff --git a/solution/contracts/pokeGame.jsligo b/solution/contracts/pokeGame.jsligo index 4f5d47f..3f02c83 100644 --- a/solution/contracts/pokeGame.jsligo +++ b/solution/contracts/pokeGame.jsligo @@ -1,10 +1,6 @@ #import "./tzip18.jsligo" "TZIP18" - -type pokeMessage = { - receiver : address, - feedback : string -}; +export type pokeMessage = { receiver: address, feedback: string }; export type storage = { pokeTraces: map, @@ -15,149 +11,145 @@ export type storage = { type returned_feedback = [address, string]; //address that gives feedback and a string message -type oracle_param = contract; +type oracle_param = contract; -type parameter = { - entrypointName: string, - payload: bytes -}; +type parameter = { entrypointName: string, payload: bytes }; type return_ = [list, storage]; - - -const poke = (_: parameter, [pokeTraces, feedback, ticketOwnership, tzip18] : [map, - string, - map>, - TZIP18.tzip18]): return_ => { - +const poke = ( + _: parameter, + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { //extract opt ticket from map + const [t, tom]: [option>, map>] = Map.get_and_update( Tezos.get_source(), None() as option>, ticketOwnership ); + return match(t) { + when (None): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + [ + list([]) as list, + { + //let t burn - return match(t, { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => [ - list([]) as list, - { - //let t burn - feedback, - pokeTraces: Map.add( - Tezos.get_source(), - { receiver: Tezos.get_self_address(), feedback: "" }, - pokeTraces - ), - ticketOwnership: tom, - tzip18, - } - ] - }); + feedback, + pokeTraces: Map.add( + Tezos.get_source(), + { receiver: Tezos.get_self_address(), feedback: "" }, + pokeTraces + ), + ticketOwnership: tom, + tzip18, + } + ] + }; }; @no_mutation -const pokeAndGetFeedback = (oracleAddress: address, [pokeTraces, feedback, ticketOwnership, tzip18] : [map, - string, - map>, - TZIP18.tzip18]): return_ => { - - +const pokeAndGetFeedback = ( + oracleAddress: address, + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { //extract opt ticket from map + const [t, tom]: [option>, map>] = Map.get_and_update( Tezos.get_source(), None() as option>, ticketOwnership ); - //Read the feedback view - let feedbackOpt: option = Tezos.call_view( - "getView", - "feedback", - oracleAddress - ); - - return match(t, { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => - match(feedbackOpt, { - Some: (f: bytes) => { - let feedbackMessage = { - receiver: oracleAddress, - feedback: Option.unopt(Bytes.unpack(f) as option), - }; - return [ - list([]) as list, - { - feedback, - pokeTraces: Map.add( - Tezos.get_source(), - feedbackMessage, - pokeTraces - ), - ticketOwnership: tom, - tzip18, - } - ] - }, - None: () => - failwith("Cannot find view feedback on given oracle address"), - }), - }); -}; - -const init = ([a, ticketCount]: [address, nat], [pokeTraces, feedback, ticketOwnership, tzip18] : [map, - string, - map>, - TZIP18.tzip18]): return_ => { - - return ticketCount == (0 as nat) - ? [ - list([]) as list, - { - feedback, - pokeTraces, - ticketOwnership, - tzip18 - } - ] - : [ - list([]) as list, - { - feedback, - pokeTraces, - ticketOwnership: Map.add( - a, - Option.unopt(Tezos.create_ticket("can_poke", ticketCount)), - ticketOwnership - ), - tzip18, - } - ] + let feedbackOpt: option = + Tezos.call_view("getView", "feedback", oracleAddress); + return match(t) { + when (None): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + match(feedbackOpt) { + when (Some(f)): + do { + let feedbackMessage = { + receiver: oracleAddress, + feedback: Option.unopt(Bytes.unpack(f) as option), + }; + return [ + list([]) as list, + { + feedback, + pokeTraces: Map.add( + Tezos.get_source(), + feedbackMessage, + pokeTraces + ), + ticketOwnership: tom, + tzip18, + } + ] + } + when (None): + failwith("Cannot find view feedback on given oracle address") + } + }; }; - +const init = ( + [a, ticketCount]: [address, nat], + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { + return ticketCount == (0 as nat) ? [ + list([]) as list, + { feedback, pokeTraces, ticketOwnership, tzip18 } + ] : [ + list([]) as list, + { + feedback, + pokeTraces, + ticketOwnership: Map.add( + a, + Option.unopt(Tezos.create_ticket("can_poke", ticketCount)), + ticketOwnership + ), + tzip18, + } + ] +}; /** * Function called by a parent contract or administrator to set the current version on an old contract **/ -const changeVersion = ( newAddress : address , [ - - pokeTraces, - feedback, - ticketOwnership, - tzip18 -]: [ - map, - string, - map>, - TZIP18.tzip18 -]): return_ => { + +const changeVersion = ( + newAddress: address, + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { return [ list([]) as list, { @@ -169,81 +161,76 @@ const changeVersion = ( newAddress : address , [ ] }; - - @view -const getView = ([viewName, store]: [string, storage]): bytes => { +const getView = (viewName: string, store: storage): bytes => { if (viewName == "feedback") { return Bytes.pack(store.feedback); } else return failwith("View " + viewName + " not found on this contract"); }; -export const main = ([action, store]: [parameter, storage]): return_ => { +@entry +export const main = (action: parameter, store: storage): return_ => { //destructure the storage to avoid DUP - const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; - - const canBeCalled: bool = match(tzip18.contractNext, { - None: () => false, // I am the last version, but I cannot be called directly (or is my proxy, see later) - Some: (contract: address) => { - if (Tezos.get_sender() == contract) { - return true; - } // I am not the last but a parent contract is calling me - else { - return false; - } - }, // I am not the last version and a not-parent is trying to call me - }); - - if (Tezos.get_sender() != tzip18.proxy && !canBeCalled){ - return failwith("Only the proxy or contractNext can call this contract");}; + const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; + const canBeCalled: bool = + match(tzip18.contractNext) { + when (None): + false // I am the last version, but I cannot be called directly (or is my proxy, see later) + + when (Some(contract)): + do { + if (Tezos.get_sender() == contract) { + return true; + } // I am not the last but a parent contract is calling me + else { + return false; + } + } // I am not the last version and a not-parent is trying to call me + + }; + if (Tezos.get_sender() != tzip18.proxy && ! canBeCalled) { + return failwith("Only the proxy or contractNext can call this contract"); + }; if (action.entrypointName == "Poke") { - return poke(action,[pokeTraces, feedback, ticketOwnership, tzip18]); + return poke(action, [pokeTraces, feedback, ticketOwnership, tzip18]); } else { if (action.entrypointName == "PokeAndGetFeedback") { - return match(Bytes.unpack(action.payload) as option
, { - None: () => - failwith("Cannot find the address parameter for PokeAndGetFeedback"), - Some: (other: address) => - pokeAndGetFeedback(other,[ - - pokeTraces, - feedback, - ticketOwnership, - tzip18 - ]), - }); + return match(Bytes.unpack(action.payload) as option
) { + when (None): + failwith("Cannot find the address parameter for PokeAndGetFeedback") + when (Some(other)): + pokeAndGetFeedback( + other, + [pokeTraces, feedback, ticketOwnership, tzip18] + ) + }; } else { if (action.entrypointName == "Init") { - return match(Bytes.unpack(action.payload) as option<[address, nat]>, { - None: () => - failwith("Cannot find the address parameter for changeVersion"), - Some: (initParam: [address, nat]) => - init([initParam[0], - initParam[1]],[ - pokeTraces, - feedback, - ticketOwnership, - tzip18 - ]), - }); + return match(Bytes.unpack(action.payload) as option<[address, nat]>) { + when (None): + failwith("Cannot find the address parameter for changeVersion") + when (Some(initParam)): + init( + [initParam[0], initParam[1]], + [pokeTraces, feedback, ticketOwnership, tzip18] + ) + }; } else { if (action.entrypointName == "changeVersion") { - return match(Bytes.unpack(action.payload) as option
, { - None: () => - failwith("Cannot find the address parameter for changeVersion"), - Some: (other: address) => - changeVersion(other,[ - pokeTraces, - feedback, - ticketOwnership, - tzip18 - ]), - }); + return match(Bytes.unpack(action.payload) as option
) { + when (None): + failwith("Cannot find the address parameter for changeVersion") + when (Some(other)): + changeVersion( + other, + [pokeTraces, feedback, ticketOwnership, tzip18] + ) + }; } else { return failwith("Non-existant method"); } } } } -}; \ No newline at end of file +}; diff --git a/solution/contracts/pokeGame.storageList.jsligo b/solution/contracts/pokeGame.storageList.jsligo index aa70a19..c6f72f1 100644 --- a/solution/contracts/pokeGame.storageList.jsligo +++ b/solution/contracts/pokeGame.storageList.jsligo @@ -1,28 +1,28 @@ -#include "pokeGame.jsligo" -const default_storage = - { - pokeTraces: Map.empty as map, - feedback: "kiss", - ticketOwnership: Map.empty as map>, //ticket of claims - tzip18: { - proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, - version: 1 as nat, - contractPrevious: None() as option
, - contractNext: None() as option
- } - }; +#include "pokeGame.jsligo" -const storageV2 = - { - pokeTraces: Map.empty as map, - feedback: "hello", - ticketOwnership: Map.empty as map>, - tzip18: { - proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, - version: 2 as nat, - contractPrevious: Some( - "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address - ) as option
, - contractNext: None() as option
- } - }; +const default_storage = { + pokeTraces: Map.empty as map, + feedback: "kiss", + ticketOwnership: Map.empty as map>, //ticket of claims + tzip18: { + proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, + version: 1 as nat, + contractPrevious: None() as option
, + contractNext: None() as option
+ } +}; + + +const storageV2 = { + pokeTraces: Map.empty as map, + feedback: "hello", + ticketOwnership: Map.empty as map>, + tzip18: { + proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, + version: 2 as nat, + contractPrevious: Some( + "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address + ) as option
, + contractNext: None() as option
+ } +}; diff --git a/solution/contracts/pokeGameLambda.jsligo b/solution/contracts/pokeGameLambda.jsligo index fbbf536..5e2f1e9 100644 --- a/solution/contracts/pokeGameLambda.jsligo +++ b/solution/contracts/pokeGameLambda.jsligo @@ -1,7 +1,4 @@ -type pokeMessage = { - receiver: address, - feedback: string -}; +export type pokeMessage = { receiver: address, feedback: string }; export type feedbackFunction = (oracleAddress: address) => string; @@ -29,26 +26,24 @@ const poke = (_: parameter, store: storage): return_ => { None() as option>, ticketOwnership ); - return match( - t, - { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => - [ - list([]) as list, - { - feedback, - pokeTraces: Map.add( - Tezos.get_source(), - { receiver: Tezos.get_self_address(), feedback: "" }, - pokeTraces - ), - ticketOwnership: tom, - feedbackFunction - } - ] - } - ) + return match(t) { + when (None): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + [ + list([]) as list, + { + feedback, + pokeTraces: Map.add( + Tezos.get_source(), + { receiver: Tezos.get_self_address(), feedback: "" }, + pokeTraces + ), + ticketOwnership: tom, + feedbackFunction + } + ] + } }; @entry @@ -84,34 +79,31 @@ const pokeAndGetFeedback = (oracleAddress: address, store: storage): return_ => None() as option>, ticketOwnership ); - let feedbackMessage = - { receiver: oracleAddress, feedback: feedbackFunction(oracleAddress) }; - return match( - t, - { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => - [ - list([]) as list, - { - feedback, - pokeTraces: Map.add(Tezos.get_source(), feedbackMessage, pokeTraces), - ticketOwnership: tom, - feedbackFunction - } - ] - } - ) + let feedbackMessage = { + receiver: oracleAddress, + feedback: feedbackFunction(oracleAddress) + }; + return match(t) { + when (None): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + [ + list([]) as list, + { + feedback, + pokeTraces: Map.add(Tezos.get_source(), feedbackMessage, pokeTraces), + ticketOwnership: tom, + feedbackFunction + } + ] + } }; @view -const feedback = ([_, store]: [unit, storage]): string => { - return store.feedback -}; +const feedback = (_: unit, store: storage): string => { return store.feedback }; @entry -const updateFeedbackFunction = (newCode: feedbackFunction, store: storage) - : return_ => { +const updateFeedbackFunction = (newCode: feedbackFunction, store: storage): return_ => { const { pokeTraces, feedback, ticketOwnership, feedbackFunction } = store; ignore(feedbackFunction); return [ diff --git a/solution/contracts/proxy.jsligo b/solution/contracts/proxy.jsligo index 35293b9..51e5e1a 100644 --- a/solution/contracts/proxy.jsligo +++ b/solution/contracts/proxy.jsligo @@ -1,25 +1,16 @@ -type callContract = { - entrypointName: string, - payload: bytes -}; +type callContract = { entrypointName: string, payload: bytes }; -type entrypointType = { - method: string, - addr: address -}; +export type entrypointType = { method: string, addr: address }; -type entrypointOperation = { +export type entrypointOperation = { name: string, isRemoved: bool, entrypoint: option }; -type changeVersion = { - oldAddr: address, - newAddr: address -}; +export type changeVersion = { oldAddr: address, newAddr: address }; -type storage = { +export type storage = { governance: address, //admins entrypoints: big_map< string, @@ -28,38 +19,36 @@ type storage = { }; -type _return = [list, storage]; +export type _return = [list, storage]; // the proxy function @entry const callContract = (param: callContract, store: storage): _return => { - return match( - Big_map.find_opt(param.entrypointName, store.entrypoints), - { - None: () => failwith("No entrypoint found"), - Some: (entry: entrypointType) => - match( - Tezos.get_contract_opt(entry.addr) as option>, - { - None: () => failwith("No contract found at this address"), - Some: (contract) => + return match(Big_map.find_opt(param.entrypointName, store.entrypoints)) { + when (None): + failwith("No entrypoint found") + when (Some(entry)): + match( + Tezos.get_contract_opt(entry.addr) as option> + ) { + when (None): + failwith("No contract found at this address") + when (Some(contract)): + [ + list( [ - list( - [ - Tezos.transaction( - { entrypointName: entry.method, payload: param.payload }, - Tezos.get_amount(), - contract - ) - ] - ) as list, - store + Tezos.transaction( + { entrypointName: entry.method, payload: param.payload }, + Tezos.get_amount(), + contract + ) ] - } - ) - } - ) + ) as list, + store + ] + } + } }; /** @@ -79,46 +68,41 @@ const upgrade = ( l: list, m: big_map ): big_map => { - return match( - l, - list( - [ - ([]) => m, - ([x, ...xs]) => { - let b: big_map = - match( - x.entrypoint, - { - None: () => { - if (x.isRemoved == true) { - return Big_map.remove(x.name, m) - } else { - return m - } - }, //mean to remove or unchanged - Some: (_ep: entrypointType) => { - //means to add new or unchanged + return match(l) { + when ([]): + m + when ([x, ...xs]): + do { + let b: big_map = + match(x.entrypoint) { + when (None): + do { + if (x.isRemoved == true) { + return Big_map.remove(x.name, m) + } else { + return m + } + } //mean to remove or unchanged - if (x.isRemoved == false) { - return match( - x.entrypoint, - { - None: () => m, - Some: (c: entrypointType) => - Big_map.update(x.name, Some(c), m) - } - ) - } else { - return m + when (Some(_ep)): + do { + //means to add new or unchanged + + if (x.isRemoved == false) { + return match(x.entrypoint) { + when (None): + m + when (Some(c)): + Big_map.update(x.name, Some(c), m) } + } else { + return m } } - ); - return update_storage(xs, b) - } - ] - ) - ) + }; + return update_storage(xs, b) + } + } }; //update the entrpoint interface map @@ -126,22 +110,20 @@ const upgrade = ( update_storage(upgraded_ep_list, store.entrypoints); //check if version needs to be changed - return match( - changeVersionOpt, - { - None: () => - [ - list([]) as list, - { ...store, entrypoints: new_entrypoints } - ], - Some: (change) => { + return match(changeVersionOpt) { + when (None): + [list([]) as list, { ...store, entrypoints: new_entrypoints }] + when (Some(change)): + do { let op_change: operation = match( Tezos.get_contract_opt(change.oldAddr) as - option>, - { - None: () => failwith("No contract found at this address"), - Some: (contract) => { + option> + ) { + when (None): + failwith("No contract found at this address") + when (Some(contract)): + do { let amt = Tezos.get_amount(); let payload: address = change.newAddr; return Tezos.transaction( @@ -153,27 +135,23 @@ const upgrade = ( contract ) } - } - ); + }; return [ list([op_change]) as list, { ...store, entrypoints: new_entrypoints } ] } - } - ) + } }; @view -const getView = ([viewName, store]: [string, storage]): bytes => { - return match( - Big_map.find_opt(viewName, store.entrypoints), - { - None: () => failwith("View " + viewName + " not declared on this proxy"), - Some: (ep: entrypointType) => - Option.unopt( - Tezos.call_view("getView", viewName, ep.addr) as option - ) - } - ) +const getView = (viewName: string, store: storage): bytes => { + return match(Big_map.find_opt(viewName, store.entrypoints)) { + when (None): + failwith("View " + viewName + " not declared on this proxy") + when (Some(ep)): + Option.unopt( + Tezos.call_view("getView", viewName, ep.addr) as option + ) + } }; diff --git a/solution/contracts/proxy.storageList.jsligo b/solution/contracts/proxy.storageList.jsligo index 9a88117..2ff94ba 100644 --- a/solution/contracts/proxy.storageList.jsligo +++ b/solution/contracts/proxy.storageList.jsligo @@ -1,11 +1,11 @@ -#include "proxy.jsligo" -const default_storage = - { - governance: "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" as address, //admins - entrypoints: Big_map.empty as - big_map< - string, - entrypointType - > //interface schema map +#import "proxy.jsligo" "Contract" - }; +const default_storage = { + governance: "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb" as address, //admins + entrypoints: Big_map.empty as + big_map< + string, + Contract.entrypointType + > //interface schema map + +}; diff --git a/solution/contracts/unit_pokeGame.jsligo b/solution/contracts/unit_pokeGame.jsligo index 1bf01b1..f1f3464 100644 --- a/solution/contracts/unit_pokeGame.jsligo +++ b/solution/contracts/unit_pokeGame.jsligo @@ -1,5 +1,7 @@ #import "./pokeGame.jsligo" "PokeGame" + #import "./proxy.jsligo" "Proxy" + // reset state const _ = Test.reset_state(2 as nat, list([]) as list); @@ -8,13 +10,13 @@ const admin = Test.nth_bootstrap_account(0); const sender1: address = Test.nth_bootstrap_account(1); -const _ = Test.log("Sender 1 has balance : "); +const _1 = Test.log("Sender 1 has balance : "); -const _ = Test.log(Test.get_balance(sender1)); +const _2 = Test.log(Test.get_balance(sender1)); -const _ = Test.set_baker(admin); +const _3 = Test.set_baker(admin); -const _ = Test.set_source(admin); +const _4 = Test.set_source(admin); const initial_tez = 0 as tez; @@ -29,7 +31,7 @@ export const _testPokeGame = ( const contr = Test.to_contract(taddr); const contrAddress = Tezos.address(contr); const _ = Test.log("calling _testPokeGame on proxy : "); - const _ = Test.log(contr); + const _1 = Test.log(contr); Test.set_source(s); const status = Test.transfer_to_contract( @@ -47,20 +49,20 @@ const testSender1Poke = (): unit => { /***PROXY **/ - const _ = Test.set_source(admin); - const proxy_initial_storage = - { - governance: admin, //admins - entrypoints: Big_map.empty as - big_map< - string, - Proxy.entrypointType - > //interface schema map - - }; - const [tProxyaddr, _, _] = + Test. + set_source(admin); + const proxy_initial_storage = { + governance: admin, //admins + entrypoints: Big_map.empty as + big_map< + string, + Proxy.entrypointType + > //interface schema map + + }; + const [tProxyaddr, _, _1] = Test.originate_module( - contract_of (Proxy), + contract_of(Proxy), proxy_initial_storage, initial_tez ); @@ -68,27 +70,27 @@ const testSender1Poke = const proxyContrAddress = Tezos.address(proxyContr); /***CONTRACT **/ - const _ = Test.set_source(admin); - const initial_storage = - { - pokeTraces: Map.empty as map, - feedback: "kiss", - ticketOwnership: Map.empty as map>, //ticket of claims - tzip18: { - proxy: proxyContrAddress, - version: 1 as nat, - contractPrevious: None() as option
, - contractNext: None() as option
- } - }; - const [addr, _, _] = - Test.originate_from_file( - "./pokeGame.jsligo", - "main", - list([]), - Test.eval(initial_storage), + Test. + set_source(admin); + const initial_storage = { + pokeTraces: Map.empty as map, + feedback: "kiss", + ticketOwnership: Map.empty as map>, //ticket of claims + tzip18: { + proxy: proxyContrAddress, + version: 1 as nat, + contractPrevious: None() as option
, + contractNext: None() as option
+ } + }; + const [taddr, _2, _3] = + Test.originate_module( + contract_of(PokeGame), + initial_storage, initial_tez ); + const contr = Test.to_contract(taddr); + const addr = Tezos.address(contr); /**Upgrade proxy **/ const status = @@ -144,29 +146,26 @@ const testSender1Poke = sender1 ); _testPokeGame(tProxyaddr, "Poke", (bytes `dummy`), sender1); - const taddr = - Test.cast_address(addr) as - typed_address; + const store: PokeGame.storage = Test.get_storage(taddr); Test.log(store); //check poke is registered - match( - Map.find_opt(sender1, store.pokeTraces), - { - Some: (pokeMessage: PokeGame.pokeMessage) => { + match(Map.find_opt(sender1, store.pokeTraces)) { + when (Some(pokeMessage)): + do { assert_with_error( pokeMessage.feedback == "", - "feedback " + pokeMessage.feedback + " is not equal to expected " + - "(empty)" + "feedback " + pokeMessage.feedback + " is not equal to expected " + + "(empty)" ); assert_with_error( pokeMessage.receiver == addr, "receiver is not equal" ) - }, - None: () => assert_with_error(false, "don't find traces") - } - ) + } + when (None): + assert_with_error(false, "don't find traces") + } } )(); From a89fe39910f9c1e29f272d2557745c532c3a454a Mon Sep 17 00:00:00 2001 From: Benjamin Fuentes Date: Wed, 27 Sep 2023 10:11:41 +0200 Subject: [PATCH 2/4] fixed --- solution/.taq/config.json | 8 +- solution/.taq/development-state.json | 120 ++- solution/.taq/state.json | 267 +++--- .../contracts/pokeGame.storageList.jsligo | 7 +- solution/package-lock.json | 856 ++++++------------ solution/package.json | 8 +- 6 files changed, 489 insertions(+), 777 deletions(-) diff --git a/solution/.taq/config.json b/solution/.taq/config.json index e666251..eebb650 100644 --- a/solution/.taq/config.json +++ b/solution/.taq/config.json @@ -55,19 +55,19 @@ "plugins": [ { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, { "type": "npm", - "name": "@taqueria/plugin-tezos-client" + "name": "@taqueria/plugin-ligo" }, { "type": "npm", - "name": "@taqueria/plugin-taquito" + "name": "@taqueria/plugin-contract-types" }, { "type": "npm", - "name": "@taqueria/plugin-contract-types" + "name": "@taqueria/plugin-taquito" } ] } \ No newline at end of file diff --git a/solution/.taq/development-state.json b/solution/.taq/development-state.json index a811b89..ecc3b92 100644 --- a/solution/.taq/development-state.json +++ b/solution/.taq/development-state.json @@ -12,78 +12,92 @@ } ] }, - "@taqueria/plugin-ligo.test.1693841086075": { + "@taqueria/plugin-ligo.test.1695646630863": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1693841086075, + "time": 1695646630864, "output": [ { "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2807n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"Init\"} ; \"feedback\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a(None)\nSuccess (1359n)\n\"calling _testPokeGame on proxy : \"\nKT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a(None)\nSuccess (1357n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1HWpsJxenWT6m1Rjr71iQR5DXr5ffUYyEh}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1UE3DgZCk9HK7GMQ9yTMDS6vkwheN2dX3a ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "testResults": "Some tests failed :(" } ] }, - "@taqueria/plugin-ligo.compile.1695645337434": { - "task": "compile", + "@taqueria/plugin-ligo.test.1695646773177": { + "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695645337434, + "time": 1695646773177, "output": [ { - "contract": "proxy.jsligo", - "artifact": "artifacts/proxy.tz" - }, + "contract": "unit_pokeGame.jsligo", + "testResults": "Some tests failed :(" + } + ] + }, + "@taqueria/plugin-ligo.test.1695647004986": { + "task": "test", + "plugin": "@taqueria/plugin-ligo", + "time": 1695647004986, + "output": [ { - "contract": "proxy.storageList.jsligo", - "artifact": "" - }, + "contract": "unit_pokeGame.jsligo", + "testResults": "Some tests failed :(" + } + ] + }, + "@taqueria/plugin-ligo.test.1695647046376": { + "task": "test", + "plugin": "@taqueria/plugin-ligo", + "time": 1695647046376, + "output": [ { - "contract": "proxy.parameterList.jsligo", - "artifact": "" + "contract": "unit_pokeGame.jsligo", + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" } ] }, - "@taqueria/plugin-ligo.compile.1695645359213": { + "@taqueria/plugin-ligo.compile.1695801475148": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695645359213, + "time": 1695801475148, "output": [ { - "contract": "proxy.jsligo", - "artifact": "artifacts/proxy.tz" + "contract": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz" }, { - "contract": "proxy.storageList.jsligo", - "artifact": "artifacts/proxy.default_storage.tz\n" + "contract": "pokeGame.storageList.jsligo", + "artifact": "artifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\n" }, { - "contract": "proxy.parameterList.jsligo", - "artifact": "" + "contract": "pokeGame.parameterList.jsligo", + "artifact": "No parameter expressions found\n" } ] }, - "@taqueria/plugin-ligo.compile.1695645579035": { + "@taqueria/plugin-ligo.compile.1695801509445": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695645579035, + "time": 1695801509445, "output": [ { - "contract": "proxy.jsligo", - "artifact": "artifacts/proxy.tz" + "contract": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz" }, { - "contract": "proxy.storageList.jsligo", + "contract": "pokeGame.storageList.jsligo", "artifact": "" }, { - "contract": "proxy.parameterList.jsligo", - "artifact": "" + "contract": "pokeGame.parameterList.jsligo", + "artifact": "No parameter expressions found\n" } ] }, - "@taqueria/plugin-ligo.compile.1695645633346": { + "@taqueria/plugin-ligo.compile.1695801525146": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695645633346, + "time": 1695801525146, "output": [ { "contract": "proxy.jsligo", @@ -99,10 +113,10 @@ } ] }, - "@taqueria/plugin-ligo.compile.1695645758806": { + "@taqueria/plugin-ligo.compile.1695801554587": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695645758806, + "time": 1695801554587, "output": [ { "contract": "proxy.jsligo", @@ -118,47 +132,29 @@ } ] }, - "@taqueria/plugin-ligo.test.1695646630863": { + "@taqueria/plugin-ligo.test.1695801566862": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695646630864, + "time": 1695801566862, "output": [ { "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" } ] }, - "@taqueria/plugin-ligo.test.1695646773177": { - "task": "test", - "plugin": "@taqueria/plugin-ligo", - "time": 1695646773177, - "output": [ - { - "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" - } - ] - }, - "@taqueria/plugin-ligo.test.1695647004986": { - "task": "test", + "@taqueria/plugin-ligo.compile.1695802290507": { + "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695647004986, + "time": 1695802290507, "output": [ { - "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" - } - ] - }, - "@taqueria/plugin-ligo.test.1695647046376": { - "task": "test", - "plugin": "@taqueria/plugin-ligo", - "time": 1695647046376, - "output": [ + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" + }, { - "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" } ] } diff --git a/solution/.taq/state.json b/solution/.taq/state.json index c891e65..e6ad2bf 100644 --- a/solution/.taq/state.json +++ b/solution/.taq/state.json @@ -1,23 +1,23 @@ // WARNING: This file is autogenerated and should NOT be modified { "build": "dcdfa46", - "configHash": "f2656a55015d2ecada534d41983a72fd2b6c2498405360dc60ec1c1bbbc169e7", + "configHash": "ebe1a282e346b43f3d9aeceb635b130f5ad578da0b7b909e3369623fd5b3b9ee", "tasks": { - "ligo": { + "client": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, - "compile": { + "typecheck": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, - "compile-all": { + "typecheck-all": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, - "test": { + "simulate": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, "get-image": { "task": "get-image", @@ -31,29 +31,33 @@ "description": "Specify which plugin should be used to execute this task", "required": true, "choices": [ + "@taqueria/plugin-octez-client", + "tezos-client", "@taqueria/plugin-ligo", - "ligo", - "@taqueria/plugin-tezos-client", - "tezos-client" + "ligo" ] } ] }, - "client": { + "ligo": { "type": "npm", - "name": "@taqueria/plugin-tezos-client" + "name": "@taqueria/plugin-ligo" }, - "typecheck": { + "compile": { "type": "npm", - "name": "@taqueria/plugin-tezos-client" + "name": "@taqueria/plugin-ligo" }, - "typecheck-all": { + "compile-all": { "type": "npm", - "name": "@taqueria/plugin-tezos-client" + "name": "@taqueria/plugin-ligo" }, - "simulate": { + "test": { "type": "npm", - "name": "@taqueria/plugin-tezos-client" + "name": "@taqueria/plugin-ligo" + }, + "generate types": { + "type": "npm", + "name": "@taqueria/plugin-contract-types" }, "deploy": { "type": "npm", @@ -70,10 +74,6 @@ "instantiate-account": { "type": "npm", "name": "@taqueria/plugin-taquito" - }, - "generate types": { - "type": "npm", - "name": "@taqueria/plugin-contract-types" } }, "operations": {}, @@ -84,11 +84,101 @@ } }, "plugins": [ + { + "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 ", + "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 ", + "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-ligo", "version": "0.1", "schema": "1.0", "alias": "ligo", + "postInstall": "node /home/zamrokk/training-dapp-4/solution/node_modules/@taqueria/plugin-ligo/postinstall.js", "tasks": [ { "task": "ligo", @@ -121,6 +211,12 @@ "flag": "json", "description": "Emit JSON-encoded Michelson", "boolean": true + }, + { + "shortFlag": "m", + "flag": "module", + "description": "The LIGO module to be compiled", + "type": "string" } ] }, @@ -179,89 +275,38 @@ ] }, { - "name": "@taqueria/plugin-tezos-client", + "name": "@taqueria/plugin-contract-types", "version": "0.1", "schema": "1.0", - "alias": "tezos-client", + "alias": "contract-types", "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 ", - "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 ", + "task": "generate types", + "command": "generate types [typescriptDir]", "aliases": [ - "sim" + "gen types", + "gentypes" ], - "description": "Run a Michelson contract as a simulation", - "encoding": "json", + "description": "Generate types for a contract to be used with taquito", "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 + "shortFlag": "t", + "flag": "typeAliasMode", + "description": "The type aliases used in the generated types", + "choices": [ + "file", + "simple" + ] } ], "positionals": [ { - "placeholder": "sourceFile", - "description": "The name of the Michelson contract you wish to simulate" + "placeholder": "typescriptDir", + "description": "The output directory for the generated type files", + "defaultValue": "types" } ] - }, - { - "task": "get-image", - "command": "get-image", - "description": "Gets the name of the image to be used", - "hidden": true, - "handler": "proxy" } ], "operations": [], @@ -377,44 +422,6 @@ ], "operations": [], "templates": [] - }, - { - "name": "@taqueria/plugin-contract-types", - "version": "0.1", - "schema": "1.0", - "alias": "contract-types", - "tasks": [ - { - "task": "generate types", - "command": "generate types [typescriptDir]", - "aliases": [ - "gen types", - "gentypes" - ], - "description": "Generate types for a contract to be used with taquito", - "handler": "proxy", - "options": [ - { - "shortFlag": "t", - "flag": "typeAliasMode", - "description": "The type aliases used in the generated types", - "choices": [ - "file", - "simple" - ] - } - ], - "positionals": [ - { - "placeholder": "typescriptDir", - "description": "The output directory for the generated type files", - "defaultValue": "types" - } - ] - } - ], - "operations": [], - "templates": [] } ] } \ No newline at end of file diff --git a/solution/contracts/pokeGame.storageList.jsligo b/solution/contracts/pokeGame.storageList.jsligo index c6f72f1..a8ab03b 100644 --- a/solution/contracts/pokeGame.storageList.jsligo +++ b/solution/contracts/pokeGame.storageList.jsligo @@ -1,7 +1,7 @@ -#include "pokeGame.jsligo" +#import "pokeGame.jsligo" "Contract" const default_storage = { - pokeTraces: Map.empty as map, + pokeTraces: Map.empty as map, feedback: "kiss", ticketOwnership: Map.empty as map>, //ticket of claims tzip18: { @@ -12,9 +12,8 @@ const default_storage = { } }; - const storageV2 = { - pokeTraces: Map.empty as map, + pokeTraces: Map.empty as map, feedback: "hello", ticketOwnership: Map.empty as map>, tzip18: { diff --git a/solution/package-lock.json b/solution/package-lock.json index 4488f8f..6ebf593 100644 --- a/solution/package-lock.json +++ b/solution/package-lock.json @@ -9,36 +9,24 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@taqueria/plugin-contract-types": "^0.37.0", - "@taqueria/plugin-ligo": "^0.37.0", - "@taqueria/plugin-taquito": "^0.37.0", - "@taqueria/plugin-tezos-client": "^0.37.0" + "@taqueria/plugin-contract-types": "^0.40.0", + "@taqueria/plugin-ligo": "^0.40.0", + "@taqueria/plugin-octez-client": "^0.40.0", + "@taqueria/plugin-taquito": "^0.40.0" } }, "node_modules/@babel/runtime": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", - "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", + "version": "7.23.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz", + "integrity": "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==", "dev": true, "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", - "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", @@ -284,502 +272,176 @@ } }, "node_modules/@taqueria/node-sdk": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@taqueria/node-sdk/-/node-sdk-0.37.0.tgz", - "integrity": "sha512-nQQluam66Jxbzq5m2keKNduPGUUYYbNoOknmMwFskBQB1vNLncuItLB0dHGJrOvSkYlj19CKp8T2urGE6f9o/A==", - "dev": true, - "dependencies": { - "@taqueria/protocol": "^0.37.0", - "@taquito/signer": "^15.0.0", - "@taquito/taquito": "^15.0.0", - "@taquito/utils": "^15.0.0", - "i18next": "^21.10.0", - "node-fetch": "^2.6.11", - "project-name-generator": "^2.1.9", - "rambda": "^7.5.0", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@taqueria/node-sdk/-/node-sdk-0.40.0.tgz", + "integrity": "sha512-oikiFN774OZTwpppxkdde6Kaj3T05zvSZZG2Cya0yjN+G06W7llnIZ+H8QD6gFEFfWnEKEADQDzkoXwz2z4IWg==", + "dev": true, + "dependencies": { + "@taqueria/protocol": "^0.40.0", + "@taquito/signer": "^17.3.1", + "@taquito/taquito": "^17.3.1", + "@taquito/utils": "^17.3.1", + "i18next": "^23.5.1", + "node-fetch": "^3.3.2", + "rambda": "^8.3.0", "stacktrace-js": "^2.0.2", - "ts-pattern": "^5.0.1", + "ts-pattern": "^5.0.5", + "why-is-node-running": "^2.2.2", "yargs": "^17.7.2", - "zod": "^3.21.4" + "zod": "^3.22.2" } }, "node_modules/@taqueria/plugin-contract-types": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-contract-types/-/plugin-contract-types-0.37.0.tgz", - "integrity": "sha512-f7ueDHRgMmmNbi9vXkLIZFsbp/p457sniI6dXg788bokDUdvazU99D9c3u7NCCrJMKGmuLpiDzAZBrncYoIJgw==", - "dev": true, - "dependencies": { - "@taqueria/node-sdk": "^0.37.0", - "@taquito/michel-codec": "^16.2.0", - "@taquito/signer": "^16.2.0", - "@taquito/taquito": "^16.2.0", - "bignumber.js": "^9.1.1", - "fast-glob": "^3.2.12" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/core": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/core/-/core-16.2.0.tgz", - "integrity": "sha512-N1r7zVjpcT8MGtE9Kcel7OgEOrj4cvS7VPWJYKMuUltILBcUmViRcBHiK9qGV6pMdujnihKkupCI6S1LJXPoLg==", - "dev": true, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/http-utils": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-16.2.0.tgz", - "integrity": "sha512-3iPP6/zk+U3wFYhFp2/xFj81uZCJhe7unrTgwHS4KbhCTAZ584ux7ViVvy5WlT1WTgI1a+pAi0JH9aEiAqEXbg==", - "dev": true, - "dependencies": { - "axios": "^0.26.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/local-forging": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-16.2.0.tgz", - "integrity": "sha512-rYyRKudADi4U64XV1Viy63haNICEJ0vm/sMUBul7sixRF+wqmo4Adqt3a1oF4J9lQxc03Jx554SwaS5yF/cvZA==", - "dev": true, - "dependencies": { - "@taquito/core": "^16.2.0", - "@taquito/utils": "^16.2.0", - "bignumber.js": "^9.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/michel-codec": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-16.2.0.tgz", - "integrity": "sha512-az477DkyqJkOmLex/QMWYhtpDnxZ1YpNykUYuuZppWYpdVUA0nHkLGMc5QcekeX3pLCFjf6r0AgOwcAwe3QnLA==", - "dev": true, - "dependencies": { - "@taquito/core": "^16.2.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/michelson-encoder": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-16.2.0.tgz", - "integrity": "sha512-Rt2Slod+7TAqIyPQM5U1/YEoB6thATlbthF4SegsO/kL1i/IClrCOhDKMI8DQ0ZfGnH4nW7bqGJ+eU1TPNVwAg==", - "dev": true, - "dependencies": { - "@taquito/rpc": "^16.2.0", - "@taquito/utils": "^16.2.0", - "bignumber.js": "^9.1.0", - "fast-json-stable-stringify": "^2.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/rpc": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-16.2.0.tgz", - "integrity": "sha512-nxcMJbAN53Cq7EJP2Cw/AnUcC2HADZiAbzOvnAIjcC8qmgr+f1Z1IuqfbrHv9CAf+SpEmWa1yMXoNCmixbxfbg==", - "dev": true, - "dependencies": { - "@taquito/core": "^16.2.0", - "@taquito/http-utils": "^16.2.0", - "@taquito/utils": "^16.2.0", - "bignumber.js": "^9.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/signer": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/signer/-/signer-16.2.0.tgz", - "integrity": "sha512-j0X6LueI5HOknD44hkzOjoG0aRZ86yYtYZt/Q1fiRsh/GobLf8jK2YcHu23QPb4u0V/Ci1jYVvED6IbgxHMacA==", - "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/taquito": "^16.2.0", - "@taquito/utils": "^16.2.0", - "@types/bn.js": "^5.1.1", - "bip39": "3.0.4", - "elliptic": "^6.5.4", - "pbkdf2": "^3.1.2", - "typedarray-to-buffer": "^4.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/taquito": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-16.2.0.tgz", - "integrity": "sha512-nkenSPUcOrivbeg1uxmUu9BIweVjjVchywH3NfZWajZ3W9sOiIe+IwLGJ2H5FPD2LZrt0X9zpFEaLlyDDZEVUQ==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@taquito/core": "^16.2.0", - "@taquito/http-utils": "^16.2.0", - "@taquito/local-forging": "^16.2.0", - "@taquito/michel-codec": "^16.2.0", - "@taquito/michelson-encoder": "^16.2.0", - "@taquito/rpc": "^16.2.0", - "@taquito/utils": "^16.2.0", - "bignumber.js": "^9.1.0", - "rxjs": "^6.6.3" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@taquito/utils": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-16.2.0.tgz", - "integrity": "sha512-Oa9oV0wwBHpgcVHTfINwXGcUlS1EVjCyBR9ntTVvYu6AqdktdS3N+6PPX+MaMt8eXT2bnEfXPWJKjA9I+yYljA==", - "dev": true, - "dependencies": { - "@stablelib/blake2b": "^1.0.1", - "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^16.2.0", - "@types/bs58check": "^2.1.0", - "bignumber.js": "^9.1.0", - "blakejs": "^1.2.1", - "bs58check": "^2.1.2", - "buffer": "^6.0.3", - "elliptic": "^6.5.4", - "typedarray-to-buffer": "^4.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==", - "dev": true - }, - "node_modules/@taqueria/plugin-contract-types/node_modules/bip39": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz", - "integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@taqueria/plugin-contract-types/-/plugin-contract-types-0.40.0.tgz", + "integrity": "sha512-JOj8SF3/1SZzksV+mAdRWWrhVhqwh9ayd3PStFQiDuEE5g9iGx2n8mB8t/eBiOIjOp944l5K80C+Q385QpIlrw==", "dev": true, "dependencies": { - "@types/node": "11.11.6", - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1" + "@taqueria/node-sdk": "^0.40.0", + "@taquito/michel-codec": "^17.3.1", + "@taquito/signer": "^17.3.1", + "@taquito/taquito": "^17.3.1", + "bignumber.js": "^9.1.2", + "fast-glob": "^3.3.1" } }, "node_modules/@taqueria/plugin-ligo": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-ligo/-/plugin-ligo-0.37.0.tgz", - "integrity": "sha512-MW2TFF2gQTs6sH4CzR/CNlGBvTYXk8NRsUrTvhcgf//aJfP2Lnr/fvF2y8OnrdKfL17UHKb8sqvEzK6flvAOnA==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@taqueria/plugin-ligo/-/plugin-ligo-0.40.0.tgz", + "integrity": "sha512-nFR+88vl1aG+hPlqjfwURccHJYQ7BcTs12w4mV8mSxYxSY7ISvo6H98Y/4Rf48PaYdnUlFXLuB692OHpg1AdQQ==", "dev": true, "dependencies": { - "@taqueria/node-sdk": "^0.37.0", - "fast-glob": "^3.2.12" + "@taqueria/node-sdk": "^0.40.0", + "fast-glob": "^3.3.1" } }, - "node_modules/@taqueria/plugin-taquito": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-taquito/-/plugin-taquito-0.37.0.tgz", - "integrity": "sha512-BWGliTJVbh7eNk/DW+9oKs4nb8PTmeTmN7Pw1HK1oulIDupY6aich/29+WHPJxxHP01D5ZurQgHvwYG5P3mD7g==", + "node_modules/@taqueria/plugin-octez-client": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@taqueria/plugin-octez-client/-/plugin-octez-client-0.40.0.tgz", + "integrity": "sha512-/1Egm3a/V28kMGz+zf+rw/TndnUijnHzp97ELDc6wqFujtcEOBAi2omhEaPQRFk9qD2y0SnMiElXl75Mprc2Kg==", "dev": true, "dependencies": { - "@taqueria/node-sdk": "^0.37.0", - "@taquito/michel-codec": "^17.1.0", - "@taquito/signer": "^17.1.0", - "@taquito/taquito": "^17.1.0", - "fast-glob": "^3.2.12" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/http-utils": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-17.1.1.tgz", - "integrity": "sha512-Bp0MifEqXHln9MWI6v/3rMNlO5N5mTpN+AbA/8uQeIKoDg3/H9yoxihg91TB1rhaG81PqyqxuF3OQ+/rvDmIxg==", - "dev": true, - "dependencies": { - "@taquito/core": "^17.1.1", - "axios": "0.26.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/local-forging": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-17.1.1.tgz", - "integrity": "sha512-CP5+24QNffvRh2SymYs0POZl001FdbwezEZBWnMdQkI3oKoOqmMYeTprhi/lYOb3oK7Y7kF0FBUhN2CfTt3Itw==", - "dev": true, - "dependencies": { - "@taquito/core": "^17.1.1", - "@taquito/utils": "^17.1.1", - "bignumber.js": "^9.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/michel-codec": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-17.1.1.tgz", - "integrity": "sha512-f21XWLa1PMovCgJTLo3jKUHdeonkeBt9JD6QFY5gIUi4uWdA6UYTst23P0YkIENmB4YXnO50wz/rrEjeyAhHeQ==", - "dev": true, - "dependencies": { - "@taquito/core": "^17.1.1" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/michelson-encoder": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-17.1.1.tgz", - "integrity": "sha512-pQUJslapmOQorwLcy8wvaZIpq6I1taeva0avL9u3jo7aM3ZENozL1/BYPlCYA7jtEYvuuw2hCRqyxzg41HqWXw==", - "dev": true, - "dependencies": { - "@taquito/rpc": "^17.1.1", - "@taquito/utils": "^17.1.1", - "bignumber.js": "^9.1.0", - "fast-json-stable-stringify": "^2.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/rpc": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-17.1.1.tgz", - "integrity": "sha512-yJ2LZYc65GMk0XdOHFFIora7I1Q4XeYG/5oH8n8HoSQIeuwFhjSBGnrwWr5fQf503lKmjHyiuftziY4mkVumGg==", - "dev": true, - "dependencies": { - "@taquito/core": "^17.1.1", - "@taquito/http-utils": "^17.1.1", - "@taquito/utils": "^17.1.1", - "bignumber.js": "^9.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/signer": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/signer/-/signer-17.1.1.tgz", - "integrity": "sha512-eeA/BCrFmqNGryw3BdjQxLoSpbV0SVf8UFiBXOsXSYdXI6leg/jQrn6KHSrAeM8nksoLnz0y9tDt0g4Q7gMAeA==", - "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/taquito": "^17.1.1", - "@taquito/utils": "^17.1.1", - "@types/bn.js": "^5.1.1", - "bip39": "3.0.4", - "elliptic": "^6.5.4", - "pbkdf2": "^3.1.2", - "typedarray-to-buffer": "^4.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/taquito": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-17.1.1.tgz", - "integrity": "sha512-BjkjaoaXVdi92ImDfsh9jRpXTD/4NrFcaB4PcpPpfdtX/jIa2098MIH9Zdm/MdPmy9rtaZcHRej4B+BWJJ7JXg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@taquito/core": "^17.1.1", - "@taquito/http-utils": "^17.1.1", - "@taquito/local-forging": "^17.1.1", - "@taquito/michel-codec": "^17.1.1", - "@taquito/michelson-encoder": "^17.1.1", - "@taquito/rpc": "^17.1.1", - "@taquito/utils": "^17.1.1", - "bignumber.js": "^9.1.0", - "rxjs": "^7.8.1" + "@taqueria/node-sdk": "^0.40.0", + "fast-glob": "^3.3.1" }, "engines": { "node": ">=16" } }, - "node_modules/@taqueria/plugin-taquito/node_modules/@taquito/utils": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-17.1.1.tgz", - "integrity": "sha512-KcK7Qa2+SCcevxSJixA3utDtlPYS5DGXpZdMlrAjwjozMiuDGSLM63D1CrW/ojYI0t3tPuErty10cPhURZ+d4A==", - "dev": true, - "dependencies": { - "@stablelib/blake2b": "^1.0.1", - "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^17.1.1", - "@types/bs58check": "^2.1.0", - "bignumber.js": "^9.1.0", - "blakejs": "^1.2.1", - "bs58check": "^2.1.2", - "buffer": "^6.0.3", - "elliptic": "^6.5.4", - "typedarray-to-buffer": "^4.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==", - "dev": true - }, - "node_modules/@taqueria/plugin-taquito/node_modules/axios": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz", - "integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.8" - } - }, - "node_modules/@taqueria/plugin-taquito/node_modules/bip39": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz", - "integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==", - "dev": true, - "dependencies": { - "@types/node": "11.11.6", - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1" - } - }, - "node_modules/@taqueria/plugin-taquito/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/@taqueria/plugin-tezos-client": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@taqueria/plugin-tezos-client/-/plugin-tezos-client-0.37.0.tgz", - "integrity": "sha512-TBGNCfNISwmYR+YRfTnPN30zVhUzojmuG0oJzgTNg7G9r+2CIB+n+mikJl+h9VT9suxnmF8uiN4kZZ1HwHAlOg==", + "node_modules/@taqueria/plugin-taquito": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@taqueria/plugin-taquito/-/plugin-taquito-0.40.0.tgz", + "integrity": "sha512-ecqctFHjcQlZGQJxz+Fx3BtgpzVqtf/lsFo6tQ6EAKNE9pPRFGKELYMRjhGpO/mbhFPHbt9kcKtD36yBV0fRlQ==", "dev": true, "dependencies": { - "@taqueria/node-sdk": "^0.37.0", - "fast-glob": "^3.2.12" + "@taqueria/node-sdk": "^0.40.0", + "@taquito/michel-codec": "^17.3.1", + "@taquito/signer": "^17.3.1", + "@taquito/taquito": "^17.3.1", + "fast-glob": "^3.3.1", + "wtfnode": "^0.9.1" }, "engines": { "node": ">=16" } }, "node_modules/@taqueria/protocol": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@taqueria/protocol/-/protocol-0.37.0.tgz", - "integrity": "sha512-tRmx1O3ZV8JrlnyUuF35n0XoowE1pp7ZTKKi5wSQMIgVOPC/drjuh0hd0EJnvx/EFat85nH2itcJrQ1gTd1+LQ==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@taqueria/protocol/-/protocol-0.40.0.tgz", + "integrity": "sha512-IDCWf1WkYRTrDN08pg0w0AhRsgDS7yu7szH8H5mZAMESxOnOUPwAnjdpVD1Olgv8xqKgeGOMM5wjlsLglyOjWg==", "dev": true, "dependencies": { "@peculiar/webcrypto": "^1.4.3", "batching-toposort": "^1.2.0", "fluture": "^14.0.0", - "i18next": "^21.10.0", - "rambda": "^7.5.0", - "rambdax": "^8.1.0", - "zod": "^3.21.4" + "i18next": "^23.5.1", + "rambda": "^8.3.0", + "rambdax": "^10.0.0", + "zod": "^3.22.2" } }, "node_modules/@taquito/core": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@taquito/core/-/core-17.1.1.tgz", - "integrity": "sha512-ib+dzHbVT+0maYGAVdeIk9v9CNkOiB5j8CwnHUygBkEajoOdWTPlsrldRhRTAOnbj+iQk0kdkUECD6KY6iNknw==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/core/-/core-17.3.1.tgz", + "integrity": "sha512-dk8ZXuZktfoIV5ESUx3mPkJxLBVL7o3CXLsaVoiPIu2nyd4I/VNkPh+aIOrhxHSVPBib3sVYN0Pc2a8ZO+0gsg==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/@taquito/http-utils": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-15.1.0.tgz", - "integrity": "sha512-Uug5hN0XvMlFFN+rxSMW+Y9Z8pw5uqHRDZC83eLOBSijbpMo+ScG/2nKkC8MUUrqLaLeHru1HD4kT5DHc1fI+A==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-17.3.1.tgz", + "integrity": "sha512-lHwkNM1sx1HmzJHuxQy3lxaksZH/Jqxq5cYEPJAeCzEj68TD4T4X2rcVPpa0b6Qka5mQgLITCbyFE+RUg+orgA==", "dev": true, "dependencies": { - "@vespaiach/axios-fetch-adapter": "github:ecadlabs/axios-fetch-adapter", - "axios": "^0.26.0" + "@taquito/core": "^17.3.1", + "axios": "0.26.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/local-forging": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-15.1.0.tgz", - "integrity": "sha512-ib/2RqtxQQC9SjyTB9T5OSc5yUx9GUSdMOA4dmtiiFcN2+AG+aw7ixn6Hjt9Td8ZIOPt9H6HkyTypKrX7+cENw==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-17.3.1.tgz", + "integrity": "sha512-1pBbN8g2Jhq7bxWW3diRC+llL5TA1/m9W2za75IAl2sv5oo8ttXVla4XY8yapLu/yeOWrb5ta7yvfEZ5x2ZeOw==", "dev": true, "dependencies": { - "@taquito/utils": "^15.1.0", + "@taquito/core": "^17.3.1", + "@taquito/utils": "^17.3.1", "bignumber.js": "^9.1.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/michel-codec": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-15.1.0.tgz", - "integrity": "sha512-wKucIhs7vhaq5H+YSF2f6Qu9+g+QiEL6MPc5ROpxBrXJTeKSwBOEIpfqcKfkfMuecJyHZJW3glNfkpAVTCgkxg==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-17.3.1.tgz", + "integrity": "sha512-dxhrqn+/VBzkhL+bhLO9bVb1r/NKdvSYEoXRWgszNT+enVlokkFBM4kXcvGlFUZklaSiw0dQYd1Zk0sDMkr1sw==", "dev": true, + "dependencies": { + "@taquito/core": "^17.3.1" + }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/michelson-encoder": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-15.1.0.tgz", - "integrity": "sha512-uQMEu3g+8WcYb5ZV6+XGvoWJhKoNxU0F2RqodLJB7UxQ1rI/OMa+VlxSLMt4niIxpKXqnO9j4tD7Y4mPC3ufaA==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-17.3.1.tgz", + "integrity": "sha512-PaJYlZnjqDwjvK2qC4j9icqcGLoHHQygnGLs9lPV1quAV1v9yWPe6ABK+miuq2vv4WDMFH6amaXBtLimgPDcuQ==", "dev": true, "dependencies": { - "@taquito/rpc": "^15.1.0", - "@taquito/utils": "^15.1.0", + "@taquito/rpc": "^17.3.1", + "@taquito/utils": "^17.3.1", "bignumber.js": "^9.1.0", "fast-json-stable-stringify": "^2.1.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/rpc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-15.1.0.tgz", - "integrity": "sha512-OeQA8QwT+s6IUmLaF5yeWruPYzWi/DVCA3kl+AaQ8IFfCMzmAW/MszbbNkJSzHpY2p4jPBwdRNxg3qeJdL482A==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-17.3.1.tgz", + "integrity": "sha512-VHY5qgUVT4RDXDv7H8DQrrMk1tfnJ6m+BFHmJxYCe7WQCCr8u2TlN0X2N95QhM+LG0LXL/LFlzhQLRBOxLnxsw==", "dev": true, "dependencies": { - "@taquito/http-utils": "^15.1.0", - "@taquito/utils": "^15.1.0", + "@taquito/core": "^17.3.1", + "@taquito/http-utils": "^17.3.1", + "@taquito/utils": "^17.3.1", "bignumber.js": "^9.1.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/signer": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/signer/-/signer-15.1.0.tgz", - "integrity": "sha512-VP7hS8cYQ6cMerVkbD5X3AqpoIXvh72xNuv3++R4reEjdl+E3VWs1CZZGnJj6yzlFV21SrdGKSILx8Rl3Ql4DA==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/signer/-/signer-17.3.1.tgz", + "integrity": "sha512-9fwUuL8vEtzRAc0wX2rYNTkCd4Rhgp2JPrQ7aLz6QWZg0qa43TwjQ1f5o862ryp8PkmJBcA/z9pbD/XHizXfOQ==", "dev": true, "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -788,46 +450,48 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/taquito": "^15.1.0", - "@taquito/utils": "^15.1.0", + "@taquito/taquito": "^17.3.1", + "@taquito/utils": "^17.3.1", "@types/bn.js": "^5.1.1", - "bip39": "^3.0.4", + "bip39": "3.0.4", "elliptic": "^6.5.4", "pbkdf2": "^3.1.2", "typedarray-to-buffer": "^4.0.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/taquito": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-15.1.0.tgz", - "integrity": "sha512-2AXWeNoXsmMOSkJVXtXjOlJkS+hKXITaSybMA6nJuS1YWY4e7iAr678Y6UgVEHRJxeGohX4R4Ww12Ymr3Sfedg==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-17.3.1.tgz", + "integrity": "sha512-9CnIJv5z6KmYYhycOSTpSh51hH818yzXMjr5iR4Q2raWEtWQHYeXoDcVec1dkI+IITm9cQpLp5Gm++smSBElOA==", "dev": true, "hasInstallScript": true, "dependencies": { - "@taquito/http-utils": "^15.1.0", - "@taquito/local-forging": "^15.1.0", - "@taquito/michel-codec": "^15.1.0", - "@taquito/michelson-encoder": "^15.1.0", - "@taquito/rpc": "^15.1.0", - "@taquito/utils": "^15.1.0", + "@taquito/core": "^17.3.1", + "@taquito/http-utils": "^17.3.1", + "@taquito/local-forging": "^17.3.1", + "@taquito/michel-codec": "^17.3.1", + "@taquito/michelson-encoder": "^17.3.1", + "@taquito/rpc": "^17.3.1", + "@taquito/utils": "^17.3.1", "bignumber.js": "^9.1.0", - "rxjs": "^6.6.3" + "rxjs": "^7.8.1" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@taquito/utils": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-15.1.0.tgz", - "integrity": "sha512-lqVThoFMmOKPg9jyREr4A63cpeckf5esCwOyOAW3sm+yCxD9s5khnBPtH8s52cRVnChFdwk/eqmADka9gat5hw==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-17.3.1.tgz", + "integrity": "sha512-NLSFOaZbbs5L7aSV+vgCxj6celHBYLkzwmGvPiCm/mDSj1a1i4bgt8fJ6DbtwDiAmiA9tXPmRileRC4iPEaewg==", "dev": true, "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", + "@taquito/core": "^17.3.1", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.0", "blakejs": "^1.2.1", @@ -837,7 +501,7 @@ "typedarray-to-buffer": "^4.0.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=16" } }, "node_modules/@types/bn.js": { @@ -864,16 +528,6 @@ "integrity": "sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg==", "dev": true }, - "node_modules/@vespaiach/axios-fetch-adapter": { - "name": "@taquito/axios-fetch-adapter", - "version": "0.3.1", - "resolved": "git+ssh://git@github.com/ecadlabs/axios-fetch-adapter.git#167684f522e90343b9f3439d9a43ac571e2396f6", - "dev": true, - "license": "MIT", - "peerDependencies": { - "axios": ">=0.26.0" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -913,9 +567,9 @@ } }, "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz", + "integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==", "dev": true, "dependencies": { "follow-redirects": "^1.14.8" @@ -960,23 +614,32 @@ } }, "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "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==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz", + "integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==", "dev": true, "dependencies": { - "@noble/hashes": "^1.2.0" + "@types/node": "11.11.6", + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1" } }, + "node_modules/bip39/node_modules/@types/node": { + "version": "11.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", + "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==", + "dev": true + }, "node_modules/blakejs": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", @@ -1093,15 +756,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", @@ -1129,6 +783,15 @@ "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/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -1199,6 +862,29 @@ "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.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1225,9 +911,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -1244,6 +930,18 @@ } } }, + "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", @@ -1301,9 +999,9 @@ } }, "node_modules/i18next": { - "version": "21.10.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.10.0.tgz", - "integrity": "sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg==", + "version": "23.5.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.5.1.tgz", + "integrity": "sha512-JelYzcaCoFDaa+Ysbfz2JsGAKkrHiMG6S61+HLBUEIPaF40WMwW9hCPymlQGrP+wWawKxKPuSuD71WZscCsWHg==", "dev": true, "funding": [ { @@ -1320,7 +1018,7 @@ } ], "dependencies": { - "@babel/runtime": "^7.17.2" + "@babel/runtime": "^7.22.5" } }, "node_modules/ieee754": { @@ -1388,12 +1086,6 @@ "node": ">=0.12.0" } }, - "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", @@ -1439,24 +1131,41 @@ "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", "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": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "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": { - "whatwg-url": "^5.0.0" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": "4.x || >=6.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, "node_modules/pbkdf2": { @@ -1487,27 +1196,13 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/project-name-generator": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/project-name-generator/-/project-name-generator-2.1.9.tgz", - "integrity": "sha512-QmLHqz2C4VHmAyDEAFlVfnuWAHr4vwZhK2bbm4IrwuHNzNKOdG9b4U+NmQbsm1uOoV4kGWv7+FVLsu7Bb/ieYQ==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "dependencies": { - "commander": "^6.1.0", - "lodash": "^4.17.20" - }, - "bin": { - "project-name-generator": "src/generator-bin.js" - } - }, "node_modules/pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "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.4.0" + "tslib": "^2.6.1" } }, "node_modules/pvutils": { @@ -1540,15 +1235,15 @@ ] }, "node_modules/rambda": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", - "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-8.4.0.tgz", + "integrity": "sha512-HSbOiyvCQgHKPcKO8Sknjj341vVUmetRwOh+4h0t/DVmAfQS3v3HMtWHtu3l2Awdxu9B4iJP2uAJTwp7eLB7zw==", "dev": true }, "node_modules/rambdax": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/rambdax/-/rambdax-8.1.0.tgz", - "integrity": "sha512-8TQS3jorlSSubddKTyVrsp9mevF2WMBtdEPjp9Bk8ipVijD5/9gVXGgBF4d0JzO6kzegCFYWANrbHLyKLE6YVA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/rambdax/-/rambdax-10.0.0.tgz", + "integrity": "sha512-yNlWz9g4h6C2+49r1L+L9WZLcw3b3mQnxZQfcyqon8hy52Ie6hsWeuxO9/MNXTbqWB2RuSzO5MM3rVSsPKsqfw==", "dev": true }, "node_modules/randombytes": { @@ -1575,9 +1270,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, "node_modules/require-directory": { @@ -1633,23 +1328,14 @@ } }, "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "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": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" + "tslib": "^2.1.0" } }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1695,6 +1381,12 @@ "sha.js": "bin.js" } }, + "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", @@ -1713,6 +1405,12 @@ "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", @@ -1787,12 +1485,6 @@ "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.0.5", "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.0.5.tgz", @@ -1800,9 +1492,9 @@ "dev": true }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, "node_modules/typedarray-to-buffer": { @@ -1831,6 +1523,15 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/webcrypto-core": { "version": "1.7.7", "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.7.tgz", @@ -1844,20 +1545,20 @@ "tslib": "^2.4.0" } }, - "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==", + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" } }, "node_modules/wrap-ansi": { @@ -1877,6 +1578,15 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wtfnode": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/wtfnode/-/wtfnode-0.9.1.tgz", + "integrity": "sha512-Ip6C2KeQPl/F3aP1EfOnPoQk14Udd9lffpoqWDNH3Xt78svxPbv53ngtmtfI0q2Te3oTq79XKTnRNXVIn/GsPA==", + "dev": true, + "bin": { + "wtfnode": "proxy.js" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -1914,9 +1624,9 @@ } }, "node_modules/zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "version": "3.22.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.2.tgz", + "integrity": "sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==", "dev": true, "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/solution/package.json b/solution/package.json index a65fe16..8372769 100644 --- a/solution/package.json +++ b/solution/package.json @@ -10,9 +10,9 @@ "author": "", "license": "ISC", "devDependencies": { - "@taqueria/plugin-contract-types": "^0.37.0", - "@taqueria/plugin-ligo": "^0.37.0", - "@taqueria/plugin-taquito": "^0.37.0", - "@taqueria/plugin-tezos-client": "^0.37.0" + "@taqueria/plugin-contract-types": "^0.40.0", + "@taqueria/plugin-ligo": "^0.40.0", + "@taqueria/plugin-octez-client": "^0.40.0", + "@taqueria/plugin-taquito": "^0.40.0" } } From e281af6874d5309dd5347eab43751c62fc749aeb Mon Sep 17 00:00:00 2001 From: Benjamin Fuentes Date: Wed, 27 Sep 2023 11:07:32 +0200 Subject: [PATCH 3/4] fix parameter issue --- solution/.taq/development-state.json | 106 +++++++----------- solution/contracts/pokeGame.jsligo | 14 +-- .../contracts/pokeGame.parameterList.jsligo | 1 - solution/contracts/proxy.parameterList.jsligo | 21 ++-- 4 files changed, 57 insertions(+), 85 deletions(-) diff --git a/solution/.taq/development-state.json b/solution/.taq/development-state.json index ecc3b92..8f286a3 100644 --- a/solution/.taq/development-state.json +++ b/solution/.taq/development-state.json @@ -12,17 +12,6 @@ } ] }, - "@taqueria/plugin-ligo.test.1695646630863": { - "task": "test", - "plugin": "@taqueria/plugin-ligo", - "time": 1695646630864, - "output": [ - { - "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" - } - ] - }, "@taqueria/plugin-ligo.test.1695646773177": { "task": "test", "plugin": "@taqueria/plugin-ligo", @@ -56,97 +45,69 @@ } ] }, - "@taqueria/plugin-ligo.compile.1695801475148": { - "task": "compile", + "@taqueria/plugin-ligo.test.1695801566862": { + "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695801475148, + "time": 1695801566862, "output": [ { - "contract": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz" - }, - { - "contract": "pokeGame.storageList.jsligo", - "artifact": "artifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\n" - }, - { - "contract": "pokeGame.parameterList.jsligo", - "artifact": "No parameter expressions found\n" + "contract": "unit_pokeGame.jsligo", + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" } ] }, - "@taqueria/plugin-ligo.compile.1695801509445": { + "@taqueria/plugin-ligo.compile.1695804856728": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695801509445, + "time": 1695804856728, "output": [ { - "contract": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz" - }, - { - "contract": "pokeGame.storageList.jsligo", - "artifact": "" - }, - { - "contract": "pokeGame.parameterList.jsligo", - "artifact": "No parameter expressions found\n" + "source": "proxy.jsligo", + "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled" } ] }, - "@taqueria/plugin-ligo.compile.1695801525146": { + "@taqueria/plugin-ligo.compile.1695805346470": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695801525146, + "time": 1695805346470, "output": [ { - "contract": "proxy.jsligo", - "artifact": "artifacts/proxy.tz" - }, - { - "contract": "proxy.storageList.jsligo", - "artifact": "artifacts/proxy.default_storage.tz\n" - }, - { - "contract": "proxy.parameterList.jsligo", - "artifact": "" + "source": "proxy.jsligo", + "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled" } ] }, - "@taqueria/plugin-ligo.compile.1695801554587": { + "@taqueria/plugin-ligo.compile.1695805399435": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695801554587, + "time": 1695805399435, "output": [ { - "contract": "proxy.jsligo", - "artifact": "artifacts/proxy.tz" - }, - { - "contract": "proxy.storageList.jsligo", - "artifact": "" - }, - { - "contract": "proxy.parameterList.jsligo", - "artifact": "" + "source": "proxy.jsligo", + "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nartifacts/proxy.parameter.initProxyWithV1.tz\nartifacts/proxy.parameter.initProxyWithV2.tz\nartifacts/proxy.parameter.changeVersionV1ToV2.tz" } ] }, - "@taqueria/plugin-ligo.test.1695801566862": { - "task": "test", + "@taqueria/plugin-ligo.compile.1695805573470": { + "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695801566862, + "time": 1695805573470, "output": [ { - "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" + }, + { + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" } ] }, - "@taqueria/plugin-ligo.compile.1695802290507": { + "@taqueria/plugin-ligo.compile.1695805618323": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695802290507, + "time": 1695805618323, "output": [ { "source": "pokeGame.jsligo", @@ -157,6 +118,17 @@ "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" } ] + }, + "@taqueria/plugin-ligo.test.1695805641053": { + "task": "test", + "plugin": "@taqueria/plugin-ligo", + "time": 1695805641053, + "output": [ + { + "contract": "unit_pokeGame.jsligo", + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + } + ] } } } \ No newline at end of file diff --git a/solution/contracts/pokeGame.jsligo b/solution/contracts/pokeGame.jsligo index 3f02c83..0b619a9 100644 --- a/solution/contracts/pokeGame.jsligo +++ b/solution/contracts/pokeGame.jsligo @@ -36,7 +36,7 @@ const poke = ( ticketOwnership ); return match(t) { - when (None): + when (None()): failwith("User does not have tickets => not allowed") when (Some(_t)): [ @@ -80,7 +80,7 @@ const pokeAndGetFeedback = ( let feedbackOpt: option = Tezos.call_view("getView", "feedback", oracleAddress); return match(t) { - when (None): + when (None()): failwith("User does not have tickets => not allowed") when (Some(_t)): match(feedbackOpt) { @@ -104,7 +104,7 @@ const pokeAndGetFeedback = ( } ] } - when (None): + when (None()): failwith("Cannot find view feedback on given oracle address") } }; @@ -175,7 +175,7 @@ export const main = (action: parameter, store: storage): return_ => { const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; const canBeCalled: bool = match(tzip18.contractNext) { - when (None): + when (None()): false // I am the last version, but I cannot be called directly (or is my proxy, see later) when (Some(contract)): @@ -197,7 +197,7 @@ export const main = (action: parameter, store: storage): return_ => { } else { if (action.entrypointName == "PokeAndGetFeedback") { return match(Bytes.unpack(action.payload) as option
) { - when (None): + when (None()): failwith("Cannot find the address parameter for PokeAndGetFeedback") when (Some(other)): pokeAndGetFeedback( @@ -208,7 +208,7 @@ export const main = (action: parameter, store: storage): return_ => { } else { if (action.entrypointName == "Init") { return match(Bytes.unpack(action.payload) as option<[address, nat]>) { - when (None): + when (None()): failwith("Cannot find the address parameter for changeVersion") when (Some(initParam)): init( @@ -219,7 +219,7 @@ export const main = (action: parameter, store: storage): return_ => { } else { if (action.entrypointName == "changeVersion") { return match(Bytes.unpack(action.payload) as option
) { - when (None): + when (None()): failwith("Cannot find the address parameter for changeVersion") when (Some(other)): changeVersion( diff --git a/solution/contracts/pokeGame.parameterList.jsligo b/solution/contracts/pokeGame.parameterList.jsligo index 03fe69c..befa5d8 100644 --- a/solution/contracts/pokeGame.parameterList.jsligo +++ b/solution/contracts/pokeGame.parameterList.jsligo @@ -2,4 +2,3 @@ // Define your parameter values as a list of LIGO variable definitions // E.g. const aParameterValue : aParameterType = (Increment (1)); - diff --git a/solution/contracts/proxy.parameterList.jsligo b/solution/contracts/proxy.parameterList.jsligo index df8b6b5..f977610 100644 --- a/solution/contracts/proxy.parameterList.jsligo +++ b/solution/contracts/proxy.parameterList.jsligo @@ -1,5 +1,6 @@ -#import "proxy.jsligo" "Proxy" -const initProxyWithV1: parameter_of Proxy = +#import "proxy.jsligo" "Contract" + +const initProxyWithV1: parameter_of Contract = Upgrade( [ list( @@ -60,12 +61,12 @@ const initProxyWithV1: parameter_of Proxy = ) } ] - ) as list, - None() as option + ) as list, + None() as option ] ); -const initProxyWithV2: parameter_of Proxy = +const initProxyWithV2: parameter_of Contract = Upgrade( [ list( @@ -126,20 +127,20 @@ const initProxyWithV2: parameter_of Proxy = ) } ] - ) as list, - None() as option + ) as list, + None() as option ] ); -const changeVersionV1ToV2: parameter_of Proxy = +const changeVersionV1ToV2: parameter_of Contract = Upgrade( [ - list([]) as list, + list([]) as list, Some( { oldAddr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address, newAddr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as address } - ) as option + ) as option ] ); From e1a8ef48d9f6e30cdbbb46aebb2a5be4c43e4882 Mon Sep 17 00:00:00 2001 From: Benjamin Fuentes Date: Fri, 29 Sep 2023 17:23:27 +0200 Subject: [PATCH 4/4] long review of V1 --- README.md | 939 ++++++------ solution/.ligo/repository_id | 2 +- solution/.taq/config.json | 8 +- solution/.taq/development-state.json | 106 +- solution/.taq/state.json | 260 ++-- solution/.taq/testing-state.json | 105 +- solution/app/.ligo/repository_id | 1 + solution/app/package.json | 14 +- solution/app/src/pokeGame.code.ts | 4 +- solution/app/src/pokeGame.types.ts | 8 +- solution/app/src/proxy.code.ts | 2 +- solution/app/src/proxy.types.ts | 36 +- solution/app/vite.config.ts | 51 +- solution/app/yarn.lock | 1299 ++++++++--------- solution/contracts/.ligo/repository_id | 1 - solution/contracts/mutation_pokeGame.jsligo | 47 + solution/contracts/pokeGame.jsligo | 28 +- .../contracts/pokeGame.parameterList.jsligo | 10 +- .../contracts/pokeGame.storageList.jsligo | 10 +- solution/contracts/pokeGameLambda.jsligo | 18 +- solution/contracts/proxy.jsligo | 20 +- solution/contracts/proxy.parameterList.jsligo | 24 +- solution/contracts/unit_pokeGame.jsligo | 37 +- solution/package-lock.json | 12 +- 24 files changed, 1527 insertions(+), 1515 deletions(-) create mode 100644 solution/app/.ligo/repository_id delete mode 100644 solution/contracts/.ligo/repository_id create mode 100644 solution/contracts/mutation_pokeGame.jsligo diff --git a/README.md b/README.md index 08588f5..fe75cc8 100644 --- a/README.md +++ b/README.md @@ -140,27 +140,28 @@ const pokeAndGetFeedback = (oracleAddress: address, store: storage): return_ => ); let feedbackMessage = { receiver: oracleAddress, - feedback: feedbackFunction(oracleAddress), + feedback: feedbackFunction(oracleAddress) }; - - return match(t, { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => [ - list([]) as list, - { - feedback, - pokeTraces: Map.add(Tezos.get_source(), feedbackMessage, pokeTraces), - ticketOwnership: tom, - feedbackFunction, - } - ], - }); + return match(t) { + when (None()): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + [ + list([]) as list, + { + feedback, + pokeTraces: Map.add(Tezos.get_source(), feedbackMessage, pokeTraces), + ticketOwnership: tom, + feedbackFunction + } + ] + } }; ``` Note the line with `feedbackFunction(oracleAddress)`, so we call the lambda and still pass the address parameter -On a first time we will inject the old code to check all still works and then we will modify the lamda code on the storage to check that behavior has changed. +On a first time we will inject the old code to check all still works and then we will modify the lambda code on the storage to check that behavior has changed. To modify the lambda function code we need an extra admin entrypoint `updateFeedbackFunction` @@ -170,17 +171,17 @@ const updateFeedbackFunction = (newCode: feedbackFunction, store: storage): retu const { pokeTraces, feedback, ticketOwnership, feedbackFunction } = store; ignore(feedbackFunction); return [ - list([]), - { pokeTraces, feedback, ticketOwnership, feedbackFunction: newCode } -]; -} + list([]), + { pokeTraces, feedback, ticketOwnership, feedbackFunction: newCode } + ] +}; ``` As we broke the storage definition earlier, fix all storage field missing warnings on `poke` and `init` functions ```ligolang @entry -const poke = (_: parameter, store: storage): return_ => { +const poke = (_: unit, store: storage): return_ => { const { pokeTraces, feedback, ticketOwnership, feedbackFunction } = store; const [t, tom]: [option>, map>] = Map.get_and_update( @@ -188,26 +189,24 @@ const poke = (_: parameter, store: storage): return_ => { None() as option>, ticketOwnership ); - return match( - t, - { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => - [ - list([]) as list, - { - feedback, - pokeTraces: Map.add( - Tezos.get_source(), - { receiver: Tezos.get_self_address(), feedback: "" }, - pokeTraces - ), - ticketOwnership: tom, - feedbackFunction, - } - ] - } - ) + return match(t) { + when (None()): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + [ + list([]) as list, + { + feedback, + pokeTraces: Map.add( + Tezos.get_source(), + { receiver: Tezos.get_self_address(), feedback: "" }, + pokeTraces + ), + ticketOwnership: tom, + feedbackFunction + } + ] + } }; @entry @@ -223,7 +222,12 @@ const init = ([a, ticketCount]: [address, nat], store: storage): return_ => { Option.unopt(Tezos.create_ticket("can_poke", ticketCount)); return [ list([]) as list, - { pokeTraces, feedback, ticketOwnership: Map.add(a, t, ticketOwnership) ,feedbackFunction} + { + pokeTraces, + feedback, + ticketOwnership: Map.add(a, t, ticketOwnership), + feedbackFunction + } ] } }; @@ -232,12 +236,27 @@ const init = ([a, ticketCount]: [address, nat], store: storage): return_ => { Change also the initial storage with the old initial value of the lambda function (i.e calling a view to get a feedback) ```ligolang -#include "pokeGame.jsligo" +#import "pokeGame.jsligo" "Contract" + const default_storage = { - pokeTraces : Map.empty as map, - feedback : "kiss", - ticketOwnership : Map.empty as map>, //ticket of claims - feedbackFunction : ((oracleAddress : address) : string => { return match( Tezos.call_view("feedback", unit, oracleAddress) as option , { Some : (feedback : string) => feedback, None : () => failwith("Cannot find view feedback on given oracle address") }); }) + pokeTraces: Map.empty as map, + feedback: "kiss", + ticketOwnership: Map.empty as map>, //ticket of claims + feedbackFunction: ( + (oracleAddress: address): string => { + return match( + Tezos.call_view("feedback", unit, oracleAddress) as + option + ) { + when (Some(feedback)): + feedback + when (None()): + failwith( + "Cannot find view feedback on given oracle address" + ) + }; + } + ) }; ``` @@ -247,7 +266,7 @@ Time to compile and play with the CLI ```bash npm i -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile pokeGame.jsligo ``` Redeploy to testnet @@ -260,7 +279,7 @@ taq deploy pokeGame.tz -e testing ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”‚ Contract ā”‚ Address ā”‚ Alias ā”‚ Balance In Mutez ā”‚ Destination ā”‚ ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ -ā”‚ pokeGame.tz ā”‚ KT1EsaXY2FhFu4TSUWX5PNLHc3Eq4FzEVHQG ā”‚ pokeGame ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ pokeGame.tz ā”‚ KT1VjFawYQ4JeEEAVchqaYK1NmXCENm2ufer ā”‚ pokeGame ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` @@ -288,24 +307,24 @@ Now, we update the lambda function in background with the CLI with our new admin Edit the file `pokeGame.parameterList.jsligo` ```ligolang -#import "pokeGame.jsligo" "PokeGame" -const default_parameter : parameter_of PokeGame = UpdateFeedbackFunction((_oracleAddress : address) : string => "YEAH!!!"); +#import "pokeGame.jsligo" "Contract" +const default_parameter : parameter_of Contract = UpdateFeedbackFunction((_oracleAddress : address) : string => "YEAH!!!"); ``` Compile all and call an init transaction ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile pokeGame.jsligo taq call pokeGame --param pokeGame.parameter.default_parameter.tz -e testing ``` ```logs -ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” -ā”‚ Contract Alias ā”‚ Contract Address ā”‚ Parameter ā”‚ Entrypoint ā”‚ Mutez Transfer ā”‚ Destination ā”‚ -ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ -ā”‚ pokeGame ā”‚ KT1FwYoUNAZVhf8Bct4qcAzs78A9SjBspfYy ā”‚ (Right (Right { DROP ; PUSH string "YEAH!!!" })) ā”‚ default ā”‚ 0 ā”‚ https://ghostnet.tezos.marigold.dev ā”‚ -ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ -ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ +ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” +ā”‚ Contract Alias ā”‚ Contract Address ā”‚ Parameter ā”‚ Entrypoint ā”‚ Mutez Transfer ā”‚ Destination ā”‚ +ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ +ā”‚ pokeGame ā”‚ KT1VjFawYQ4JeEEAVchqaYK1NmXCENm2ufer ā”‚ (Left { DROP ; PUSH string "YEAH!!!" }) ā”‚ default ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ +ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` Run the user sequence on the web page : @@ -418,127 +437,127 @@ export type storage = { }; ``` -Now, we will have to modify `parameter` type to be completely generic - -```ligolang -type parameter = { - entrypointName: string, - payload: bytes -}; -``` - -The parameter will be a string representing the entrypoint name and some generic bytes that will will need to cast later. -In a way, we break a bit compiler checks, but if we code well and cast stuff as earliest as possible then we mitigate risks - Fix all missing field tzip18 on storage structure in the file ```ligolang -@entry -const poke = (_: parameter, store: storage): return_ => { - const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; +const poke = ( + _: { entrypointName: string, payload: bytes }, + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { //extract opt ticket from map + const [t, tom]: [option>, map>] = Map.get_and_update( Tezos.get_source(), None() as option>, ticketOwnership ); + return match(t) { + when (None()): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + [ + list([]) as list, + { + //let t burn - return match(t, { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => [ - list([]) as list, - { - //let t burn - feedback, - pokeTraces: Map.add( - Tezos.get_source(), - { receiver: Tezos.get_self_address(), feedback: "" }, - pokeTraces - ), - ticketOwnership: tom, - tzip18, - } - ] - }); + feedback, + pokeTraces: Map.add( + Tezos.get_source(), + { receiver: Tezos.get_self_address(), feedback: "" }, + pokeTraces + ), + ticketOwnership: tom, + tzip18, + } + ] + }; }; @no_mutation -@entry -const pokeAndGetFeedback = (oracleAddress: address, store: storage): return_ => { - const { pokeTraces, feedback, ticketOwnership , tzip18} = store; +const pokeAndGetFeedback = ( + oracleAddress: address, + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { //extract opt ticket from map + const [t, tom]: [option>, map>] = Map.get_and_update( Tezos.get_source(), None() as option>, ticketOwnership ); - //Read the feedback view - let feedbackOpt: option = Tezos.call_view( - "getView", - "feedback", - oracleAddress - ); - return match(t, { - None: () => failwith("User does not have tickets => not allowed"), - Some: (_t: ticket) => - match(feedbackOpt, { - Some: (f: bytes) => { - let feedbackMessage = { - receiver: oracleAddress, - feedback: Option.unopt(Bytes.unpack(f) as option), - }; - return [ - list([]) as list, - { - feedback, - pokeTraces: Map.add( - Tezos.get_source(), - feedbackMessage, - pokeTraces - ), - ticketOwnership: tom, - tzip18, - } - ] - }, - None: () => - failwith("Cannot find view feedback on given oracle address"), - }), - }); + let feedbackOpt: option = + Tezos.call_view("getView", "feedback", oracleAddress); + return match(t) { + when (None()): + failwith("User does not have tickets => not allowed") + when (Some(_t)): + match(feedbackOpt) { + when (Some(f)): + do { + let feedbackMessage = { + receiver: oracleAddress, + feedback: Option.unopt(Bytes.unpack(f) as option), + }; + return [ + list([]) as list, + { + feedback, + pokeTraces: Map.add( + Tezos.get_source(), + feedbackMessage, + pokeTraces + ), + ticketOwnership: tom, + tzip18, + } + ] + } + when (None()): + failwith("Cannot find view feedback on given oracle address") + } + }; }; -@entry -const init = ([a, ticketCount]: [address, nat], store: storage): return_ => { - const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; - return ticketCount == (0 as nat) - ? [ - list([]) as list, - { - feedback, - pokeTraces, - ticketOwnership, - tzip18 - } - ] - : [ - list([]) as list, - { - feedback, - pokeTraces, - ticketOwnership: Map.add( - a, - Option.unopt(Tezos.create_ticket("can_poke", ticketCount)), - ticketOwnership - ), - tzip18, - } - ] +const init = ( + [a, ticketCount]: [address, nat], + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { + return ticketCount == (0 as nat) ? [ + list([]) as list, + { feedback, pokeTraces, ticketOwnership, tzip18 } + ] : [ + list([]) as list, + { + feedback, + pokeTraces, + ticketOwnership: Map.add( + a, + Option.unopt(Tezos.create_ticket("can_poke", ticketCount)), + ticketOwnership + ), + tzip18, + } + ] }; - ``` - The view call signature is different : @@ -547,71 +566,72 @@ const init = ([a, ticketCount]: [address, nat], store: storage): return_ => { - passing the viewname "feedback" (to dispatch to the correct function once you reach the code that will be executed) - finally, unpack the bytes result and cast it to string -As we are doing generic calls, we have to reuse a dispatch function and not use @entry, rewrite main function now +As we are doing generic calls, we have to use a `unique` dispatch function and not use multiple @entry + +Write a main function annotated with @entry. +The parameter will be a string representing the entrypoint name and some generic bytes that will will need to cast later. +In a way, we break a bit compiler checks, but if we code well and cast stuff as earliest as possible then we mitigate risks ```ligolang -export const main = ([action, store]: [parameter, storage]): return_ => { +@entry +export const main = (action: { entrypointName: string, payload: bytes }, store: storage): return_ => { //destructure the storage to avoid DUP - const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; - - const canBeCalled: bool = match(tzip18.contractNext, { - None: () => false, // I am the last version, but I cannot be called directly (or is my proxy, see later) - Some: (contract: address) => { - if (Tezos.get_sender() == contract) { - return true; - } // I am not the last but a parent contract is calling me - else { - return false; - } - }, // I am not the last version and a not-parent is trying to call me - }); - if (Tezos.get_sender() != tzip18.proxy && !canBeCalled){ - return failwith("Only the proxy or contractNext can call this contract");}; + const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; + const canBeCalled: bool = + match(tzip18.contractNext) { + when (None()): + false // I am the last version, but I cannot be called directly (or is my proxy, see later) + + when (Some(contract)): + do { + if (Tezos.get_sender() == contract) { + return true; + } // I am not the last but a parent contract is calling me + else { + return false; + } + } // I am not the last version and a not-parent is trying to call me + }; + if (Tezos.get_sender() != tzip18.proxy && ! canBeCalled) { + return failwith("Only the proxy or contractNext can call this contract"); + }; if (action.entrypointName == "Poke") { - return poke(action,[pokeTraces, feedback, ticketOwnership, tzip18]); + return poke(action, [pokeTraces, feedback, ticketOwnership, tzip18]); } else { if (action.entrypointName == "PokeAndGetFeedback") { - return match(Bytes.unpack(action.payload) as option
, { - None: () => - failwith("Cannot find the address parameter for PokeAndGetFeedback"), - Some: (other: address) => - pokeAndGetFeedback(other,[ - - pokeTraces, - feedback, - ticketOwnership, - tzip18 - ]), - }); + return match(Bytes.unpack(action.payload) as option
) { + when (None()): + failwith("Cannot find the address parameter for PokeAndGetFeedback") + when (Some(other)): + pokeAndGetFeedback( + other, + [pokeTraces, feedback, ticketOwnership, tzip18] + ) + }; } else { if (action.entrypointName == "Init") { - return match(Bytes.unpack(action.payload) as option<[address, nat]>, { - None: () => - failwith("Cannot find the address parameter for changeVersion"), - Some: (initParam: [address, nat]) => - init([initParam[0], - initParam[1]],[ - pokeTraces, - feedback, - ticketOwnership, - tzip18 - ]), - }); + return match(Bytes.unpack(action.payload) as option<[address, nat]>) { + when (None()): + failwith("Cannot find the address parameter for changeVersion") + when (Some(initParam)): + init( + [initParam[0], initParam[1]], + [pokeTraces, feedback, ticketOwnership, tzip18] + ) + }; } else { if (action.entrypointName == "changeVersion") { - return match(Bytes.unpack(action.payload) as option
, { - None: () => - failwith("Cannot find the address parameter for changeVersion"), - Some: (other: address) => - changeVersion(other,[ - pokeTraces, - feedback, - ticketOwnership, - tzip18 - ]), - }); + return match(Bytes.unpack(action.payload) as option
) { + when (None()): + failwith("Cannot find the address parameter for changeVersion") + when (Some(other)): + changeVersion( + other, + [pokeTraces, feedback, ticketOwnership, tzip18] + ) + }; } else { return failwith("Non-existant method"); } @@ -631,18 +651,16 @@ Add the last missing function changing the version of this contract and make it /** * Function called by a parent contract or administrator to set the current version on an old contract **/ -const changeVersion = ( newAddress : address , [ - - pokeTraces, - feedback, - ticketOwnership, - tzip18 -]: [ - map, - string, - map>, - TZIP18.tzip18 -]): return_ => { + +const changeVersion = ( + newAddress: address, + [pokeTraces, feedback, ticketOwnership, tzip18]: [ + map, + string, + map>, + TZIP18.tzip18 + ] +): return_ => { return [ list([]) as list, { @@ -659,7 +677,7 @@ Finally, change the view to a generic one and do a `if...else` on `viewName` arg ```ligolang @view -const getView = ([viewName, store]: [string, storage]): bytes => { +const getView = (viewName: string, store: storage): bytes => { if (viewName == "feedback") { return Bytes.pack(store.feedback); } else return failwith("View " + viewName + " not found on this contract"); @@ -668,27 +686,28 @@ const getView = ([viewName, store]: [string, storage]): bytes => { Change the initial storage -> Note : for the moment we set the proxy address to fake KT1 address because we have not yet deploy the proxy +> Note : for the moment we initialize the proxy address to a fake KT1 address because we have not yet deploy the proxy ```ligolang -#include "pokeGame.jsligo" +#import "pokeGame.jsligo" "Contract" + const default_storage = { - pokeTraces : Map.empty as map, - feedback : "kiss", - ticketOwnership : Map.empty as map>, //ticket of claims - tzip18 : { - proxy : "KT1NNmpuVCZYNQ9eFFNSRecuzxtvb8Zqx1Fk" as address, - version : 1 as nat, - contractPrevious : None() as option
, - contractNext : None() as option
- } + pokeTraces: Map.empty as map, + feedback: "kiss", + ticketOwnership: Map.empty as map>, //ticket of claims + tzip18: { + proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, + version: 1 as nat, + contractPrevious: None() as option
, + contractNext: None() as option
+ } }; ``` Compile ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile pokeGame.jsligo ``` All good :ok_hand: @@ -704,7 +723,7 @@ taq create contract proxy.jsligo Let's define the storage and entrypoints on it ```ligolang -type storage = { +export type storage = { governance: address, //admins entrypoints: big_map //interface schema map }; @@ -724,23 +743,23 @@ type _return = [list, storage]; Add our missing types juste above ```ligolang -type callContract = { +export type callContract = { entrypointName: string, payload: bytes }; -type entrypointType = { +export type entrypointType = { method: string, addr: address }; -type entrypointOperation = { +export type entrypointOperation = { name: string, isRemoved: bool, entrypoint: option }; -type changeVersion = { +export type changeVersion = { oldAddr: address, newAddr: address }; @@ -755,28 +774,33 @@ Add the `Call`entrypoint (simple forward). (Before main function) ```ligolang // the proxy function + @entry -const callContract = (param : callContract , store : storage) : _return => { - return match(Big_map.find_opt(param.entrypointName, store.entrypoints), { - None: () => failwith("No entrypoint found"), - Some: (entry: entrypointType) => +const callContract = (param: callContract, store: storage): _return => { + return match(Big_map.find_opt(param.entrypointName, store.entrypoints)) { + when (None): + failwith("No entrypoint found") + when (Some(entry)): match( - Tezos.get_contract_opt(entry.addr) as option>, - { - None: () => failwith("No contract found at this address"), - Some: (contract) => [ - list([ - Tezos.transaction( - { entrypointName: entry.method, payload: param.payload }, - Tezos.get_amount(), - contract - ) - ]) as list, + Tezos.get_contract_opt(entry.addr) as option> + ) { + when (None): + failwith("No contract found at this address") + when (Some(contract)): + [ + list( + [ + Tezos.transaction( + { entrypointName: entry.method, payload: param.payload }, + Tezos.get_amount(), + contract + ) + ] + ) as list, store ] - } - ), - }); + } + } }; ``` @@ -788,83 +812,94 @@ Then, write the `upgrade` entrypoint. (Before main function) /** * Function for administrators to update entrypoints and change current contract version **/ + @entry -const upgrade = (param : [list, option] , store : storage) : _return => { +const upgrade = ( + param: [list, option], + store: storage +): _return => { if (Tezos.get_sender() != store.governance) { - return failwith("Permission denied"); - } - + return failwith("Permission denied") + }; let [upgraded_ep_list, changeVersionOpt] = param; - - const update_storage = (l : list, m: big_map ): big_map => { - return match( - l, - list([ - ([]) => m, - ([x, ...xs]) => { - let b: big_map = match(x.entrypoint, { - None: () => { - if (x.isRemoved == true) { - return Big_map.remove(x.name, m); - } else { - return m; - } - }, //mean to remove or unchanged - Some: (_ep: entrypointType) => { - //means to add new or unchanged - if (x.isRemoved == false) { - return match(x.entrypoint, { - None: () => m, - Some: (c: entrypointType) => - Big_map.update(x.name, Some(c), m), - }); - } else { - return m; - } - }, - }); - return update_storage(xs, b); + const update_storage = ( + l: list, + m: big_map + ): big_map => { + return match(l) { + when ([]): + m + when ([x, ...xs]): + do { + let b: big_map = + match(x.entrypoint) { + when (None): + do { + if (x.isRemoved == true) { + return Big_map.remove(x.name, m) + } else { + return m + } + } //mean to remove or unchanged + + when (Some(_ep)): + do { + //means to add new or unchanged + + if (x.isRemoved == false) { + return match(x.entrypoint) { + when (None): + m + when (Some(c)): + Big_map.update(x.name, Some(c), m) + } + } else { + return m + } + } + }; + return update_storage(xs, b) } - ]) - ); + } }; - //update the entrpoint interface map - const new_entrypoints: big_map = update_storage( - upgraded_ep_list, - store.entrypoints - ); + const new_entrypoints: big_map = + update_storage(upgraded_ep_list, store.entrypoints); //check if version needs to be changed - return match(changeVersionOpt, { - None: () => [ - list([]) as list, - { ...store, entrypoints: new_entrypoints } - ], - Some: (change) => { - let op_change: operation = match( - Tezos.get_contract_opt(change.oldAddr) as option< - contract - >, - { - None: () => failwith("No contract found at this address"), - Some: (contract) => { - let amt = Tezos.get_amount(); - let payload: address = change.newAddr; - return Tezos.transaction( - { entrypointName: "changeVersion", payload: Bytes.pack(payload) }, - amt, - contract - ); - }, - } - ); - return [ - list([op_change]) as list, - { ...store, entrypoints: new_entrypoints } - ]; - }, - }); + + return match(changeVersionOpt) { + when (None): + [list([]) as list, { ...store, entrypoints: new_entrypoints }] + when (Some(change)): + do { + let op_change: operation = + match( + Tezos.get_contract_opt(change.oldAddr) as + option> + ) { + when (None): + failwith("No contract found at this address") + when (Some(contract)): + do { + let amt = Tezos.get_amount(); + let payload: address = change.newAddr; + return Tezos.transaction( + { + entrypointName: "changeVersion", + payload: Bytes.pack(payload) + }, + amt, + contract + ) + } + }; + return [ + list([op_change]) as list, + { ...store, entrypoints: new_entrypoints } + ] + } + } }; ``` @@ -874,15 +909,16 @@ const upgrade = (param : [list, option] , s Last change is to expose any view from underlying contract (as we have one), declare it at the end of the file ```ligolang -// @view -const getView = ([viewName, store]: [string, storage]): bytes => { - return match(Big_map.find_opt(viewName, store.entrypoints), { - None: () => failwith("View " + viewName + " not declared on this proxy"), - Some: (ep: entrypointType) => +@view +export const getView = (viewName: string, store: storage): bytes => { + return match(Big_map.find_opt(viewName, store.entrypoints)) { + when (None): + failwith("View " + viewName + " not declared on this proxy") + when (Some(ep)): Option.unopt( Tezos.call_view("getView", viewName, ep.addr) as option - ), - }); + ) + } }; ``` @@ -892,7 +928,7 @@ const getView = ([viewName, store]: [string, storage]): bytes => { Compile ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile proxy.jsligo ``` #### We have all ready for deployment :rocket: @@ -907,10 +943,10 @@ const default_storage = { }; ``` -Then compile and deploy it +Compile and deploy it ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile proxy.jsligo taq deploy proxy.tz -e testing ``` @@ -918,31 +954,34 @@ taq deploy proxy.tz -e testing ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”‚ Contract ā”‚ Address ā”‚ Alias ā”‚ Balance In Mutez ā”‚ Destination ā”‚ ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ -ā”‚ proxy.tz ā”‚ KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD ā”‚ proxy ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ proxy.tz ā”‚ KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ ā”‚ proxy ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` Keep this **proxy address**, as you will need to report it below on `tzip18.proxy` field :warning: -Now you can deploy a smartcontract V1. ( :warning: Change with your **proxy address** on file `pokeGame.storages.jsligo` like mine ) +Now you can deploy a smartcontract V1. ( :warning: Change with your **proxy address** on the file `pokeGame.storageList.jsligo` like here below ) ```ligolang -#include "pokeGame.jsligo" +#import "pokeGame.jsligo" "Contract" + const default_storage = { - pokeTraces : Map.empty as map, - feedback : "kiss", - ticketOwnership : Map.empty as map>, //ticket of claims - tzip18 : { - proxy : "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, - version : 1 as nat, - contractPrevious : None() as option
, - contractNext : None() as option
- } + pokeTraces: Map.empty as map, + feedback: "kiss", + ticketOwnership: Map.empty as map>, //ticket of claims + tzip18: { + proxy: "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ" as address, + version: 1 as nat, + contractPrevious: None() as option
, + contractNext: None() as option
+ } }; ``` +Deploy the underlying V1 contract + ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile pokeGame.jsligo taq deploy pokeGame.tz -e testing ``` @@ -950,16 +989,17 @@ taq deploy pokeGame.tz -e testing ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”‚ Contract ā”‚ Address ā”‚ Alias ā”‚ Balance In Mutez ā”‚ Destination ā”‚ ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ -ā”‚ pokeGame.tz ā”‚ KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd ā”‚ pokeGame ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ pokeGame.tz ā”‚ KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK ā”‚ pokeGame ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` Let's tell the proxy that there is a first contract deployed with some interface. -Edit the parameter file `proxy.parameterList.jsligo` (:warning: Change with your smart contract address on each command line with `addr` below :warning:) +Edit the parameter file `proxy.parameterList.jsligo` (:warning: Change with your smart contract address on each command line on `addr` fields below :warning:) ```ligolang -#import "proxy.jsligo" "Proxy" -const initProxyWithV1: parameter_of Proxy = +#import "proxy.jsligo" "Contract" + +const initProxyWithV1: parameter_of Contract = Upgrade( [ list( @@ -970,7 +1010,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "Poke", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -981,7 +1021,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "PokeAndGetFeedback", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -992,7 +1032,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "Init", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -1003,7 +1043,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "changeVersion", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -1014,14 +1054,14 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "feedback", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) } ] - ) as list, - None() as option + ) as list, + None() as option ] ); ``` @@ -1029,28 +1069,28 @@ const initProxyWithV1: parameter_of Proxy = Compile & Call it ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo -taq call proxy --param proxy.default_storage.tz -e testing +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile proxy.jsligo +taq call proxy --param proxy.parameter.initProxyWithV1.tz -e testing ``` output : ```logs -ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” -ā”‚ Contract Alias ā”‚ Contract Address ā”‚ Parameter ā”‚ Entrypoint ā”‚ Mutez Transfer ā”‚ Destination ā”‚ -ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ -ā”‚ proxy ā”‚ KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD ā”‚ (Right ā”‚ default ā”‚ 0 ā”‚ https://ghostnet.tezos.marigold.dev ā”‚ -ā”‚ ā”‚ ā”‚ (Pair { Pair (Pair (Some (Pair "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" "Poke")) False) "Poke" ; ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ Pair (Pair (Some (Pair "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" "PokeAndGetFeedback")) False) ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ "PokeAndGetFeedback" ; ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ Pair (Pair (Some (Pair "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" "Init")) False) "Init" ; ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ Pair (Pair (Some (Pair "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" "changeVersion")) False) ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ "changeVersion" ; ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ Pair (Pair (Some (Pair "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" "feedback")) False) ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ "feedback" } ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ None)) ā”‚ ā”‚ ā”‚ ā”‚ -ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ -ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ +ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” +ā”‚ Contract Alias ā”‚ Contract Address ā”‚ Parameter ā”‚ Entrypoint ā”‚ Mutez Transfer ā”‚ Destination ā”‚ +ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ +ā”‚ proxy ā”‚ KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ ā”‚ (Left (Pair { Pair "Poke" False (Some (Pair "Poke" "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK")) ; ā”‚ default ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ ā”‚ ā”‚ Pair "PokeAndGetFeedback" ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ False ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ (Some (Pair "PokeAndGetFeedback" "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK")) ; ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ Pair "Init" False (Some (Pair "Init" "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK")) ; ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ Pair "changeVersion" ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ False ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ (Some (Pair "changeVersion" "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK")) ; ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ Pair "feedback" False (Some (Pair "feedback" "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK")) } ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ None)) ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ +ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` #### Lets' go to the frontend @@ -1058,12 +1098,12 @@ output : Go on frontend side, recompile all and generate typescript classes ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile proxy.jsligo taq generate types ./app/src ``` -Change the script to extract the proxy address instead of the contract one, edit `package.json` and replace the line of script by +Change the script to extract the proxy address instead of the contract one, edit `./app/package.json` and replace the line of script by ```json "dev": "jq -r -f filter.jq ../.taq/testing-state.json > .env && vite", @@ -1075,7 +1115,7 @@ where you created a new file `filter.jq` with content echo '"VITE_CONTRACT_ADDRESS=" + last(.tasks[] | select(.task == "deploy" and .output[0].contract == "proxy.tz").output[0].address)' > ./app/filter.jq ``` -Edit `./app/App.tsx` and change the contract address, display, etc ... +Edit `./app/src/App.tsx` and change the contract address, display, etc ... ```typescript import { NetworkType } from "@airgap/beacon-types"; @@ -1308,7 +1348,7 @@ export default App; - contract address now is pointing to your **proxy** address - we are merging proxy and contract storage with `ProxyStorage&ContractStorage` type definition. contract fecth is appending the storage of the underlying contract to the proxy storage, so we can display it on the table like before :) -- we have altered the call to exposed entrypoint. Because all is generic now on the proxy, we always do `await c.methods.call("my_entrypoint_name",my_packed_payload_bytes).send()` +- we have altered the call to exposed entrypoint. Because all is generic now on the proxy, we always do `await c.methods.callContract("my_entrypoint_name",my_packed_payload_bytes).send()` Lets' run the frontend locally @@ -1338,14 +1378,14 @@ Edit `pokeGame.storageList.jsligo` and add a new variable on it. Don't forget ag ```ligolang const storageV2 = { - pokeTraces: Map.empty as map, + pokeTraces: Map.empty as map, feedback: "hello", ticketOwnership: Map.empty as map>, tzip18: { - proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, + proxy: "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ" as address, version: 2 as nat, contractPrevious: Some( - "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address + "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address ) as option
, contractNext: None() as option
, }, @@ -1353,7 +1393,7 @@ const storageV2 = { ``` ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile pokeGame.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile pokeGame.jsligo taq deploy pokeGame.tz -e testing --storage pokeGame.storage.storageV2.tz ``` @@ -1361,7 +1401,7 @@ taq deploy pokeGame.tz -e testing --storage pokeGame.storage.storageV2.tz ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”‚ Contract ā”‚ Address ā”‚ Alias ā”‚ Balance In Mutez ā”‚ Destination ā”‚ ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ -ā”‚ pokeGame.tz ā”‚ KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP ā”‚ pokeGame ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ pokeGame.tz ā”‚ KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF ā”‚ pokeGame ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` @@ -1369,8 +1409,7 @@ Tell our proxy than we have new entrypoints to the V2 and remove the ones from V Add a new parameter variable on `proxy.parameterList.jsligo`. Don't forget to change the `addr` values with the new contract address just above !!! ```ligolang -#import "proxy.jsligo" "Proxy" -const initProxyWithV1: parameter_of Proxy = +const initProxyWithV2: parameter_of Contract = Upgrade( [ list( @@ -1381,7 +1420,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "Poke", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -1392,7 +1431,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "PokeAndGetFeedback", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -1403,7 +1442,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "Init", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -1414,7 +1453,7 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "changeVersion", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -1425,80 +1464,14 @@ const initProxyWithV1: parameter_of Proxy = entrypoint: Some( { method: "feedback", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) } ] - ) as list, - None() as option - ] - ); - -const initProxyWithV2: parameter_of Proxy = - Upgrade( - [ - list( - [ - { - name: "Poke", - isRemoved: false, - entrypoint: Some( - { - method: "Poke", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as - address - } - ) - }, - { - name: "PokeAndGetFeedback", - isRemoved: false, - entrypoint: Some( - { - method: "PokeAndGetFeedback", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as - address - } - ) - }, - { - name: "Init", - isRemoved: false, - entrypoint: Some( - { - method: "Init", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as - address - } - ) - }, - { - name: "changeVersion", - isRemoved: false, - entrypoint: Some( - { - method: "changeVersion", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as - address - } - ) - }, - { - name: "feedback", - isRemoved: false, - entrypoint: Some( - { - method: "feedback", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as - address - } - ) - } - ] - ) as list, - None() as option + ) as list, + None() as option ] ); ``` @@ -1506,10 +1479,30 @@ const initProxyWithV2: parameter_of Proxy = Call the proxy to do the changes ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile proxy.jsligo taq call proxy --param proxy.parameter.initProxyWithV2.tz -e testing ``` +Check the logs + +```logs +ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” +ā”‚ Contract Alias ā”‚ Contract Address ā”‚ Parameter ā”‚ Entrypoint ā”‚ Mutez Transfer ā”‚ Destination ā”‚ +ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ +ā”‚ proxy ā”‚ KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ ā”‚ (Left (Pair { Pair "Poke" False (Some (Pair "Poke" "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF")) ; ā”‚ default ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ ā”‚ ā”‚ Pair "PokeAndGetFeedback" ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ False ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ (Some (Pair "PokeAndGetFeedback" "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF")) ; ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ Pair "Init" False (Some (Pair "Init" "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF")) ; ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ Pair "changeVersion" ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ False ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ (Some (Pair "changeVersion" "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF")) ; ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ Pair "feedback" False (Some (Pair "feedback" "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF")) } ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ None)) ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ +ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ +``` + Back to the web app, test the flow again : 1. Refresh the contract list @@ -1528,26 +1521,38 @@ Now, your proxy is calling the contract V2 and should return `hello` on the trac Add a new parameter on `proxy.parameterList.jsligo` to force change of version on old contract (:warning: replace below with your own addresses for V1 ad V2) ```ligolang -const changeVersionV1ToV2: parameter_of Proxy = +const changeVersionV1ToV2: parameter_of Contract = Upgrade( [ - list([]) as list, + list([]) as list, Some( { - oldAddr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address, - newAddr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as address + oldAddr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address, + newAddr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } - ) as option + ) as option ] ); ``` ```bash -TAQ_LIGO_IMAGE=ligolang/ligo:0.73.0 taq compile proxy.jsligo -taq call proxy --param proxy.parameterList.changeVersionV1ToV2.tz -e testing +TAQ_LIGO_IMAGE=ligolang/ligo:1.0.0 taq compile proxy.jsligo +taq call proxy --param proxy.parameter.changeVersionV1ToV2.tz -e testing +``` + +Check logs + +```logs +ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” +ā”‚ Contract Alias ā”‚ Contract Address ā”‚ Parameter ā”‚ Entrypoint ā”‚ Mutez Transfer ā”‚ Destination ā”‚ +ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ +ā”‚ proxy ā”‚ KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ ā”‚ (Left (Pair {} ā”‚ default ā”‚ 0 ā”‚ https://ghostnet.ecadinfra.com ā”‚ +ā”‚ ā”‚ ā”‚ (Some (Pair "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF")))) ā”‚ ā”‚ ā”‚ ā”‚ +ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ ā”‚ +ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` -Check on an indexer that the V1 storage.tzip18.contractNext is pointing to the next version address V2 : [https://ghostnet.tzkt.io/KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd/storage/](https://ghostnet.tzkt.io/KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd/storage/) +Check on an indexer that the V1 `storage.tzip18.contractNext` is pointing to the next version address V2 : [old V1 contract storage](https://ghostnet.tzkt.io/KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK/storage/) :tada: This ends the proxy pattern implementation. Your old contract is no more "runnable" and your proxy is pointing to the last version diff --git a/solution/.ligo/repository_id b/solution/.ligo/repository_id index ff001ed..faed456 100644 --- a/solution/.ligo/repository_id +++ b/solution/.ligo/repository_id @@ -1 +1 @@ -19432478-9fec-4867-ca5f-669aaf9df4ff \ No newline at end of file +bc89641e-438d-41d4-2742-b15c9d1a88c8 \ No newline at end of file diff --git a/solution/.taq/config.json b/solution/.taq/config.json index eebb650..b07a0bc 100644 --- a/solution/.taq/config.json +++ b/solution/.taq/config.json @@ -55,19 +55,19 @@ "plugins": [ { "type": "npm", - "name": "@taqueria/plugin-octez-client" + "name": "@taqueria/plugin-ligo" }, { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, { "type": "npm", - "name": "@taqueria/plugin-contract-types" + "name": "@taqueria/plugin-taquito" }, { "type": "npm", - "name": "@taqueria/plugin-taquito" + "name": "@taqueria/plugin-contract-types" } ] } \ No newline at end of file diff --git a/solution/.taq/development-state.json b/solution/.taq/development-state.json index 8f286a3..ada3d69 100644 --- a/solution/.taq/development-state.json +++ b/solution/.taq/development-state.json @@ -1,10 +1,10 @@ { "operations": {}, "tasks": { - "@taqueria/plugin-tezos-client.simulate.1691393786061": { + "@taqueria/plugin-octez-client.simulate.1695891426476": { "task": "simulate", - "plugin": "@taqueria/plugin-tezos-client", - "time": 1691393786061, + "plugin": "@taqueria/plugin-octez-client", + "time": 1695891426476, "output": [ { "contract": "pokeGame.tz", @@ -12,121 +12,121 @@ } ] }, - "@taqueria/plugin-ligo.test.1695646773177": { + "@taqueria/plugin-ligo.test.1695980691515": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695646773177, + "time": 1695980691515, "output": [ { "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\n\"*** Run test to pass ***\"\n\"contract deployed with values : \"\nKT1HeEVF74BLi3fYCpr1tpkDGmruFBNjMATo(None)\nSuccess (1858n)\n\"*** Check initial ticket is here ***\"\n{feedback = \"kiss\" ; pokeTraces = [] ; ticketOwnership = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> (KT1HeEVF74BLi3fYCpr1tpkDGmruFBNjMATo , (\"can_poke\" , 1n))]}\nSuccess (1024n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1HeEVF74BLi3fYCpr1tpkDGmruFBNjMATo}] ; ticketOwnership = []}\n\"*** Run test to fail ***\"\n\"contract deployed with values : \"\nKT1HDbqhYiKs8e3LkNAcT9T2MQgvUdxPtbV5(None)\nSuccess (1399n)\n\"*** Check initial ticket is here ***\"\n{feedback = \"kiss\" ; pokeTraces = [] ; ticketOwnership = []}\nFail (Rejected ((\"User does not have tickets => not allowed\" , KT1HDbqhYiKs8e3LkNAcT9T2MQgvUdxPtbV5)))\n{feedback = \"kiss\" ; pokeTraces = [] ; ticketOwnership = []}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n- testSender1PokeWithNoTicketsToFail exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" } ] }, - "@taqueria/plugin-ligo.test.1695647004986": { - "task": "test", + "@taqueria/plugin-ligo.compile.1695998240553": { + "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695647004986, + "time": 1695998240553, "output": [ { - "contract": "unit_pokeGame.jsligo", - "testResults": "Some tests failed :(" + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nNo parameter expressions found" + }, + { + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nNo parameter expressions found" } ] }, - "@taqueria/plugin-ligo.test.1695647046376": { - "task": "test", + "@taqueria/plugin-ligo.compile.1695998250379": { + "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695647046376, + "time": 1695998250379, "output": [ { - "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Q5bor5ceYD53iWnDyijQDDpmMB6ZKWi6m}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "source": "proxy.jsligo", + "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nartifacts/proxy.parameter.initProxyWithV1.tz" } ] }, - "@taqueria/plugin-ligo.test.1695801566862": { - "task": "test", + "@taqueria/plugin-ligo.compile.1695998891705": { + "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695801566862, + "time": 1695998891705, "output": [ { - "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3 ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Czn6RyfE9kJxRgMh7yiENzXE4Ga2fB5z3}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" + }, + { + "source": "pokeGame.jsligo", + "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" } ] }, - "@taqueria/plugin-ligo.compile.1695804856728": { + "@taqueria/plugin-ligo.compile.1695999118447": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695804856728, + "time": 1695999118447, "output": [ { "source": "proxy.jsligo", - "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled" + "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nartifacts/proxy.parameter.initProxyWithV1.tz\nartifacts/proxy.parameter.initProxyWithV2.tz" } ] }, - "@taqueria/plugin-ligo.compile.1695805346470": { + "@taqueria/plugin-ligo.compile.1695999516416": { "task": "compile", "plugin": "@taqueria/plugin-ligo", - "time": 1695805346470, + "time": 1695999516416, "output": [ { "source": "proxy.jsligo", - "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled\nproxy.parameterList.jsligo not compiled" + "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nartifacts/proxy.parameter.initProxyWithV1.tz\nartifacts/proxy.parameter.initProxyWithV2.tz\nartifacts/proxy.parameter.changeVersionV1ToV2.tz" } ] }, - "@taqueria/plugin-ligo.compile.1695805399435": { - "task": "compile", + "@taqueria/plugin-ligo.test.1696000811378": { + "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695805399435, + "time": 1696000811378, "output": [ { - "source": "proxy.jsligo", - "artifact": "artifacts/proxy.tz\nartifacts/proxy.default_storage.tz\nartifacts/proxy.parameter.initProxyWithV1.tz\nartifacts/proxy.parameter.initProxyWithV2.tz\nartifacts/proxy.parameter.changeVersionV1ToV2.tz" + "contract": "unit_pokeGame.jsligo", + "testResults": "Some tests failed :(" } ] }, - "@taqueria/plugin-ligo.compile.1695805573470": { - "task": "compile", + "@taqueria/plugin-ligo.test.1696000843873": { + "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695805573470, + "time": 1696000843873, "output": [ { - "source": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" - }, - { - "source": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" + "contract": "unit_pokeGame.jsligo", + "testResults": "Some tests failed :(" } ] }, - "@taqueria/plugin-ligo.compile.1695805618323": { - "task": "compile", + "@taqueria/plugin-ligo.test.1696000903641": { + "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695805618323, + "time": 1696000903641, "output": [ { - "source": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" - }, - { - "source": "pokeGame.jsligo", - "artifact": "artifacts/pokeGame.tz\nartifacts/pokeGame.default_storage.tz\nartifacts/pokeGame.storage.storageV2.tz\nNo parameter expressions found" + "contract": "unit_pokeGame.jsligo", + "testResults": "Some tests failed :(" } ] }, - "@taqueria/plugin-ligo.test.1695805641053": { + "@taqueria/plugin-ligo.test.1696000960439": { "task": "test", "plugin": "@taqueria/plugin-ligo", - "time": 1695805641053, + "time": 1696000960439, "output": [ { "contract": "unit_pokeGame.jsligo", - "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2796n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"Init\"} ; \"feedback\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1353n)\n\"calling _testPokeGame on proxy : \"\nKT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ(None)\nSuccess (1351n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1Gowrda1FYD2EsXxJPVgzCv1ZJ8BCKZH2E}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1WzRJvFhPta6hfTPanKDwvkmpywom4tCZJ ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" + "testResults": "\"Sender 1 has balance : \"\n3800000000000mutez\nSuccess (2807n)\n{entrypoints = [\"changeVersion\" -> {addr = KT1PZ2MwkeECCaTtpLbVbTaG9UrdVNm43kiN ; method = \"changeVersion\"} ; \"Init\" -> {addr = KT1PZ2MwkeECCaTtpLbVbTaG9UrdVNm43kiN ; method = \"Init\"} ; \"feedback\" -> {addr = KT1PZ2MwkeECCaTtpLbVbTaG9UrdVNm43kiN ; method = \"feedback\"} ; \"Poke\" -> {addr = KT1PZ2MwkeECCaTtpLbVbTaG9UrdVNm43kiN ; method = \"Poke\"} ; \"PokeAndGetFeedback\" -> {addr = KT1PZ2MwkeECCaTtpLbVbTaG9UrdVNm43kiN ; method = \"PokeAndGetFeedback\"}] ; governance = tz1MBWU1WkszFfkEER2pgn4ATKXE9ng7x1sR}\n\"calling _testPokeGame on proxy : \"\nKT1SCUzs3fMR75b6Lp1w7ZisUWV3nHm6k75Z(None)\nSuccess (1359n)\n\"calling _testPokeGame on proxy : \"\nKT1SCUzs3fMR75b6Lp1w7ZisUWV3nHm6k75Z(None)\nSuccess (1357n)\n{feedback = \"kiss\" ; pokeTraces = [tz1hkMbkLPkvhxyqsQoBoLPqb1mruSzZx3zy -> {feedback = \"\" ; receiver = KT1PZ2MwkeECCaTtpLbVbTaG9UrdVNm43kiN}] ; ticketOwnership = [] ; tzip18 = {contractNext = None (()) ; contractPrevious = None (()) ; proxy = KT1SCUzs3fMR75b6Lp1w7ZisUWV3nHm6k75Z ; version = 1n}}\nEverything at the top-level was executed.\n- testSender1Poke exited with value ().\n\nšŸŽ‰ All tests passed šŸŽ‰" } ] } diff --git a/solution/.taq/state.json b/solution/.taq/state.json index e6ad2bf..8644056 100644 --- a/solution/.taq/state.json +++ b/solution/.taq/state.json @@ -1,23 +1,23 @@ // WARNING: This file is autogenerated and should NOT be modified { "build": "dcdfa46", - "configHash": "ebe1a282e346b43f3d9aeceb635b130f5ad578da0b7b909e3369623fd5b3b9ee", + "configHash": "d9bfc120d5cd0de47f5e4b356e7e20e0d5750045f56dbb618c235da4613c1597", "tasks": { - "client": { + "ligo": { "type": "npm", - "name": "@taqueria/plugin-octez-client" + "name": "@taqueria/plugin-ligo" }, - "typecheck": { + "compile": { "type": "npm", - "name": "@taqueria/plugin-octez-client" + "name": "@taqueria/plugin-ligo" }, - "typecheck-all": { + "compile-all": { "type": "npm", - "name": "@taqueria/plugin-octez-client" + "name": "@taqueria/plugin-ligo" }, - "simulate": { + "test": { "type": "npm", - "name": "@taqueria/plugin-octez-client" + "name": "@taqueria/plugin-ligo" }, "get-image": { "task": "get-image", @@ -31,33 +31,29 @@ "description": "Specify which plugin should be used to execute this task", "required": true, "choices": [ - "@taqueria/plugin-octez-client", - "tezos-client", "@taqueria/plugin-ligo", - "ligo" + "ligo", + "@taqueria/plugin-octez-client", + "tezos-client" ] } ] }, - "ligo": { - "type": "npm", - "name": "@taqueria/plugin-ligo" - }, - "compile": { + "client": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, - "compile-all": { + "typecheck": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, - "test": { + "typecheck-all": { "type": "npm", - "name": "@taqueria/plugin-ligo" + "name": "@taqueria/plugin-octez-client" }, - "generate types": { + "simulate": { "type": "npm", - "name": "@taqueria/plugin-contract-types" + "name": "@taqueria/plugin-octez-client" }, "deploy": { "type": "npm", @@ -74,6 +70,10 @@ "instantiate-account": { "type": "npm", "name": "@taqueria/plugin-taquito" + }, + "generate types": { + "type": "npm", + "name": "@taqueria/plugin-contract-types" } }, "operations": {}, @@ -84,95 +84,6 @@ } }, "plugins": [ - { - "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 ", - "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 ", - "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-ligo", "version": "0.1", @@ -275,38 +186,89 @@ ] }, { - "name": "@taqueria/plugin-contract-types", + "name": "@taqueria/plugin-octez-client", "version": "0.1", "schema": "1.0", - "alias": "contract-types", + "alias": "tezos-client", "tasks": [ { - "task": "generate types", - "command": "generate types [typescriptDir]", + "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 ", "aliases": [ - "gen types", - "gentypes" + "tc" ], - "description": "Generate types for a contract to be used with taquito", + "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 ", + "aliases": [ + "sim" + ], + "description": "Run a Michelson contract as a simulation", + "encoding": "json", "handler": "proxy", "options": [ { - "shortFlag": "t", - "flag": "typeAliasMode", - "description": "The type aliases used in the generated types", - "choices": [ - "file", - "simple" - ] + "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": "typescriptDir", - "description": "The output directory for the generated type files", - "defaultValue": "types" + "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": [], @@ -422,6 +384,44 @@ ], "operations": [], "templates": [] + }, + { + "name": "@taqueria/plugin-contract-types", + "version": "0.1", + "schema": "1.0", + "alias": "contract-types", + "tasks": [ + { + "task": "generate types", + "command": "generate types [typescriptDir]", + "aliases": [ + "gen types", + "gentypes" + ], + "description": "Generate types for a contract to be used with taquito", + "handler": "proxy", + "options": [ + { + "shortFlag": "t", + "flag": "typeAliasMode", + "description": "The type aliases used in the generated types", + "choices": [ + "file", + "simple" + ] + } + ], + "positionals": [ + { + "placeholder": "typescriptDir", + "description": "The output directory for the generated type files", + "defaultValue": "types" + } + ] + } + ], + "operations": [], + "templates": [] } ] } \ No newline at end of file diff --git a/solution/.taq/testing-state.json b/solution/.taq/testing-state.json index 6c676a8..471940a 100644 --- a/solution/.taq/testing-state.json +++ b/solution/.taq/testing-state.json @@ -1,75 +1,150 @@ { "operations": {}, "tasks": { - "@taqueria/plugin-taquito.deploy.1691399669995": { + "@taqueria/plugin-taquito.transfer.1695992429265": { + "task": "transfer", + "plugin": "@taqueria/plugin-taquito", + "time": 1695992429265, + "output": [ + { + "contractAlias": "pokeGame", + "contractAddress": "KT18kmmZg26QH3A6TfBCqwUgX5gsecpqQEEi", + "parameter": "(Left { DROP ; PUSH string \"YEAH!!!\" })\n\n", + "entrypoint": "default", + "mutezTransfer": "0", + "destination": "https://ghostnet.ecadinfra.com" + } + ] + }, + "@taqueria/plugin-taquito.deploy.1695993578829": { "task": "deploy", "plugin": "@taqueria/plugin-taquito", - "time": 1691399669995, + "time": 1695993578829, "output": [ { "contract": "pokeGame.tz", - "address": "KT1EDsf1dPxgpBgCosu6a9TDExm2WJ9qNT2J", + "address": "KT1QtdVcLf2n7QtTa4xJmb4Dszy3hzQFNsBF", "alias": "pokeGame", "balanceInMutez": "0", "destination": "https://ghostnet.ecadinfra.com" } ] }, - "@taqueria/plugin-taquito.deploy.1691402187188": { + "@taqueria/plugin-taquito.deploy.1695993973977": { "task": "deploy", "plugin": "@taqueria/plugin-taquito", - "time": 1691402187188, + "time": 1695993973977, "output": [ { "contract": "pokeGame.tz", - "address": "KT1X7a1LF1uhKJ5USssnJp27uhFYF9DLbhNv", + "address": "KT1VjFawYQ4JeEEAVchqaYK1NmXCENm2ufer", "alias": "pokeGame", "balanceInMutez": "0", "destination": "https://ghostnet.ecadinfra.com" } ] }, - "@taqueria/plugin-taquito.deploy.1691415305361": { + "@taqueria/plugin-taquito.transfer.1695994233627": { + "task": "transfer", + "plugin": "@taqueria/plugin-taquito", + "time": 1695994233627, + "output": [ + { + "contractAlias": "pokeGame", + "contractAddress": "KT1VjFawYQ4JeEEAVchqaYK1NmXCENm2ufer", + "parameter": "(Left { DROP ; PUSH string \"YEAH!!!\" })\n\n", + "entrypoint": "default", + "mutezTransfer": "0", + "destination": "https://ghostnet.ecadinfra.com" + } + ] + }, + "@taqueria/plugin-taquito.deploy.1695997066240": { "task": "deploy", "plugin": "@taqueria/plugin-taquito", - "time": 1691415305361, + "time": 1695997066240, "output": [ { "contract": "proxy.tz", - "address": "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD", + "address": "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ", "alias": "proxy", "balanceInMutez": "0", "destination": "https://ghostnet.ecadinfra.com" } ] }, - "@taqueria/plugin-taquito.deploy.1691415786300": { + "@taqueria/plugin-taquito.deploy.1695997346520": { "task": "deploy", "plugin": "@taqueria/plugin-taquito", - "time": 1691415786301, + "time": 1695997346520, "output": [ { "contract": "pokeGame.tz", - "address": "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd", + "address": "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK", "alias": "pokeGame", "balanceInMutez": "0", "destination": "https://ghostnet.ecadinfra.com" } ] }, - "@taqueria/plugin-taquito.deploy.1691417586350": { + "@taqueria/plugin-taquito.transfer.1695998202437": { + "task": "transfer", + "plugin": "@taqueria/plugin-taquito", + "time": 1695998202437, + "output": [ + { + "contractAlias": "proxy", + "contractAddress": "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ", + "parameter": "(Left (Pair { Pair \"Poke\" False (Some (Pair \"Poke\" \"KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK\")) ;\n Pair \"PokeAndGetFeedback\"\n False\n (Some (Pair \"PokeAndGetFeedback\" \"KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK\")) ;\n Pair \"Init\" False (Some (Pair \"Init\" \"KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK\")) ;\n Pair \"changeVersion\"\n False\n (Some (Pair \"changeVersion\" \"KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK\")) ;\n Pair \"feedback\" False (Some (Pair \"feedback\" \"KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK\")) }\n None))\n\n", + "entrypoint": "default", + "mutezTransfer": "0", + "destination": "https://ghostnet.ecadinfra.com" + } + ] + }, + "@taqueria/plugin-taquito.deploy.1695998919496": { "task": "deploy", "plugin": "@taqueria/plugin-taquito", - "time": 1691417586350, + "time": 1695998919496, "output": [ { "contract": "pokeGame.tz", - "address": "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP", + "address": "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF", "alias": "pokeGame", "balanceInMutez": "0", "destination": "https://ghostnet.ecadinfra.com" } ] + }, + "@taqueria/plugin-taquito.transfer.1695999309952": { + "task": "transfer", + "plugin": "@taqueria/plugin-taquito", + "time": 1695999309952, + "output": [ + { + "contractAlias": "proxy", + "contractAddress": "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ", + "parameter": "(Left (Pair { Pair \"Poke\" False (Some (Pair \"Poke\" \"KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF\")) ;\n Pair \"PokeAndGetFeedback\"\n False\n (Some (Pair \"PokeAndGetFeedback\" \"KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF\")) ;\n Pair \"Init\" False (Some (Pair \"Init\" \"KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF\")) ;\n Pair \"changeVersion\"\n False\n (Some (Pair \"changeVersion\" \"KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF\")) ;\n Pair \"feedback\" False (Some (Pair \"feedback\" \"KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF\")) }\n None))\n\n", + "entrypoint": "default", + "mutezTransfer": "0", + "destination": "https://ghostnet.ecadinfra.com" + } + ] + }, + "@taqueria/plugin-taquito.transfer.1695999770127": { + "task": "transfer", + "plugin": "@taqueria/plugin-taquito", + "time": 1695999770127, + "output": [ + { + "contractAlias": "proxy", + "contractAddress": "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ", + "parameter": "(Left (Pair {}\n (Some (Pair \"KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK\" \"KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF\"))))\n\n", + "entrypoint": "default", + "mutezTransfer": "0", + "destination": "https://ghostnet.ecadinfra.com" + } + ] } } } \ No newline at end of file diff --git a/solution/app/.ligo/repository_id b/solution/app/.ligo/repository_id new file mode 100644 index 0000000..ebccb86 --- /dev/null +++ b/solution/app/.ligo/repository_id @@ -0,0 +1 @@ +6a300db0-7ad2-4f95-3286-1cc56698332a \ No newline at end of file diff --git a/solution/app/package.json b/solution/app/package.json index d7da5c8..4b2a517 100644 --- a/solution/app/package.json +++ b/solution/app/package.json @@ -10,21 +10,21 @@ "preview": "vite preview" }, "dependencies": { - "@airgap/beacon-sdk": "^4.0.6", - "@taquito/beacon-wallet": "^17.1.1", - "@taquito/taquito": "^17.1.1", - "@tzkt/sdk-api": "^2.2.0", + "@airgap/beacon-sdk": "^4.0.10", + "@taquito/beacon-wallet": "^17.3.1", + "@taquito/taquito": "^17.3.1", + "@tzkt/sdk-api": "^2.2.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { - "@airgap/beacon-types": "^4.0.6", + "@airgap/beacon-types": "^4.0.10", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "@vitejs/plugin-react-swc": "^3.3.2", - "assert": "^2.0.0", + "assert": "^2.1.0", "buffer": "^6.0.3", "crypto-browserify": "^3.12.0", "eslint": "^8.45.0", @@ -37,7 +37,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "typescript": "^5.0.2", - "url": "^0.11.1", + "url": "^0.11.3", "vite": "^4.4.5" } } diff --git a/solution/app/src/pokeGame.code.ts b/solution/app/src/pokeGame.code.ts index d4949a9..ffd329d 100644 --- a/solution/app/src/pokeGame.code.ts +++ b/solution/app/src/pokeGame.code.ts @@ -1,6 +1,6 @@ export const PokeGameCode: { __type: 'PokeGameCode', protocol: string, code: object[] } = { __type: 'PokeGameCode', - protocol: 'PsDELPH1Kxsxt8f9eWbxQeRxkjfbxoqM52jvs5Y5fBxWWh4ifpo', - code: JSON.parse(`[{"prim":"parameter","args":[{"prim":"pair","args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]},{"prim":"storage","args":[{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"string","annots":["%feedback"]},{"prim":"map","annots":["%pokeTraces"],"args":[{"prim":"address"},{"prim":"pair","args":[{"prim":"string","annots":["%feedback"]},{"prim":"address","annots":["%receiver"]}]}]}]},{"prim":"map","annots":["%ticketOwnership"],"args":[{"prim":"address"},{"prim":"ticket","args":[{"prim":"string"}]}]},{"prim":"pair","annots":["%tzip18"],"args":[{"prim":"pair","args":[{"prim":"option","annots":["%contractNext"],"args":[{"prim":"address"}]},{"prim":"option","annots":["%contractPrevious"],"args":[{"prim":"address"}]}]},{"prim":"address","annots":["%proxy"]},{"prim":"nat","annots":["%version"]}]}]}]},{"prim":"code","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"SWAP"},[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"DIG","args":[{"int":"2"}]},[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},{"prim":"CAR"},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"False"}]}],[{"prim":"SENDER"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"True"}]}],[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"False"}]}]]}]]},{"prim":"NOT"},[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"CDR"},{"prim":"CAR"},{"prim":"SENDER"},{"prim":"COMPARE"},{"prim":"NEQ"},{"prim":"AND"},{"prim":"IF","args":[[{"prim":"DROP","args":[{"int":"5"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Only the proxy or contractNext can call this contract"}]},{"prim":"FAILWITH"}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"Poke"}]},[{"prim":"DIP","args":[{"int":"5"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"6"}]}],{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"DROP"},{"prim":"NONE","args":[{"prim":"ticket","args":[{"prim":"string"}]}]},{"prim":"SOURCE"},{"prim":"GET_AND_UPDATE"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"User does not have tickets => not allowed"}]},{"prim":"FAILWITH"}],[{"prim":"DROP"},{"prim":"PAIR"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"SELF_ADDRESS"},{"prim":"PUSH","args":[{"prim":"string"},{"string":""}]},{"prim":"PAIR"},{"prim":"SOURCE"},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"SWAP"},{"prim":"UPDATE"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"PAIR"},{"prim":"PAIR"},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"PokeAndGetFeedback"}]},[{"prim":"DIP","args":[{"int":"5"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"6"}]}],{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"CDR"},{"prim":"UNPACK","args":[{"prim":"address"}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find the address parameter for PokeAndGetFeedback"}]},{"prim":"FAILWITH"}],[{"prim":"SWAP"},{"prim":"NONE","args":[{"prim":"ticket","args":[{"prim":"string"}]}]},{"prim":"SOURCE"},{"prim":"GET_AND_UPDATE"},[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"PUSH","args":[{"prim":"string"},{"string":"feedback"}]},{"prim":"VIEW","args":[{"string":"getView"},{"prim":"bytes"}]},{"prim":"SWAP"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"6"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"User does not have tickets => not allowed"}]},{"prim":"FAILWITH"}],[{"prim":"DROP"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"5"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find view feedback on given oracle address"}]},{"prim":"FAILWITH"}],[{"prim":"DIG","args":[{"int":"2"}]},{"prim":"SWAP"},{"prim":"UNPACK","args":[{"prim":"string"}]},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"string"},{"string":"option is None"}]},{"prim":"FAILWITH"}],[]]},{"prim":"PAIR"},{"prim":"DUG","args":[{"int":"2"}]},{"prim":"PAIR"},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"SOURCE"},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"SWAP"},{"prim":"UPDATE"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"PAIR"},{"prim":"PAIR"},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}]]}]]}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"Init"}]},[{"prim":"DIP","args":[{"int":"5"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"6"}]}],{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"CDR"},{"prim":"UNPACK","args":[{"prim":"pair","args":[{"prim":"address"},{"prim":"nat"}]}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find the address parameter for changeVersion"}]},{"prim":"FAILWITH"}],[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"PUSH","args":[{"prim":"nat"},{"int":"0"}]},[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DROP","args":[{"int":"2"}]}],[{"prim":"DUG","args":[{"int":"3"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"can_poke"}]},{"prim":"TICKET"},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"string"},{"string":"option is None"}]},{"prim":"FAILWITH"}],[]]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"SWAP"},{"prim":"UPDATE"}]]},{"prim":"PAIR"},{"prim":"DUG","args":[{"int":"2"}]},{"prim":"PAIR"},{"prim":"PAIR"},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"changeVersion"}]},[{"prim":"DIP","args":[{"int":"5"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"6"}]}],{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"CDR"},{"prim":"UNPACK","args":[{"prim":"address"}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find the address parameter for changeVersion"}]},{"prim":"FAILWITH"}],[[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"DIG","args":[{"int":"3"}]},{"prim":"CAR"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"SOME"},{"prim":"UPDATE","args":[{"int":"1"}]},{"prim":"UPDATE","args":[{"int":"1"}]},{"prim":"SWAP"},{"prim":"PAIR"},{"prim":"DUG","args":[{"int":"2"}]},{"prim":"PAIR"},{"prim":"PAIR"},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],[{"prim":"DROP","args":[{"int":"5"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Non-existant method"}]},{"prim":"FAILWITH"}]]}]]}]]}]]}]]}]]},{"prim":"view","args":[{"string":"getView"},{"prim":"string"},{"prim":"bytes"},[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"PUSH","args":[{"prim":"string"},{"string":"feedback"}]},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DROP"},{"prim":"CAR"},{"prim":"CAR"},{"prim":"PACK"}],[{"prim":"SWAP"},{"prim":"DROP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":" not found on this contract"}]},{"prim":"SWAP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"View "}]},{"prim":"CONCAT"},{"prim":"CONCAT"},{"prim":"FAILWITH"}]]}]]}]`) + protocol: 'PtEdo2ZkT9oKpimTah6x2embF25oss54njMuPzkJTEi5RqfdZFA', + code: JSON.parse(`[{"prim":"parameter","args":[{"prim":"pair","args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]},{"prim":"storage","args":[{"prim":"pair","args":[{"prim":"map","annots":["%pokeTraces"],"args":[{"prim":"address"},{"prim":"pair","args":[{"prim":"address","annots":["%receiver"]},{"prim":"string","annots":["%feedback"]}]}]},{"prim":"string","annots":["%feedback"]},{"prim":"map","annots":["%ticketOwnership"],"args":[{"prim":"address"},{"prim":"ticket","args":[{"prim":"string"}]}]},{"prim":"pair","annots":["%tzip18"],"args":[{"prim":"address","annots":["%proxy"]},{"prim":"nat","annots":["%version"]},{"prim":"option","annots":["%contractPrevious"],"args":[{"prim":"address"}]},{"prim":"option","annots":["%contractNext"],"args":[{"prim":"address"}]}]}]}]},{"prim":"code","args":[[{"prim":"UNPAIR"},{"prim":"SWAP"},{"prim":"UNPAIR","args":[{"int":"4"}]},{"prim":"DUP","args":[{"int":"4"}]},{"prim":"GET","args":[{"int":"6"}]},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"False"}]}],[{"prim":"SENDER"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"True"}]}],[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"False"}]}]]}]]},{"prim":"NOT"},{"prim":"DUP","args":[{"int":"5"}]},{"prim":"CAR"},{"prim":"SENDER"},{"prim":"COMPARE"},{"prim":"NEQ"},{"prim":"AND"},{"prim":"IF","args":[[{"prim":"DROP","args":[{"int":"5"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Only the proxy or contractNext can call this contract"}]},{"prim":"FAILWITH"}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"Poke"}]},{"prim":"DUP","args":[{"int":"6"}]},{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"DROP"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"NONE","args":[{"prim":"ticket","args":[{"prim":"string"}]}]},{"prim":"SOURCE"},{"prim":"GET_AND_UPDATE"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"User does not have tickets => not allowed"}]},{"prim":"FAILWITH"}],[{"prim":"DROP"},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"SWAP"},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":""}]},{"prim":"SELF_ADDRESS"},{"prim":"PAIR"},{"prim":"SOURCE"},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"SWAP"},{"prim":"UPDATE"},{"prim":"PAIR","args":[{"int":"4"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"PokeAndGetFeedback"}]},{"prim":"DUP","args":[{"int":"6"}]},{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"CDR"},{"prim":"UNPACK","args":[{"prim":"address"}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find the address parameter for PokeAndGetFeedback"}]},{"prim":"FAILWITH"}],[{"prim":"DIG","args":[{"int":"3"}]},{"prim":"NONE","args":[{"prim":"ticket","args":[{"prim":"string"}]}]},{"prim":"SOURCE"},{"prim":"GET_AND_UPDATE"},{"prim":"DUP","args":[{"int":"3"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"feedback"}]},{"prim":"VIEW","args":[{"string":"getView"},{"prim":"bytes"}]},{"prim":"SWAP"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"6"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"User does not have tickets => not allowed"}]},{"prim":"FAILWITH"}],[{"prim":"DROP"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"5"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find view feedback on given oracle address"}]},{"prim":"FAILWITH"}],[{"prim":"UNPACK","args":[{"prim":"string"}]},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"string"},{"string":"option is None"}]},{"prim":"FAILWITH"}],[]]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"PAIR"},{"prim":"DIG","args":[{"int":"4"}]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"DIG","args":[{"int":"4"}]},{"prim":"DIG","args":[{"int":"4"}]},{"prim":"DIG","args":[{"int":"4"}]},{"prim":"SOURCE"},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"SWAP"},{"prim":"UPDATE"},{"prim":"PAIR","args":[{"int":"4"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}]]}]]}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"Init"}]},{"prim":"DUP","args":[{"int":"6"}]},{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"CDR"},{"prim":"UNPACK","args":[{"prim":"pair","args":[{"prim":"address"},{"prim":"nat"}]}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find the address parameter for changeVersion"}]},{"prim":"FAILWITH"}],[{"prim":"UNPAIR"},{"prim":"PUSH","args":[{"prim":"nat"},{"int":"0"}]},{"prim":"DUP","args":[{"int":"3"}]},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DROP","args":[{"int":"2"}]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"DIG","args":[{"int":"3"}]}],[{"prim":"DIG","args":[{"int":"5"}]},{"prim":"DIG","args":[{"int":"5"}]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"can_poke"}]},{"prim":"TICKET"},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"string"},{"string":"option is None"}]},{"prim":"FAILWITH"}],[]]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"SWAP"},{"prim":"UPDATE"}]]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"DIG","args":[{"int":"3"}]},{"prim":"PAIR","args":[{"int":"4"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],[{"prim":"PUSH","args":[{"prim":"string"},{"string":"changeVersion"}]},{"prim":"DUP","args":[{"int":"6"}]},{"prim":"CAR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"CDR"},{"prim":"UNPACK","args":[{"prim":"address"}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"4"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Cannot find the address parameter for changeVersion"}]},{"prim":"FAILWITH"}],[{"prim":"DIG","args":[{"int":"4"}]},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"UPDATE","args":[{"int":"6"}]},{"prim":"DUG","args":[{"int":"3"}]},{"prim":"PAIR","args":[{"int":"4"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],[{"prim":"DROP","args":[{"int":"5"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Non-existant method"}]},{"prim":"FAILWITH"}]]}]]}]]}]]}]]}]]},{"prim":"view","args":[{"string":"getView"},{"prim":"string"},{"prim":"bytes"},[{"prim":"UNPAIR"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"feedback"}]},{"prim":"DUP","args":[{"int":"2"}]},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DROP"},{"prim":"GET","args":[{"int":"3"}]},{"prim":"PACK"}],[{"prim":"SWAP"},{"prim":"DROP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":" not found on this contract"}]},{"prim":"SWAP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"View "}]},{"prim":"CONCAT"},{"prim":"CONCAT"},{"prim":"FAILWITH"}]]}]]}]`) }; diff --git a/solution/app/src/pokeGame.types.ts b/solution/app/src/pokeGame.types.ts index e9b2cc5..dbc6545 100644 --- a/solution/app/src/pokeGame.types.ts +++ b/solution/app/src/pokeGame.types.ts @@ -3,17 +3,17 @@ import { ContractAbstractionFromContractType, WalletContractAbstractionFromContr import { address, bytes, MMap, nat, ticket } from './type-aliases'; export type Storage = { - feedback: string; pokeTraces: MMap; + feedback: string; ticketOwnership: MMap; tzip18: { - contractNext: {Some: address} | null; - contractPrevious: {Some: address} | null; proxy: address; version: nat; + contractPrevious: {Some: address} | null; + contractNext: {Some: address} | null; }; }; diff --git a/solution/app/src/proxy.code.ts b/solution/app/src/proxy.code.ts index df0755a..2f6fa63 100644 --- a/solution/app/src/proxy.code.ts +++ b/solution/app/src/proxy.code.ts @@ -2,5 +2,5 @@ export const ProxyCode: { __type: 'ProxyCode', protocol: string, code: object[] } = { __type: 'ProxyCode', protocol: 'PsDELPH1Kxsxt8f9eWbxQeRxkjfbxoqM52jvs5Y5fBxWWh4ifpo', - code: JSON.parse(`[{"prim":"parameter","args":[{"prim":"or","args":[{"prim":"pair","annots":["%callContract"],"args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]},{"prim":"pair","annots":["%upgrade"],"args":[{"prim":"list","args":[{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"option","annots":["%entrypoint"],"args":[{"prim":"pair","args":[{"prim":"address","annots":["%addr"]},{"prim":"string","annots":["%method"]}]}]},{"prim":"bool","annots":["%isRemoved"]}]},{"prim":"string","annots":["%name"]}]}]},{"prim":"option","args":[{"prim":"pair","args":[{"prim":"address","annots":["%newAddr"]},{"prim":"address","annots":["%oldAddr"]}]}]}]}]}]},{"prim":"storage","args":[{"prim":"pair","args":[{"prim":"big_map","annots":["%entrypoints"],"args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"address","annots":["%addr"]},{"prim":"string","annots":["%method"]}]}]},{"prim":"address","annots":["%governance"]}]}]},{"prim":"code","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"IF_LEFT","args":[[[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},{"prim":"GET"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"2"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"No entrypoint found"}]},{"prim":"FAILWITH"}],[{"prim":"DUP"},{"prim":"CAR"},{"prim":"CONTRACT","args":[{"prim":"pair","args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"3"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"No contract found at this address"}]},{"prim":"FAILWITH"}],[{"prim":"DIG","args":[{"int":"3"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"AMOUNT"},{"prim":"DIG","args":[{"int":"5"}]},{"prim":"CDR"},{"prim":"DIG","args":[{"int":"5"}]},{"prim":"CDR"},{"prim":"PAIR"},{"prim":"TRANSFER_TOKENS"},{"prim":"CONS"},{"prim":"PAIR"}]]}]]}],[[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CDR"},{"prim":"SENDER"},{"prim":"COMPARE"},{"prim":"NEQ"},{"prim":"IF","args":[[{"prim":"DROP","args":[{"int":"2"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Permission denied"}]},{"prim":"FAILWITH"}],[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"CAR"},{"prim":"SWAP"},{"prim":"PAIR"},{"prim":"LEFT","args":[{"prim":"big_map","args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"address"},{"prim":"string"}]}]}]},{"prim":"LOOP_LEFT","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"IF_CONS","args":[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"CAR"},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"True"}]},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},{"prim":"CDR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"2"}]},{"prim":"SWAP"},{"prim":"CDR"},{"prim":"NONE","args":[{"prim":"pair","args":[{"prim":"address"},{"prim":"string"}]}]},{"prim":"SWAP"},{"prim":"UPDATE"}],[{"prim":"DROP"},{"prim":"SWAP"}]]}],[{"prim":"DROP"},{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"False"}]},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},{"prim":"CDR"},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"CAR"},{"prim":"IF_NONE","args":[[{"prim":"DROP"},{"prim":"SWAP"}],[{"prim":"DIG","args":[{"int":"3"}]},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"CDR"},{"prim":"UPDATE"}]]}],[{"prim":"DROP"},{"prim":"SWAP"}]]}]]},{"prim":"SWAP"},{"prim":"PAIR"},{"prim":"LEFT","args":[{"prim":"big_map","args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"address"},{"prim":"string"}]}]}]}],[{"prim":"RIGHT","args":[{"prim":"pair","args":[{"prim":"list","args":[{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"option","args":[{"prim":"pair","args":[{"prim":"address"},{"prim":"string"}]}]},{"prim":"bool"}]},{"prim":"string"}]}]},{"prim":"big_map","args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"address"},{"prim":"string"}]}]}]}]}]]}]]},{"prim":"SWAP"},{"prim":"IF_NONE","args":[[{"prim":"UPDATE","args":[{"int":"1"}]},{"prim":"NIL","args":[{"prim":"operation"}]}],[{"prim":"DUP"},{"prim":"CDR"},{"prim":"CONTRACT","args":[{"prim":"pair","args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]},{"prim":"IF_NONE","args":[[{"prim":"DROP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"No contract found at this address"}]},{"prim":"FAILWITH"}],[{"prim":"AMOUNT"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"CAR"},{"prim":"PACK"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"changeVersion"}]},{"prim":"PAIR"},{"prim":"TRANSFER_TOKENS"}]]},{"prim":"DUG","args":[{"int":"2"}]},{"prim":"UPDATE","args":[{"int":"1"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"CONS"}]]},{"prim":"PAIR"}]]}]]}]]}]`) + code: JSON.parse(`[{"prim":"parameter","args":[{"prim":"or","args":[{"prim":"pair","annots":["%upgrade"],"args":[{"prim":"list","args":[{"prim":"pair","args":[{"prim":"string","annots":["%name"]},{"prim":"bool","annots":["%isRemoved"]},{"prim":"option","annots":["%entrypoint"],"args":[{"prim":"pair","args":[{"prim":"string","annots":["%method"]},{"prim":"address","annots":["%addr"]}]}]}]}]},{"prim":"option","args":[{"prim":"pair","args":[{"prim":"address","annots":["%oldAddr"]},{"prim":"address","annots":["%newAddr"]}]}]}]},{"prim":"pair","annots":["%callContract"],"args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]}]},{"prim":"storage","args":[{"prim":"pair","args":[{"prim":"address","annots":["%governance"]},{"prim":"big_map","annots":["%entrypoints"],"args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"string","annots":["%method"]},{"prim":"address","annots":["%addr"]}]}]}]}]},{"prim":"code","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"IF_LEFT","args":[[[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},{"prim":"SENDER"},{"prim":"COMPARE"},{"prim":"NEQ"},{"prim":"IF","args":[[{"prim":"DROP","args":[{"int":"2"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"Permission denied"}]},{"prim":"FAILWITH"}],[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"CDR"},{"prim":"SWAP"},{"prim":"PAIR"},{"prim":"LEFT","args":[{"prim":"big_map","args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"string"},{"prim":"address"}]}]}]},{"prim":"LOOP_LEFT","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"IF_CONS","args":[[{"prim":"DUP"},{"prim":"GET","args":[{"int":"4"}]},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"True"}]},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"GET","args":[{"int":"3"}]},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DIG","args":[{"int":"2"}]},{"prim":"SWAP"},{"prim":"CAR"},{"prim":"NONE","args":[{"prim":"pair","args":[{"prim":"string"},{"prim":"address"}]}]},{"prim":"SWAP"},{"prim":"UPDATE"}],[{"prim":"DROP"},{"prim":"SWAP"}]]}],[{"prim":"DROP"},{"prim":"PUSH","args":[{"prim":"bool"},{"prim":"False"}]},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"GET","args":[{"int":"3"}]},{"prim":"COMPARE"},{"prim":"EQ"},{"prim":"IF","args":[[{"prim":"DUP"},{"prim":"GET","args":[{"int":"4"}]},{"prim":"IF_NONE","args":[[{"prim":"DROP"},{"prim":"SWAP"}],[{"prim":"DIG","args":[{"int":"3"}]},{"prim":"SWAP"},{"prim":"SOME"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"CAR"},{"prim":"UPDATE"}]]}],[{"prim":"DROP"},{"prim":"SWAP"}]]}]]},{"prim":"SWAP"},{"prim":"PAIR"},{"prim":"LEFT","args":[{"prim":"big_map","args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"string"},{"prim":"address"}]}]}]}],[{"prim":"RIGHT","args":[{"prim":"pair","args":[{"prim":"list","args":[{"prim":"pair","args":[{"prim":"string"},{"prim":"bool"},{"prim":"option","args":[{"prim":"pair","args":[{"prim":"string"},{"prim":"address"}]}]}]}]},{"prim":"big_map","args":[{"prim":"string"},{"prim":"pair","args":[{"prim":"string"},{"prim":"address"}]}]}]}]}]]}]]},{"prim":"SWAP"},{"prim":"IF_NONE","args":[[{"prim":"UPDATE","args":[{"int":"2"}]},{"prim":"NIL","args":[{"prim":"operation"}]}],[{"prim":"DUP"},{"prim":"CAR"},{"prim":"CONTRACT","args":[{"prim":"pair","args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]},{"prim":"IF_NONE","args":[[{"prim":"DROP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"No contract found at this address"}]},{"prim":"FAILWITH"}],[{"prim":"AMOUNT"},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"CDR"},{"prim":"PACK"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"changeVersion"}]},{"prim":"PAIR"},{"prim":"TRANSFER_TOKENS"}]]},{"prim":"DUG","args":[{"int":"2"}]},{"prim":"UPDATE","args":[{"int":"2"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"CONS"}]]},{"prim":"PAIR"}]]}],[[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CDR"},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"CAR"},{"prim":"GET"},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"2"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"No entrypoint found"}]},{"prim":"FAILWITH"}],[{"prim":"DUP"},{"prim":"CDR"},{"prim":"CONTRACT","args":[{"prim":"pair","args":[{"prim":"string","annots":["%entrypointName"]},{"prim":"bytes","annots":["%payload"]}]}]},{"prim":"IF_NONE","args":[[{"prim":"DROP","args":[{"int":"3"}]},{"prim":"PUSH","args":[{"prim":"string"},{"string":"No contract found at this address"}]},{"prim":"FAILWITH"}],[{"prim":"DIG","args":[{"int":"3"}]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"DIG","args":[{"int":"2"}]},{"prim":"AMOUNT"},{"prim":"DIG","args":[{"int":"5"}]},{"prim":"CDR"},{"prim":"DIG","args":[{"int":"5"}]},{"prim":"CAR"},{"prim":"PAIR"},{"prim":"TRANSFER_TOKENS"},{"prim":"CONS"},{"prim":"PAIR"}]]}]]}]]}]]},{"prim":"view","args":[{"string":"getView"},{"prim":"string"},{"prim":"bytes"},[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"SWAP"},{"prim":"CDR"},[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}],{"prim":"GET"},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"string"},{"string":" not declared on this proxy"}]},{"prim":"SWAP"},{"prim":"PUSH","args":[{"prim":"string"},{"string":"View "}]},{"prim":"CONCAT"},{"prim":"CONCAT"},{"prim":"FAILWITH"}],[{"prim":"CDR"},{"prim":"SWAP"},{"prim":"VIEW","args":[{"string":"getView"},{"prim":"bytes"}]},{"prim":"IF_NONE","args":[[{"prim":"PUSH","args":[{"prim":"string"},{"string":"option is None"}]},{"prim":"FAILWITH"}],[]]}]]}]]}]`) }; diff --git a/solution/app/src/proxy.types.ts b/solution/app/src/proxy.types.ts index 87e0d71..c6e058e 100644 --- a/solution/app/src/proxy.types.ts +++ b/solution/app/src/proxy.types.ts @@ -3,48 +3,48 @@ import { ContractAbstractionFromContractType, WalletContractAbstractionFromContr import { address, BigMap, bytes } from './type-aliases'; export type Storage = { + governance: address; entrypoints: BigMap; - governance: address; }; type Methods = { - callContract: ( - entrypointName: string, - payload: bytes, - ) => Promise; upgrade: ( _0: Array<{ + name: string; + isRemoved: boolean; entrypoint: {Some: { - addr: address; method: string; + addr: address; }} | null; - isRemoved: boolean; - name: string; }>, - newAddr: address, oldAddr: address, + newAddr: address, + ) => Promise; + callContract: ( + entrypointName: string, + payload: bytes, ) => Promise; }; type MethodsObject = { - callContract: (params: { - entrypointName: string, - payload: bytes, - }) => Promise; upgrade: (params: { 0: Array<{ + name: string; + isRemoved: boolean; entrypoint: {Some: { - addr: address; method: string; + addr: address; }} | null; - isRemoved: boolean; - name: string; }>, - newAddr: address, oldAddr: address, + newAddr: address, + }) => Promise; + callContract: (params: { + entrypointName: string, + payload: bytes, }) => Promise; }; diff --git a/solution/app/vite.config.ts b/solution/app/vite.config.ts index c22b080..365cf6e 100644 --- a/solution/app/vite.config.ts +++ b/solution/app/vite.config.ts @@ -1,19 +1,40 @@ import react from "@vitejs/plugin-react-swc"; +import path from "path"; import { defineConfig } from "vite"; - // https://vitejs.dev/config/ -export default defineConfig({ - define: { - global: {}, - }, - plugins: [react()], - resolve: { - alias: { - stream: "stream-browserify", - os: "os-browserify/browser", - util: "util", - process: "process/browser", - buffer: "buffer", +export default ({ command }) => { + const isBuild = command === "build"; + + return defineConfig({ + define: {}, + plugins: [react()], + build: { + commonjsOptions: { + transformMixedEsModules: true, + }, + }, + resolve: { + alias: { + // dedupe @airgap/beacon-sdk + // I almost have no idea why it needs `cjs` on dev and `esm` on build, but this is how it works šŸ¤·ā€ā™‚ļø + "@airgap/beacon-sdk": path.resolve( + path.resolve(), + `./node_modules/@airgap/beacon-sdk/dist/${ + isBuild ? "esm" : "cjs" + }/index.js` + ), + stream: "stream-browserify", + os: "os-browserify/browser", + util: "util", + process: "process/browser", + buffer: "buffer", + crypto: "crypto-browserify", + assert: "assert", + http: "stream-http", + https: "https-browserify", + url: "url", + path: "path-browserify", + }, }, - }, -}); + }); +}; diff --git a/solution/app/yarn.lock b/solution/app/yarn.lock index 0ad987a..641f304 100644 --- a/solution/app/yarn.lock +++ b/solution/app/yarn.lock @@ -7,184 +7,113 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@airgap/beacon-blockchain-substrate@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.0.6.tgz#25a45e63e2ff4f1bd0fcf569a0796c4f92940a39" - integrity sha512-6tP2Y/67fc/U8JPoMpYspvb9NSw2NfHPOYLchmf+y1VO1ybK9cSr3mWPLWoomjAyEWPpY9ymVzflEsnQMVDiXQ== +"@airgap/beacon-blockchain-substrate@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.0.10.tgz#755e54b51b032e6c6ed5bd1dd8ba0eefd165994f" + integrity sha512-2QO51om5flWf6Q47cJibsBCnz95pbe1WE7HZXkWQhQ6SG++IVSmJAY2Ir2pei1k63aHXYE3+VTHSuR7R4fj56A== dependencies: - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-ui" "4.0.6" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-ui" "4.0.10" -"@airgap/beacon-blockchain-tezos@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.0.6.tgz#f0546a41e87b492f5be6aa504a641245563699b4" - integrity sha512-YLGWSHkhmkC4KomW15bj2MRDGROQxn8oBlN2MJ1N+2CwLmEEEo4WPsIgBNuRhfUdM1/toOAiHICy5v7g98jieQ== +"@airgap/beacon-blockchain-tezos@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.0.10.tgz#c1d6fd7cc00d35e1844cc0aa5c60c1c85947b453" + integrity sha512-l7eHC1YyD45EbXuwKQ9rZs7GeoZAFaaBwNm0PVYmC28Op8Mj2lS1FHTqYHNPHqg4+pf/AySLu4h+z2onCwBmug== dependencies: - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-ui" "4.0.6" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-ui" "4.0.10" -"@airgap/beacon-core@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-core/-/beacon-core-4.0.2.tgz#3f94fbec9c86ff99659e789b70e1684db450234e" - integrity sha512-a6mAn6BfbejBQI95tRc6pIZ0VS6MTK9MZ7iXPTLF9hrnCHiROmrCgNKst8qp2dcE0Ehk7z/hGs2WliJzi657YA== - dependencies: - "@airgap/beacon-types" "4.0.2" - "@airgap/beacon-utils" "4.0.2" - "@stablelib/ed25519" "^1.0.3" - "@stablelib/nacl" "^1.0.4" - "@stablelib/utf8" "^1.0.1" - "@stablelib/x25519-session" "^1.0.4" - bs58check "2.1.2" - -"@airgap/beacon-core@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-core/-/beacon-core-4.0.6.tgz#024c3424fc7fa85ce361345be5beb87a034647a8" - integrity sha512-gSyA1rEZ9Rphbr575UgYNnEAcVAYaZ1AGo/7m4xmvyNVAi906BPfnfpsrH8HfsDZRcnW+ahMd+YElA6a2tesmw== +"@airgap/beacon-core@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-core/-/beacon-core-4.0.10.tgz#6db34dd80717195c2a6651e4194c878fc0dc4e16" + integrity sha512-iOAKZRD5BSDFfZKa++FoYBnfDhTLZSzKUbhF/AI6CnnTgzZaEbkTIs+/XVpFhcJQY58hJN77cGnioeG2/WCWkw== dependencies: - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-utils" "4.0.6" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-utils" "4.0.10" "@stablelib/ed25519" "^1.0.3" "@stablelib/nacl" "^1.0.4" "@stablelib/utf8" "^1.0.1" "@stablelib/x25519-session" "^1.0.4" bs58check "2.1.2" -"@airgap/beacon-dapp@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-dapp/-/beacon-dapp-4.0.2.tgz#783c28faa98f30427b5e5b3551dd10570de71588" - integrity sha512-7vjvcM470GPfDkizYpuUzJ7Fus7X/zkFeXYTkxx69Dt5TlmKg09YNfRtvrFMDbf4OKnjbaRfVhqzwfYkpaRbPg== - dependencies: - "@airgap/beacon-core" "4.0.2" - "@airgap/beacon-transport-matrix" "4.0.2" - "@airgap/beacon-transport-postmessage" "4.0.2" - "@airgap/beacon-transport-walletconnect" "4.0.2" - "@airgap/beacon-ui" "4.0.2" - -"@airgap/beacon-dapp@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-dapp/-/beacon-dapp-4.0.6.tgz#ace0726547a7a733958b249ffb39c4dfef42d364" - integrity sha512-4+AgPopWWjwxVJcpLXTlRGb/5jdkc0MUjBvtH6kZJfhf2drsdWUkBtGHCiqpy8KjLLOiyVgdGniNTFt4025hsg== - dependencies: - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-transport-matrix" "4.0.6" - "@airgap/beacon-transport-postmessage" "4.0.6" - "@airgap/beacon-transport-walletconnect" "4.0.6" - "@airgap/beacon-ui" "4.0.6" - -"@airgap/beacon-sdk@^4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-sdk/-/beacon-sdk-4.0.6.tgz#05411a87137cc0836f94a4c2f028136ac32c9656" - integrity sha512-fY3V/oK6W7G3dZlgTd+zJOQkaMtageolBviH7PjqhAbAztlK0GNrateJg53Z7ZLIGVIoS4jZ7nAMfBR5Ll+Nyg== - dependencies: - "@airgap/beacon-blockchain-substrate" "4.0.6" - "@airgap/beacon-blockchain-tezos" "4.0.6" - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-dapp" "4.0.6" - "@airgap/beacon-transport-matrix" "4.0.6" - "@airgap/beacon-transport-postmessage" "4.0.6" - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-ui" "4.0.6" - "@airgap/beacon-utils" "4.0.6" - "@airgap/beacon-wallet" "4.0.6" - -"@airgap/beacon-transport-matrix@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.0.2.tgz#deae15cf467c89726df6665428e671d7f8e275c6" - integrity sha512-sidXWA9QkcdpTLObsgMIIePq2+6eHn8djSK2UeoAWZpVOky+jpaIU78UlzqgDzMrO9inzu/xwsuXlk5Nmy1RyA== - dependencies: - "@airgap/beacon-core" "4.0.2" - "@airgap/beacon-utils" "4.0.2" +"@airgap/beacon-dapp@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-dapp/-/beacon-dapp-4.0.10.tgz#ba28ef61ebcafc643fbd325da3baff76868d6c7e" + integrity sha512-QfoRKxMCt4/RjW/lkExicoqzwdhhEhRxPwntS19VW+Q+cWhsJhmWULdF3rQNHRBtSsHws3LnOT0r8e1hndDxfQ== + dependencies: + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-transport-matrix" "4.0.10" + "@airgap/beacon-transport-postmessage" "4.0.10" + "@airgap/beacon-transport-walletconnect" "4.0.10" + "@airgap/beacon-ui" "4.0.10" + +"@airgap/beacon-sdk@^4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-sdk/-/beacon-sdk-4.0.10.tgz#07cf46388efb74bec455db43df7dffd5a83a2906" + integrity sha512-wrgXnkXBHjL2gKd6q/CUdr8ekrkmD0V+XlMXfFAAnLQuV3vDU6oB9uO5mSxYvxs5htKUb6JURiKyDi7/eWSDMw== + dependencies: + "@airgap/beacon-blockchain-substrate" "4.0.10" + "@airgap/beacon-blockchain-tezos" "4.0.10" + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-dapp" "4.0.10" + "@airgap/beacon-transport-matrix" "4.0.10" + "@airgap/beacon-transport-postmessage" "4.0.10" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-ui" "4.0.10" + "@airgap/beacon-utils" "4.0.10" + "@airgap/beacon-wallet" "4.0.10" + +"@airgap/beacon-transport-matrix@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.0.10.tgz#f71432d975ee72cd60be97eefb5b570d5a1523d7" + integrity sha512-UB7QZaI+hizg5vWYXaGyZfl0uQbhcbJzS6vzyeYxQcUH6uK9h3drHL/UiF8RQuMK73P3WcxShQq1Wn2Pu02gag== + dependencies: + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-utils" "4.0.10" axios "0.24.0" -"@airgap/beacon-transport-matrix@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.0.6.tgz#e2e041ad366b3ad3d4a305da7ff7cb8f5b020309" - integrity sha512-wLla13DorVGadc4fG5S/o1EijwpTKIADP0DhGGD33bQc5s/59BFNSPAo3ZErZqD7+5vn7JTRKN4V/JUigsX+ZA== - dependencies: - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-utils" "4.0.6" - axios "0.24.0" - -"@airgap/beacon-transport-postmessage@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.0.2.tgz#002a922bf707b6d77b59d97e6225b2c6d8020910" - integrity sha512-UDHigcIRD5/VdKX3YDj+CVHYWafYg3N8nHT5yQ2JOU5nsQhD2y5NNNp/7U7I44CcD4OeK9d2slV+lnp8lBYe1g== - dependencies: - "@airgap/beacon-core" "4.0.2" - "@airgap/beacon-types" "4.0.2" - "@airgap/beacon-utils" "4.0.2" - -"@airgap/beacon-transport-postmessage@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.0.6.tgz#2978d1fdbdb7bb33b861ad052f4c65347fbfb520" - integrity sha512-lEwh3bLEOHnvjqA2ffaYxiIfcHLjnk0CzKW3CsvA5RJaMMZATNYj63HKC85K1SQZmy5EPReqGrjg7NpohC/TKw== +"@airgap/beacon-transport-postmessage@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.0.10.tgz#30b07bbbb3b24b0150dfba779a250a902729cb1a" + integrity sha512-MaBRLU/8QFFyXt9LoTN1Vz3dnRwHPptl0r4XPPH6enJTNBZ6PoqLenIs+BiCMMrnMKlBTlRHzfDUlSd9avcFbA== dependencies: - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-utils" "4.0.6" + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-utils" "4.0.10" -"@airgap/beacon-transport-walletconnect@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.0.2.tgz#ced84f173a5fc4be5cc88503346612694dca250f" - integrity sha512-t4ZrgyImVf8UIhVa6ei/p1STVKNdRq5WSoop8eTSqArIHVj4zk2dr5J0ihbe64UyLAX1O0Z7yV+dUVoH+kVWGw== +"@airgap/beacon-transport-walletconnect@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.0.10.tgz#5b08b3e286875f7af48f10fc1529fd1a4c01c198" + integrity sha512-SV9RIZLk6pZVPfEFWWJzB4MuVGi+fBGQsZI25NTPvuT9bvF6IBZwdQp8YwdNiGK3lOhThH+eb82W/b8CH6OOyg== dependencies: - "@airgap/beacon-core" "4.0.2" - "@airgap/beacon-types" "4.0.2" - "@airgap/beacon-utils" "4.0.2" + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-utils" "4.0.10" "@walletconnect/sign-client" "2.7.0" -"@airgap/beacon-transport-walletconnect@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.0.6.tgz#1ef37a9198c829376e61eb6ad4c52da7e2f4eadc" - integrity sha512-/YxGCbhw8JqkyEYGd7mCa5greMYO9/Ro+61xQv1/3WjT/wlTYFDF0tuH+Di6ZxVz7SBk8e95bQsKL5u10poGoA== - dependencies: - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-utils" "4.0.6" - "@walletconnect/sign-client" "^2.9.0" - -"@airgap/beacon-types@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-types/-/beacon-types-4.0.2.tgz#031fd61f6c5b63cdbe4b42d737223942ea738c00" - integrity sha512-MWbE+350Yd7aICBEwTVIkty/YmKO5eTDsMbReUCNH8qf64gGhj/ZXEN6FPwMab+qKdmACgCkmbbtAXGGtmjwrA== +"@airgap/beacon-types@4.0.10", "@airgap/beacon-types@^4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-types/-/beacon-types-4.0.10.tgz#73c7e55532cdccf8dc5fd50c1f1fcef3f9ddc619" + integrity sha512-C7gRyReO1puytL+D9I0xV5WTdbqXtHRcRJHnXt+KTWckZf9eHmUcnAk5JinBlIyFT0oz5jgPxN63UmhJ+lTtZQ== dependencies: "@types/chrome" "0.0.163" -"@airgap/beacon-types@4.0.6", "@airgap/beacon-types@^4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-types/-/beacon-types-4.0.6.tgz#55ea00ddbc71ea4686833dcebd2fcfc12ad32302" - integrity sha512-9hBUts03MdYAp0IdNnXbLO1JDZd3jNXyez4ahht0jv396aPc27ZKAcWKBjkZCMbxQwpw9/pZVAmkLCErYNMSww== +"@airgap/beacon-ui@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-ui/-/beacon-ui-4.0.10.tgz#a2abe32360af84117b145275e9246e7ce76d42e4" + integrity sha512-mvhtUSpKfkfz+MWSKXVWHcE8SqD8ChtOv/0dNziQr75LPmLreMB29/hZEQYCfF0T+FXeNVjTvizOlw8sv2Gd6g== dependencies: - "@types/chrome" "0.0.163" - -"@airgap/beacon-ui@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-ui/-/beacon-ui-4.0.2.tgz#3268f7a001b6499c020d051c91f209f3126022fe" - integrity sha512-ZTcvdQ5GNlQ58M0Fduoq/KqsulBXeBN6jKiHnzHM3e98syy953DKQoDhU2NXNZiJ7AvEGO3s/fd+BN8y/+CVuQ== - dependencies: - "@airgap/beacon-core" "4.0.2" - "@airgap/beacon-transport-postmessage" "4.0.2" - "@airgap/beacon-types" "4.0.2" - "@airgap/beacon-utils" "4.0.2" + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-transport-postmessage" "4.0.10" + "@airgap/beacon-types" "4.0.10" + "@airgap/beacon-utils" "4.0.10" qrcode-svg "^1.1.0" solid-js "^1.6.6" -"@airgap/beacon-ui@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-ui/-/beacon-ui-4.0.6.tgz#fa3ee1bee6c6e0ba0dd828c1d6364657c0e709cf" - integrity sha512-wid0hxsR4QrB8se1/ID7H8O9BVL3VrLUjTEIMqaXPNyDa+p53FNTVq+CGeKJ8dz/IcjjZrRB7ZTRlYVTxgqP5A== - dependencies: - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-transport-postmessage" "4.0.6" - "@airgap/beacon-types" "4.0.6" - "@airgap/beacon-utils" "4.0.6" - qrcode-svg "^1.1.0" - solid-js "^1.6.6" - -"@airgap/beacon-utils@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@airgap/beacon-utils/-/beacon-utils-4.0.2.tgz#6f255b03a2d0f868f19495f25a28d362bc9ffeca" - integrity sha512-5TfOI3ZolQQ9WNHogEO3SY4M2Paqbb3hf8DvolFofST6Brp0qyxkwZ0i99puahgwRo+B0qGilZpkLCYl72DMQg== +"@airgap/beacon-utils@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-utils/-/beacon-utils-4.0.10.tgz#9971e6c060f635a8607afeb515e737278c29dbb0" + integrity sha512-g4nCL8hQ2Y59Lp1a0BEm01HbGpjq+WOFFHTD5G3ySTHXwYOIfP1h8T9SLerK2hb91/nMJxthjAshfNwKXaqbqw== dependencies: "@stablelib/ed25519" "^1.0.3" "@stablelib/nacl" "^1.0.3" @@ -192,25 +121,14 @@ "@stablelib/utf8" "^1.0.1" bs58check "2.1.2" -"@airgap/beacon-utils@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-utils/-/beacon-utils-4.0.6.tgz#5f1662f1ebf1297b839807fd1909717335e0c740" - integrity sha512-vV6xtS50Qd/VzJPeoK3y14ddSR+9AEV0HtmP7BcYC5jTN2flT+PlTO8y8vS0+Yx8eFnQTnlS2vp7a2DTa/aWUA== +"@airgap/beacon-wallet@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@airgap/beacon-wallet/-/beacon-wallet-4.0.10.tgz#f08f369c542a5a0f6ba84f8f3afff5274f432a17" + integrity sha512-qrmGsOQLF2c9R8G++vsYw74puJkVQa8cnNrcNvYYWo4LgjncZT9hKLZ2kdcODEQ992Sn8nP5ry8vpCBaOPqG0w== dependencies: - "@stablelib/ed25519" "^1.0.3" - "@stablelib/nacl" "^1.0.3" - "@stablelib/random" "^1.0.2" - "@stablelib/utf8" "^1.0.1" - bs58check "2.1.2" - -"@airgap/beacon-wallet@4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@airgap/beacon-wallet/-/beacon-wallet-4.0.6.tgz#f098027eb58c01ed55ca04ebbea1b6694a46c29e" - integrity sha512-m3jJvWB7JAl/Dehn8i8dRN0e6+NSNRVpzDxfO7nDedQiuPKmgcFPmenP87zF51spXDHKTkK4t7YU4HGDYR2Xrw== - dependencies: - "@airgap/beacon-core" "4.0.6" - "@airgap/beacon-transport-matrix" "4.0.6" - "@airgap/beacon-transport-postmessage" "4.0.6" + "@airgap/beacon-core" "4.0.10" + "@airgap/beacon-transport-matrix" "4.0.10" + "@airgap/beacon-transport-postmessage" "4.0.10" "@apidevtools/json-schema-ref-parser@9.0.6": version "9.0.6" @@ -244,115 +162,115 @@ ajv-draft-04 "^1.0.0" call-me-maybe "^1.0.1" -"@esbuild/android-arm64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.19.tgz#8735b552b8e0b9a943460d37fbc976b9d9cd4b4e" - integrity sha512-4+jkUFQxZkQfQOOxfGVZB38YUWHMJX2ihZwF+2nh8m7bHdWXpixiurgGRN3c/KMSwlltbYI0/i929jwBRMFzbA== - -"@esbuild/android-arm@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.19.tgz#efd1f33583a893c0cc57f25b1d081af8cdc6bfd9" - integrity sha512-1uOoDurJYh5MNqPqpj3l/TQCI1V25BXgChEldCB7D6iryBYqYKrbZIhYO5AI9fulf66sM8UJpc3UcCly2Tv28w== - -"@esbuild/android-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.19.tgz#d9f35722701a97a2ef69c7a84f1ee2aef2a306a7" - integrity sha512-ae5sHYiP/Ogj2YNrLZbWkBmyHIDOhPgpkGvFnke7XFGQldBDWvc/AyYwSLpNuKw9UNkgnLlB/jPpnBmlF3G9Bg== - -"@esbuild/darwin-arm64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.19.tgz#8cb81b971ee5231acc7de07225f6e18562c359e4" - integrity sha512-HIpQvNQWFYROmWDANMRL+jZvvTQGOiTuwWBIuAsMaQrnStedM+nEKJBzKQ6bfT9RFKH2wZ+ej+DY7+9xHBTFPg== - -"@esbuild/darwin-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.19.tgz#81024ab64232dd323f03796d449f018b59f04ca9" - integrity sha512-m6JdvXJQt0thNLIcWOeG079h2ivhYH4B5sVCgqb/B29zTcFd7EE8/J1nIUHhdtwGeItdUeqKaqqb4towwxvglQ== - -"@esbuild/freebsd-arm64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.19.tgz#9fa91e3b08d10c0adfa71b37372a7627b26e9686" - integrity sha512-G0p4EFMPZhGn/xVNspUyMQbORH3nlKTV0bFNHPIwLraBuAkTeMyxNviTe0ZXUbIXQrR1lrwniFjNFU4s+x7veQ== - -"@esbuild/freebsd-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.19.tgz#ef6f5a85c1bb029fb0076da5b223e50b353e615c" - integrity sha512-hBxgRlG42+W+j/1/cvlnSa+3+OBKeDCyO7OG2ICya1YJaSCYfSpuG30KfOnQHI7Ytgu4bRqCgrYXxQEzy0zM5Q== - -"@esbuild/linux-arm64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.19.tgz#0cef913dcdc1efb1bb04406a8e5f5668b721d89e" - integrity sha512-X8g33tczY0GsJq3lhyBrjnFtaKjWVpp1gMq5IlF9BQJ3TUfSK74nQnz9mRIEejmcV+OIYn6bkOJeUaU1Knrljg== - -"@esbuild/linux-arm@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.19.tgz#39ea874c8e5177b83903bec1883a43f3c163627a" - integrity sha512-qtWyoQskfJlb9MD45mvzCEKeO4uCnDZ7lPFeNqbfaaJHqBiH9qA5Vu2EuckqYZuFMJWy1l4dxTf9NOulCVfUjg== - -"@esbuild/linux-ia32@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.19.tgz#283cd3c3d8380e8fab90583fa86ca1fcc9b9ec57" - integrity sha512-SAkRWJgb+KN+gOhmbiE6/wu23D6HRcGQi15cB13IVtBZZgXxygTV5GJlUAKLQ5Gcx0gtlmt+XIxEmSqA6sZTOw== - -"@esbuild/linux-loong64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.19.tgz#1c69d7928a55b26326398d31d2ac9c82d2297f1b" - integrity sha512-YLAslaO8NsB9UOxBchos82AOMRDbIAWChwDKfjlGrHSzS3v1kxce7dGlSTsrb0PJwo1KYccypN3VNjQVLtz7LA== - -"@esbuild/linux-mips64el@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.19.tgz#b25b352e7645885fa1d01182116c506a78fe4733" - integrity sha512-vSYFtlYds/oTI8aflEP65xo3MXChMwBOG1eWPGGKs/ev9zkTeXVvciU+nifq8J1JYMz+eQ4J9JDN0O2RKF8+1Q== - -"@esbuild/linux-ppc64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.19.tgz#568b5a051f47af732c4314e697bb559a14b3d811" - integrity sha512-tgG41lRVwlzqO9tv9l7aXYVw35BxKXLtPam1qALScwSqPivI8hjkZLNH0deaaSCYCFT9cBIdB+hUjWFlFFLL9A== - -"@esbuild/linux-riscv64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.19.tgz#020729b47ca63321667297d1610bab81cd08a65c" - integrity sha512-EgBZFLoN1S5RuB4cCJI31pBPsjE1nZ+3+fHRjguq9Ibrzo29bOLSBcH1KZJvRNh5qtd+fcYIGiIUia8Jw5r1lQ== - -"@esbuild/linux-s390x@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.19.tgz#ed5cca8dac130d2f736914f9efad5fa15c238c20" - integrity sha512-q1V1rtHRojAzjSigZEqrcLkpfh5K09ShCoIsdTakozVBnM5rgV58PLFticqDp5UJ9uE0HScov9QNbbl8HBo6QQ== - -"@esbuild/linux-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.19.tgz#f8023a38ae02b46c60a134ccbc7ae377b3bec66f" - integrity sha512-D0IiYjpZRXxGZLQfsydeAD7ZWqdGyFLBj5f2UshJpy09WPs3qizDCsEr8zyzcym6Woj/UI9ZzMIXwvoXVtyt0A== - -"@esbuild/netbsd-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.19.tgz#8fd667c535db0a5b346afa2d74ff1fb53477427f" - integrity sha512-3tt3SOS8L3D54R8oER41UdDshlBIAjYhdWRPiZCTZ1E41+shIZBpTjaW5UaN/jD1ENE/Ok5lkeqhoNMbxstyxw== - -"@esbuild/openbsd-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.19.tgz#354d5b54a6bffa381cb513e878880192e07004be" - integrity sha512-MxbhcuAYQPlfln1EMc4T26OUoeg/YQc6wNoEV8xvktDKZhLtBxjkoeESSo9BbPaGKhAPzusXYj5n8n5A8iZSrA== - -"@esbuild/sunos-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.19.tgz#e2de98bd961e04f76f6acf5970263efc7051def5" - integrity sha512-m0/UOq1wj25JpWqOJxoWBRM9VWc3c32xiNzd+ERlYstUZ6uwx5SZsQUtkiFHaYmcaoj+f6+Tfcl7atuAz3idwQ== - -"@esbuild/win32-arm64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.19.tgz#9dca55f0dcbbdb50bf36353d1114f5f71c269275" - integrity sha512-L4vb6pcoB1cEcXUHU6EPnUhUc4+/tcz4OqlXTWPcSQWxegfmcOprhmIleKKwmMNQVc4wrx/+jB7tGkjjDmiupg== - -"@esbuild/win32-ia32@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.19.tgz#db6ea4467e87e6d3fc2177dea35e81f26f7a061d" - integrity sha512-rQng7LXSKdrDlNDb7/v0fujob6X0GAazoK/IPd9C3oShr642ri8uIBkgM37/l8B3Rd5sBQcqUXoDdEy75XC/jg== - -"@esbuild/win32-x64@0.18.19": - version "0.18.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.19.tgz#6105755d7097e0d7e22f893c3e62f143d8137bd0" - integrity sha512-z69jhyG20Gq4QL5JKPLqUT+eREuqnDAFItLbza4JCmpvUnIlY73YNjd5djlO7kBiiZnvTnJuAbOjIoZIOa1GjA== +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== + +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== + +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== + +"@esbuild/darwin-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== + +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== + +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== + +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== + +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== + +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== + +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== + +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== + +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== + +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== + +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== + +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== + +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== + +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== + +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== + +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== + +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== + +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -362,14 +280,14 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.6.2" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" - integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== + version "4.9.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.0.tgz#7ccb5f58703fa61ffdcbf39e2c604a109e781162" + integrity sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ== -"@eslint/eslintrc@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.1.tgz#18d635e24ad35f7276e8a49d135c7d3ca6a46f93" - integrity sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA== +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -381,20 +299,20 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@^8.46.0": - version "8.46.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.46.0.tgz#3f7802972e8b6fe3f88ed1aabc74ec596c456db6" - integrity sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA== +"@eslint/js@8.50.0": + version "8.50.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.50.0.tgz#9e93b850f0f3fa35f5fa59adfd03adae8488e484" + integrity sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ== "@exodus/schemasafe@^1.0.0-rc.2": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.1.1.tgz#006ab8b33b1aec6d2992c75e5918c65197388aa2" - integrity sha512-Pd7+aGvWIaTDL5ecV4ZBEtBrjXnk8/ly5xyHbikxVhgcq7qhihzHWHbcYmFupQBT2A5ggNZGvT7Bpj0M6AKHjA== + version "1.3.0" + resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.3.0.tgz#731656abe21e8e769a7f70a4d833e6312fe59b7f" + integrity sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw== -"@humanwhocodes/config-array@^0.11.10": - version "0.11.10" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" - integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -624,153 +542,166 @@ "@stablelib/salsa20" "^1.0.2" "@stablelib/wipe" "^1.0.1" -"@swc/core-darwin-arm64@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.74.tgz#5ec6f504fb8cd74fd5133080f6cc670327a867cd" - integrity sha512-2rMV4QxM583jXcREfo0MhV3Oj5pgRSfSh/kVrB1twL2rQxOrbzkAPT/8flmygdVoL4f2F7o1EY5lKlYxEBiIKQ== - -"@swc/core-darwin-x64@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.74.tgz#5da7bdc4ad0fb3b4375d9c1039672ae8f61efaeb" - integrity sha512-KKEGE1wXneYXe15fWDRM8/oekd/Q4yAuccA0vWY/7i6nOSPqWYcSDR0nRtR030ltDxWt0rk/eCTmNkrOWrKs3A== - -"@swc/core-linux-arm-gnueabihf@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.74.tgz#52d818692aaaf9138e1175956271cae8107c1096" - integrity sha512-HehH5DR6r/5fIVu7tu8ZqgrHkhSCQNewf1ztFQJgcmaQWn+H4AJERBjwkjosqh4TvUJucZv8vyRTvrFeBXaCSA== - -"@swc/core-linux-arm64-gnu@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.74.tgz#b230ba8623edb3c4b9ceffaf9aced8bf7a9fc829" - integrity sha512-+xkbCRz/wczgdknoV4NwYxbRI2dD7x/qkIFcVM2buzLCq8oWLweuV8+aL4pRqu0qDh7ZSb1jcaVTUIsySCJznA== - -"@swc/core-linux-arm64-musl@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.74.tgz#05ff0f3046aba1dd9d2d8793c10cd4a21a46fd7f" - integrity sha512-maKFZSCD3tQznzPV7T3V+TtiWZFEFM8YrnSS5fQNNb+K9J65sL+170uTb3M7H4cFkG+9Sm5k5yCrCIutlvV48g== - -"@swc/core-linux-x64-gnu@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.74.tgz#a98d9a984d47404aa2de478dd3cd33dbd195bba2" - integrity sha512-LEXpcShF6DLTWJSiBhMSYZkLQ27UvaQ24fCFhoIV/R3dhYaUpHmIyLPPBNC82T03lB3ONUFVwrRw6fxDJ/f00A== - -"@swc/core-linux-x64-musl@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.74.tgz#95e04431eba994b4fae23c578ad1ba73fb72c21d" - integrity sha512-sxsFctbFMZEFmDE7CmYljG0dMumH8XBTwwtGr8s6z0fYAzXBGNq2AFPcmEh2np9rPWkt7pE1m0ByESD+dMkbxQ== - -"@swc/core-win32-arm64-msvc@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.74.tgz#62cb708094a8902a307fba6eea08682dbccd472d" - integrity sha512-F7hY9/BjFCozA4YPFYFH5FGCyWwa44vIXHqG66F5cDwXDGFn8ZtBsYIsiPfUYcx0AeAo1ojnVWKPxokZhYNYqA== - -"@swc/core-win32-ia32-msvc@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.74.tgz#fe5a2d8bbddb609e554e0d8d678093973096330c" - integrity sha512-qBAsiD1AlIdqED6wy3UNRHyAys9pWMUidX0LJ6mj24r/vfrzzTBAUrLJe5m7bzE+F1Rgi001avYJeEW1DLEJ+Q== - -"@swc/core-win32-x64-msvc@1.3.74": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.74.tgz#4fd459c7264d4c97d1b2965ed6aa86b1725ce38b" - integrity sha512-S3YAvvLprTnPRwQuy9Dkwubb5SRLpVK3JJsqYDbGfgj8PGQyKHZcVJ5X3nfFsoWLy3j9B/3Os2nawprRSzeC5A== - -"@swc/core@^1.3.61": - version "1.3.74" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.74.tgz#b1d1a3c46ca32b7f10d970c8a209d2913c9de251" - integrity sha512-P+MIExOTdWlfq8Heb1/NhBAke6UTckd4cRDuJoFcFMGBRvgoCMNWhnfP3FRRXPLI7GGg27dRZS+xHiqYyQmSrA== +"@swc/core-darwin-arm64@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.90.tgz#5eb85b4911c6e1a8a082711b7ef3d4be3f86163f" + integrity sha512-he0w74HvcoufE6CZrB/U/VGVbc7021IQvYrn1geMACnq/OqMBqjdczNtdNfJAy87LZ4AOUjHDKEIjsZZu7o8nQ== + +"@swc/core-darwin-x64@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.90.tgz#e6d5c2118c6ad060f58ce9c7d246cf4c30420516" + integrity sha512-hKNM0Ix0qMlAamPe0HUfaAhQVbZEL5uK6Iw8v9ew0FtVB4v7EifQ9n41wh+yCj0CjcHBPEBbQU0P6mNTxJu/RQ== + +"@swc/core-linux-arm-gnueabihf@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.90.tgz#02cfecb0e5f3457e64e81eca70337c6dadba864d" + integrity sha512-HumvtrqTWE8rlFuKt7If0ZL7145H/jVc4AeziVjcd+/ajpqub7IyfrLCYd5PmKMtfeSVDMsxjG0BJ0HLRxrTJA== + +"@swc/core-linux-arm64-gnu@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.90.tgz#1ed87e65facc446880f5753fb89951da418f6ff5" + integrity sha512-tA7DqCS7YCwngwXZQeqQhhMm8BbydpaABw8Z/EDQ7KPK1iZ1rNjZw+aWvSpmNmEGmH1RmQ9QDS9mGRDp0faAeg== + +"@swc/core-linux-arm64-musl@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.90.tgz#531edd90f46aa7282e919178633f483f7ba073d6" + integrity sha512-p2Vtid5BZA36fJkNUwk5HP+HJlKgTru+Ghna7pRe45ghKkkRIUk3fhkgudEvfKfhT+3AvP+GTVQ+T9k0gc9S8w== + +"@swc/core-linux-x64-gnu@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.90.tgz#7b3937570964e290a0f382353d88fe8421ceb470" + integrity sha512-J6pDtWaulYGXuANERuvv4CqmUbZOQrRZBCRQGZQJ6a86RWpesZqckBelnYx48wYmkgvMkF95Y3xbI3WTfoSHzw== + +"@swc/core-linux-x64-musl@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.90.tgz#ae042d8dc84e086954a26308e4bccf6f38c1dafe" + integrity sha512-3Gh6EA3+0K+l3MqnRON7h5bZ32xLmfcVM6QiHHJ9dBttq7YOEeEoMOCdIPMaQxJmK1VfLgZCsPYRd66MhvUSkw== + +"@swc/core-win32-arm64-msvc@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.90.tgz#4952413bae4c5dbd7c150f7a626556fc6a2a3525" + integrity sha512-BNaw/iJloDyaNOFV23Sr53ULlnbmzSoerTJ10v0TjSZOEIpsS0Rw6xOK1iI0voDJnRXeZeWRSxEC9DhefNtN/g== + +"@swc/core-win32-ia32-msvc@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.90.tgz#ea5d417d3085dc521e6be6ecaef8c6ca59c4e5ec" + integrity sha512-SiyTethWAheE/JbxXCukAAciU//PLcmVZ2ME92MRuLMLmOhrwksjbaa7ukj9WEF3LWrherhSqTXnpj3VC1l/qw== + +"@swc/core-win32-x64-msvc@1.3.90": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.90.tgz#af770b063fe7f32488a87cf0a9777e11932f7a3a" + integrity sha512-OpWAW5ljKcPJ3SQ0pUuKqYfwXv7ssIhVgrH9XP9ONtdgXKWZRL9hqJQkcL55FARw/gDjKanoCM47wsTNQL+ZZA== + +"@swc/core@^1.3.85": + version "1.3.90" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.90.tgz#ef43524b76ef04798e6afb01d90347f4f51de136" + integrity sha512-wptBxP4PldOnhmyDVj8qUcn++GRqyw1qc9wOTGtPNHz8cpuTfdfIgYGlhI4La0UYqecuaaIfLfokyuNePOMHPg== + dependencies: + "@swc/counter" "^0.1.1" + "@swc/types" "^0.1.5" optionalDependencies: - "@swc/core-darwin-arm64" "1.3.74" - "@swc/core-darwin-x64" "1.3.74" - "@swc/core-linux-arm-gnueabihf" "1.3.74" - "@swc/core-linux-arm64-gnu" "1.3.74" - "@swc/core-linux-arm64-musl" "1.3.74" - "@swc/core-linux-x64-gnu" "1.3.74" - "@swc/core-linux-x64-musl" "1.3.74" - "@swc/core-win32-arm64-msvc" "1.3.74" - "@swc/core-win32-ia32-msvc" "1.3.74" - "@swc/core-win32-x64-msvc" "1.3.74" - -"@taquito/beacon-wallet@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/beacon-wallet/-/beacon-wallet-17.1.1.tgz#1fecfee21f1b1e6ac30297f4b954af72d85e9a9f" - integrity sha512-Ogjlcm1rycD3Qkv/9JmY1IyMXpTXtCQ7wUc7nHHI+kH0vVoCt3DHWSE/7haaIJsYH4l6jasqTHk/fKT+2ayEiQ== - dependencies: - "@airgap/beacon-dapp" "4.0.2" - "@taquito/core" "^17.1.1" - "@taquito/taquito" "^17.1.1" - -"@taquito/core@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/core/-/core-17.1.1.tgz#7961991a2d63d0dffa1cc046456277874b058377" - integrity sha512-ib+dzHbVT+0maYGAVdeIk9v9CNkOiB5j8CwnHUygBkEajoOdWTPlsrldRhRTAOnbj+iQk0kdkUECD6KY6iNknw== - -"@taquito/http-utils@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/http-utils/-/http-utils-17.1.1.tgz#a9ceeda1c8186e0a9044990564b9bf971abfa59c" - integrity sha512-Bp0MifEqXHln9MWI6v/3rMNlO5N5mTpN+AbA/8uQeIKoDg3/H9yoxihg91TB1rhaG81PqyqxuF3OQ+/rvDmIxg== - dependencies: - "@taquito/core" "^17.1.1" + "@swc/core-darwin-arm64" "1.3.90" + "@swc/core-darwin-x64" "1.3.90" + "@swc/core-linux-arm-gnueabihf" "1.3.90" + "@swc/core-linux-arm64-gnu" "1.3.90" + "@swc/core-linux-arm64-musl" "1.3.90" + "@swc/core-linux-x64-gnu" "1.3.90" + "@swc/core-linux-x64-musl" "1.3.90" + "@swc/core-win32-arm64-msvc" "1.3.90" + "@swc/core-win32-ia32-msvc" "1.3.90" + "@swc/core-win32-x64-msvc" "1.3.90" + +"@swc/counter@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.1.tgz#e8d066c653883238c291d8fdd8b36ed932e87920" + integrity sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw== + +"@swc/types@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.5.tgz#043b731d4f56a79b4897a3de1af35e75d56bc63a" + integrity sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw== + +"@taquito/beacon-wallet@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/beacon-wallet/-/beacon-wallet-17.3.1.tgz#fab74f14b3596ef8096489c97d95494120ab367b" + integrity sha512-PQDtTZt8rR6yFBM6//3G8KBLW0e9oWqCsHB7WSgk195ShMpHy7bd8eLOWz8ofOBdUFVZ4UDUrR6Pl35Y0HZ/Zw== + dependencies: + "@airgap/beacon-dapp" "4.0.10" + "@taquito/core" "^17.3.1" + "@taquito/taquito" "^17.3.1" + +"@taquito/core@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/core/-/core-17.3.1.tgz#800aa74f8d79bb37bf0c8eba3015cdb78946088a" + integrity sha512-dk8ZXuZktfoIV5ESUx3mPkJxLBVL7o3CXLsaVoiPIu2nyd4I/VNkPh+aIOrhxHSVPBib3sVYN0Pc2a8ZO+0gsg== + +"@taquito/http-utils@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/http-utils/-/http-utils-17.3.1.tgz#b395b8187cc411c37e49d3eb687a1694cce638d0" + integrity sha512-lHwkNM1sx1HmzJHuxQy3lxaksZH/Jqxq5cYEPJAeCzEj68TD4T4X2rcVPpa0b6Qka5mQgLITCbyFE+RUg+orgA== + dependencies: + "@taquito/core" "^17.3.1" axios "0.26.0" -"@taquito/local-forging@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/local-forging/-/local-forging-17.1.1.tgz#dee729b120d418108a075af7faf7efbdc5761701" - integrity sha512-CP5+24QNffvRh2SymYs0POZl001FdbwezEZBWnMdQkI3oKoOqmMYeTprhi/lYOb3oK7Y7kF0FBUhN2CfTt3Itw== +"@taquito/local-forging@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/local-forging/-/local-forging-17.3.1.tgz#9d3f64eaa0f3e1099fe81634b9a365073c7867d2" + integrity sha512-1pBbN8g2Jhq7bxWW3diRC+llL5TA1/m9W2za75IAl2sv5oo8ttXVla4XY8yapLu/yeOWrb5ta7yvfEZ5x2ZeOw== dependencies: - "@taquito/core" "^17.1.1" - "@taquito/utils" "^17.1.1" + "@taquito/core" "^17.3.1" + "@taquito/utils" "^17.3.1" bignumber.js "^9.1.0" -"@taquito/michel-codec@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/michel-codec/-/michel-codec-17.1.1.tgz#c1bb15a36dc46d19a443b7b05278f580382c020b" - integrity sha512-f21XWLa1PMovCgJTLo3jKUHdeonkeBt9JD6QFY5gIUi4uWdA6UYTst23P0YkIENmB4YXnO50wz/rrEjeyAhHeQ== +"@taquito/michel-codec@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/michel-codec/-/michel-codec-17.3.1.tgz#a52cbc6f3ea54f3efa87f9b5e98cbb4ca335c5b6" + integrity sha512-dxhrqn+/VBzkhL+bhLO9bVb1r/NKdvSYEoXRWgszNT+enVlokkFBM4kXcvGlFUZklaSiw0dQYd1Zk0sDMkr1sw== dependencies: - "@taquito/core" "^17.1.1" + "@taquito/core" "^17.3.1" -"@taquito/michelson-encoder@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/michelson-encoder/-/michelson-encoder-17.1.1.tgz#7346f0aee41f7718bf5592c83fc2b60a02b75c9d" - integrity sha512-pQUJslapmOQorwLcy8wvaZIpq6I1taeva0avL9u3jo7aM3ZENozL1/BYPlCYA7jtEYvuuw2hCRqyxzg41HqWXw== +"@taquito/michelson-encoder@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/michelson-encoder/-/michelson-encoder-17.3.1.tgz#e801d8600c3b8cd148db7bbd30817857aa7fba18" + integrity sha512-PaJYlZnjqDwjvK2qC4j9icqcGLoHHQygnGLs9lPV1quAV1v9yWPe6ABK+miuq2vv4WDMFH6amaXBtLimgPDcuQ== dependencies: - "@taquito/rpc" "^17.1.1" - "@taquito/utils" "^17.1.1" + "@taquito/rpc" "^17.3.1" + "@taquito/utils" "^17.3.1" bignumber.js "^9.1.0" fast-json-stable-stringify "^2.1.0" -"@taquito/rpc@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/rpc/-/rpc-17.1.1.tgz#d6c51307ebbb97ab089554064019eb0f6754d995" - integrity sha512-yJ2LZYc65GMk0XdOHFFIora7I1Q4XeYG/5oH8n8HoSQIeuwFhjSBGnrwWr5fQf503lKmjHyiuftziY4mkVumGg== +"@taquito/rpc@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/rpc/-/rpc-17.3.1.tgz#1ed32c4f2bd33cc74d390334a0a7835a5406aefb" + integrity sha512-VHY5qgUVT4RDXDv7H8DQrrMk1tfnJ6m+BFHmJxYCe7WQCCr8u2TlN0X2N95QhM+LG0LXL/LFlzhQLRBOxLnxsw== dependencies: - "@taquito/core" "^17.1.1" - "@taquito/http-utils" "^17.1.1" - "@taquito/utils" "^17.1.1" + "@taquito/core" "^17.3.1" + "@taquito/http-utils" "^17.3.1" + "@taquito/utils" "^17.3.1" bignumber.js "^9.1.0" -"@taquito/taquito@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/taquito/-/taquito-17.1.1.tgz#2735054c2fd3cf4f013d06c735fd9538802d1916" - integrity sha512-BjkjaoaXVdi92ImDfsh9jRpXTD/4NrFcaB4PcpPpfdtX/jIa2098MIH9Zdm/MdPmy9rtaZcHRej4B+BWJJ7JXg== - dependencies: - "@taquito/core" "^17.1.1" - "@taquito/http-utils" "^17.1.1" - "@taquito/local-forging" "^17.1.1" - "@taquito/michel-codec" "^17.1.1" - "@taquito/michelson-encoder" "^17.1.1" - "@taquito/rpc" "^17.1.1" - "@taquito/utils" "^17.1.1" +"@taquito/taquito@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/taquito/-/taquito-17.3.1.tgz#52bf080cd6ef55c1c2beabc76fd1b28dfac0275f" + integrity sha512-9CnIJv5z6KmYYhycOSTpSh51hH818yzXMjr5iR4Q2raWEtWQHYeXoDcVec1dkI+IITm9cQpLp5Gm++smSBElOA== + dependencies: + "@taquito/core" "^17.3.1" + "@taquito/http-utils" "^17.3.1" + "@taquito/local-forging" "^17.3.1" + "@taquito/michel-codec" "^17.3.1" + "@taquito/michelson-encoder" "^17.3.1" + "@taquito/rpc" "^17.3.1" + "@taquito/utils" "^17.3.1" bignumber.js "^9.1.0" rxjs "^7.8.1" -"@taquito/utils@^17.1.1": - version "17.1.1" - resolved "https://registry.yarnpkg.com/@taquito/utils/-/utils-17.1.1.tgz#9b7993df3fe0aac328a9805c9e8d26f860ae6efb" - integrity sha512-KcK7Qa2+SCcevxSJixA3utDtlPYS5DGXpZdMlrAjwjozMiuDGSLM63D1CrW/ojYI0t3tPuErty10cPhURZ+d4A== +"@taquito/utils@^17.3.1": + version "17.3.1" + resolved "https://registry.yarnpkg.com/@taquito/utils/-/utils-17.3.1.tgz#e64aa9ca0c706b7afa6d092da51dbcd602c29512" + integrity sha512-NLSFOaZbbs5L7aSV+vgCxj6celHBYLkzwmGvPiCm/mDSj1a1i4bgt8fJ6DbtwDiAmiA9tXPmRileRC4iPEaewg== dependencies: "@stablelib/blake2b" "^1.0.1" "@stablelib/ed25519" "^1.0.3" - "@taquito/core" "^17.1.1" + "@taquito/core" "^17.3.1" "@types/bs58check" "^2.1.0" bignumber.js "^9.1.0" blakejs "^1.2.1" @@ -795,147 +726,146 @@ "@types/har-format" "*" "@types/filesystem@*": - version "0.0.32" - resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.32.tgz#307df7cc084a2293c3c1a31151b178063e0a8edf" - integrity sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ== + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.33.tgz#808e0048221426b30341a6b19a8193213c72ca55" + integrity sha512-2KedRPzwu2K528vFkoXnnWdsG0MtUwPjuA7pRy4vKxlxHEe8qUDZibYHXJKZZr2Cl/ELdCWYqyb/MKwsUuzBWw== dependencies: "@types/filewriter" "*" "@types/filewriter@*": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.29.tgz#a48795ecadf957f6c0d10e0c34af86c098fa5bee" - integrity sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ== + version "0.0.30" + resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.30.tgz#1be7733877589d57c653b8356cefe5fe7c74b89e" + integrity sha512-lB98tui0uxc7erbj0serZfJlHKLNJHwBltPnbmO1WRpL5T325GOHRiQfr2E29V2q+S1brDO63Fpdt6vb3bES9Q== "@types/har-format@*": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.11.tgz#26aff34e9c782b2648cc45778abadcd930f7db43" - integrity sha512-T232/TneofqK30AD1LRrrf8KnjLvzrjWDp7eWST5KoiSzrBfRsLrWDPk4STQPW4NZG6v2MltnduBVmakbZOBIQ== + version "1.2.13" + resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.13.tgz#7ef32562d433166e1ad14e3eb6fcf5c00c8a0ead" + integrity sha512-PwBsCBD3lDODn4xpje3Y1di0aDJp4Ww7aSfMRVw6ysnxD4I7Wmq2mBkSKaDtN403hqH5sp6c9xQUvFYY3+lkBg== "@types/json-schema@^7.0.12": - version "7.0.12" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== "@types/node@*": - version "20.4.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.8.tgz#b5dda19adaa473a9bf0ab5cbd8f30ec7d43f5c85" - integrity sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg== + version "20.7.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.7.1.tgz#06d732ead0bd5ad978ef0ea9cbdeb24dc8717514" + integrity sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg== "@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + version "15.7.7" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.7.tgz#f9361f7b87fd5d8188b2c998db0a1f47e9fb391a" + integrity sha512-FbtmBWCcSa2J4zL781Zf1p5YUBXQomPEcep9QZCfRfQgTxz3pJWiDFLebohZ9fFntX5ibzOkSsrJ0TEew8cAog== "@types/react-dom@^18.2.7": - version "18.2.7" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.7.tgz#67222a08c0a6ae0a0da33c3532348277c70abb63" - integrity sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA== + version "18.2.8" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.8.tgz#338f1b0a646c9f10e0a97208c1d26b9f473dffd6" + integrity sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw== dependencies: "@types/react" "*" "@types/react@*", "@types/react@^18.2.15": - version "18.2.18" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.18.tgz#c8b233919eef1bdc294f6f34b37f9727ad677516" - integrity sha512-da4NTSeBv/P34xoZPhtcLkmZuJ+oYaCxHmyHzwaDQo9RQPBeXV+06gEk2FpqEcsX9XrnNLvRpVh6bdavDSjtiQ== + version "18.2.23" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.23.tgz#60ad6cf4895e93bed858db0e03bcc4ff97d0410e" + integrity sha512-qHLW6n1q2+7KyBEYnrZpcsAmU/iiCh9WGCKgXvMxx89+TYdJWRjZohVIo9XTcoLhfX3+/hP0Pbulu3bCZQ9PSA== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" "@types/scheduler@*": - version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" - integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== + version "0.16.4" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.4.tgz#fedc3e5b15c26dc18faae96bf1317487cb3658cf" + integrity sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ== "@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + version "7.5.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" + integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== "@typescript-eslint/eslint-plugin@^6.0.0": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.1.tgz#41b79923fee46a745a3a50cba1c33c622aa3c79a" - integrity sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw== + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.3.tgz#d98046e9f7102d49a93d944d413c6055c47fafd7" + integrity sha512-vntq452UHNltxsaaN+L9WyuMch8bMd9CqJ3zhzTPXXidwbf5mqqKCVXEuvRZUqLJSTLeWE65lQwyXsRGnXkCTA== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.2.1" - "@typescript-eslint/type-utils" "6.2.1" - "@typescript-eslint/utils" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/scope-manager" "6.7.3" + "@typescript-eslint/type-utils" "6.7.3" + "@typescript-eslint/utils" "6.7.3" + "@typescript-eslint/visitor-keys" "6.7.3" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" natural-compare "^1.4.0" - natural-compare-lite "^1.4.0" semver "^7.5.4" ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.0.0": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.2.1.tgz#e18a31eea1cca8841a565f1701960c8123ed07f9" - integrity sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg== - dependencies: - "@typescript-eslint/scope-manager" "6.2.1" - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/typescript-estree" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.3.tgz#aaf40092a32877439e5957e18f2d6a91c82cc2fd" + integrity sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ== + dependencies: + "@typescript-eslint/scope-manager" "6.7.3" + "@typescript-eslint/types" "6.7.3" + "@typescript-eslint/typescript-estree" "6.7.3" + "@typescript-eslint/visitor-keys" "6.7.3" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz#b6f43a867b84e5671fe531f2b762e0b68f7cf0c4" - integrity sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q== +"@typescript-eslint/scope-manager@6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.3.tgz#07e5709c9bdae3eaf216947433ef97b3b8b7d755" + integrity sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ== dependencies: - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/types" "6.7.3" + "@typescript-eslint/visitor-keys" "6.7.3" -"@typescript-eslint/type-utils@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.2.1.tgz#8eb8a2cccdf39cd7cf93e02bd2c3782dc90b0525" - integrity sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ== +"@typescript-eslint/type-utils@6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.3.tgz#c2c165c135dda68a5e70074ade183f5ad68f3400" + integrity sha512-Fc68K0aTDrKIBvLnKTZ5Pf3MXK495YErrbHb1R6aTpfK5OdSFj0rVN7ib6Tx6ePrZ2gsjLqr0s98NG7l96KSQw== dependencies: - "@typescript-eslint/typescript-estree" "6.2.1" - "@typescript-eslint/utils" "6.2.1" + "@typescript-eslint/typescript-estree" "6.7.3" + "@typescript-eslint/utils" "6.7.3" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.2.1.tgz#7fcdeceb503aab601274bf5e210207050d88c8ab" - integrity sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ== +"@typescript-eslint/types@6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.3.tgz#0402b5628a63f24f2dc9d4a678e9a92cc50ea3e9" + integrity sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw== -"@typescript-eslint/typescript-estree@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz#2af6e90c1e91cb725a5fe1682841a3f74549389e" - integrity sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q== +"@typescript-eslint/typescript-estree@6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.3.tgz#ec5bb7ab4d3566818abaf0e4a8fa1958561b7279" + integrity sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g== dependencies: - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/types" "6.7.3" + "@typescript-eslint/visitor-keys" "6.7.3" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.2.1.tgz#2aa4279ec13053d05615bcbde2398e1e8f08c334" - integrity sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ== +"@typescript-eslint/utils@6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.3.tgz#96c655816c373135b07282d67407cb577f62e143" + integrity sha512-vzLkVder21GpWRrmSR9JxGZ5+ibIUSudXlW52qeKpzUEQhRSmyZiVDDj3crAth7+5tmN1ulvgKaCU2f/bPRCzg== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.2.1" - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/typescript-estree" "6.2.1" + "@typescript-eslint/scope-manager" "6.7.3" + "@typescript-eslint/types" "6.7.3" + "@typescript-eslint/typescript-estree" "6.7.3" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz#442e7c09fe94b715a54ebe30e967987c3c41fbf4" - integrity sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA== +"@typescript-eslint/visitor-keys@6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.3.tgz#83809631ca12909bd2083558d2f93f5747deebb2" + integrity sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg== dependencies: - "@typescript-eslint/types" "6.2.1" + "@typescript-eslint/types" "6.7.3" eslint-visitor-keys "^3.4.1" "@tzkt/oazapfts@^4.5.2": @@ -949,19 +879,19 @@ swagger2openapi "^7.0.8" typescript "^4.9.3" -"@tzkt/sdk-api@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@tzkt/sdk-api/-/sdk-api-2.2.0.tgz#0462e6d887c95301bae6e5bff5bec11d20a43b25" - integrity sha512-CgmW9FZmjZEDW+32ahFoj7Wov9Dtx8vWfareWu3XjE8rqnN2/k+aSPfubIeAB3hjF6PKTrCocWMMd7lIpdEr0g== +"@tzkt/sdk-api@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@tzkt/sdk-api/-/sdk-api-2.2.1.tgz#7f0743d3e8d36a18ffe013098c1ae34b9da0bfe0" + integrity sha512-WV4Dw6x1dSDC4PvdUi6lnQCxaeDsuzCkCMiLD5+fPufEB6GhQ1c5l2xN49boy/CJn4Ghr4VSh5/2eCKItEkPqQ== dependencies: "@tzkt/oazapfts" "^4.5.2" "@vitejs/plugin-react-swc@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-react-swc/-/plugin-react-swc-3.3.2.tgz#34a82c1728066f48a86dfecb2f15df60f89207fb" - integrity sha512-VJFWY5sfoZerQRvJrh518h3AcQt6f/yTuWn4/TRB+dqmYU0NX1qz7qM5Wfd+gOQqUzQW4gxKqKN3KpE/P3+zrA== + version "3.4.0" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react-swc/-/plugin-react-swc-3.4.0.tgz#53ca6a07423abadec92f967e188d5ba49b350830" + integrity sha512-m7UaA4Uvz82N/0EOVpZL4XsFIakRqrFKeSNxa1FBLSXGvWrWRBwmZb4qxk+ZIVAZcW3c3dn5YosomDgx62XWcQ== dependencies: - "@swc/core" "^1.3.61" + "@swc/core" "^1.3.85" "@walletconnect/core@2.7.0": version "2.7.0" @@ -984,28 +914,6 @@ lodash.isequal "4.5.0" uint8arrays "^3.1.0" -"@walletconnect/core@2.9.2": - version "2.9.2" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.9.2.tgz#c46734ca63771b28fd77606fd521930b7ecfc5e1" - integrity sha512-VARMPAx8sIgodeyngDHbealP3B621PQqjqKsByFUTOep8ZI1/R/20zU+cmq6j9RCrL+kLKZcrZqeVzs8Z7OlqQ== - dependencies: - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-provider" "1.0.13" - "@walletconnect/jsonrpc-types" "1.0.3" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "1.0.13" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/relay-api" "^1.0.9" - "@walletconnect/relay-auth" "^1.0.4" - "@walletconnect/safe-json" "^1.0.2" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.9.2" - "@walletconnect/utils" "2.9.2" - events "^3.3.0" - lodash.isequal "4.5.0" - uint8arrays "^3.1.0" - "@walletconnect/environment@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/environment/-/environment-1.0.1.tgz#1d7f82f0009ab821a2ba5ad5e5a7b8ae3b214cd7" @@ -1030,7 +938,7 @@ "@walletconnect/time" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.12": +"@walletconnect/jsonrpc-provider@^1.0.12": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -1039,7 +947,7 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": +"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== @@ -1047,7 +955,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -1056,7 +964,7 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@1.0.13", "@walletconnect/jsonrpc-ws-connection@^1.0.11": +"@walletconnect/jsonrpc-ws-connection@^1.0.11": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz#23b0cdd899801bfbb44a6556936ec2b93ef2adf4" integrity sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg== @@ -1125,21 +1033,6 @@ "@walletconnect/utils" "2.7.0" events "^3.3.0" -"@walletconnect/sign-client@^2.9.0": - version "2.9.2" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.9.2.tgz#ff4c81c082c2078878367d07f24bcb20b1f7ab9e" - integrity sha512-anRwnXKlR08lYllFMEarS01hp1gr6Q9XUgvacr749hoaC/AwGVlxYFdM8+MyYr3ozlA+2i599kjbK/mAebqdXg== - dependencies: - "@walletconnect/core" "2.9.2" - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.9.2" - "@walletconnect/utils" "2.9.2" - events "^3.3.0" - "@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" @@ -1159,18 +1052,6 @@ "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/types@2.9.2": - version "2.9.2" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.9.2.tgz#d5fd5a61dc0f41cbdca59d1885b85207ac7bf8c5" - integrity sha512-7Rdn30amnJEEal4hk83cdwHUuxI1SWQ+K7fFFHBMqkuHLGi3tpMY6kpyfDxnUScYEZXqgRps4Jo5qQgnRqVM7A== - dependencies: - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-types" "1.0.3" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - events "^3.3.0" - "@walletconnect/utils@2.7.0": version "2.7.0" resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.7.0.tgz#18482834b8a27e0515ef160a1ff7e4632c9d77f5" @@ -1192,26 +1073,6 @@ query-string "7.1.1" uint8arrays "^3.1.0" -"@walletconnect/utils@2.9.2": - version "2.9.2" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.9.2.tgz#035bdb859ee81a4bcc6420f56114cc5ec3e30afb" - integrity sha512-D44hwXET/8JhhIjqljY6qxSu7xXnlPrf63UN/Qfl98vDjWlYVcDl2+JIQRxD9GPastw0S8XZXdRq59XDXLuZBg== - dependencies: - "@stablelib/chacha20poly1305" "1.0.1" - "@stablelib/hkdf" "1.0.1" - "@stablelib/random" "^1.0.2" - "@stablelib/sha256" "1.0.1" - "@stablelib/x25519" "^1.0.3" - "@walletconnect/relay-api" "^1.0.9" - "@walletconnect/safe-json" "^1.0.2" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.9.2" - "@walletconnect/window-getters" "^1.0.1" - "@walletconnect/window-metadata" "^1.0.1" - detect-browser "5.3.0" - query-string "7.1.3" - uint8arrays "^3.1.0" - "@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" @@ -1301,15 +1162,16 @@ asn1.js@^5.2.0: minimalistic-assert "^1.0.0" safer-buffer "^2.1.0" -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== +assert@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" + integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" + call-bind "^1.0.2" + is-nan "^1.3.2" + object-is "^1.1.5" + object.assign "^4.1.4" + util "^0.12.5" atomic-sleep@^1.0.0: version "1.0.0" @@ -1353,9 +1215,9 @@ base64-js@^1.3.1: integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== bignumber.js@^9.1.0: - version "9.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== blakejs@^1.2.1: version "1.2.1" @@ -1609,7 +1471,7 @@ debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" -decode-uri-component@^0.2.0, decode-uri-component@^0.2.2: +decode-uri-component@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== @@ -1619,11 +1481,21 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-properties@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== +define-data-property@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.0.tgz#0db13540704e1d8d479a0656cf781267531b9451" + integrity sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g== dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" has-property-descriptors "^1.0.0" object-keys "^1.1.1" @@ -1698,43 +1570,38 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw== - es6-promise@^3.2.1: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg== esbuild@^0.18.10: - version "0.18.19" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.19.tgz#c763ccfd50b7b1322d13232cd91f2bd36ffde56b" - integrity sha512-ra3CaIKCzJp5bU5BDfrCc0FRqKj71fQi+gbld0aj6lN0ifuX2fWJYPgLVLGwPfA+ruKna+OWwOvf/yHj6n+i0g== + version "0.18.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== optionalDependencies: - "@esbuild/android-arm" "0.18.19" - "@esbuild/android-arm64" "0.18.19" - "@esbuild/android-x64" "0.18.19" - "@esbuild/darwin-arm64" "0.18.19" - "@esbuild/darwin-x64" "0.18.19" - "@esbuild/freebsd-arm64" "0.18.19" - "@esbuild/freebsd-x64" "0.18.19" - "@esbuild/linux-arm" "0.18.19" - "@esbuild/linux-arm64" "0.18.19" - "@esbuild/linux-ia32" "0.18.19" - "@esbuild/linux-loong64" "0.18.19" - "@esbuild/linux-mips64el" "0.18.19" - "@esbuild/linux-ppc64" "0.18.19" - "@esbuild/linux-riscv64" "0.18.19" - "@esbuild/linux-s390x" "0.18.19" - "@esbuild/linux-x64" "0.18.19" - "@esbuild/netbsd-x64" "0.18.19" - "@esbuild/openbsd-x64" "0.18.19" - "@esbuild/sunos-x64" "0.18.19" - "@esbuild/win32-arm64" "0.18.19" - "@esbuild/win32-ia32" "0.18.19" - "@esbuild/win32-x64" "0.18.19" + "@esbuild/android-arm" "0.18.20" + "@esbuild/android-arm64" "0.18.20" + "@esbuild/android-x64" "0.18.20" + "@esbuild/darwin-arm64" "0.18.20" + "@esbuild/darwin-x64" "0.18.20" + "@esbuild/freebsd-arm64" "0.18.20" + "@esbuild/freebsd-x64" "0.18.20" + "@esbuild/linux-arm" "0.18.20" + "@esbuild/linux-arm64" "0.18.20" + "@esbuild/linux-ia32" "0.18.20" + "@esbuild/linux-loong64" "0.18.20" + "@esbuild/linux-mips64el" "0.18.20" + "@esbuild/linux-ppc64" "0.18.20" + "@esbuild/linux-riscv64" "0.18.20" + "@esbuild/linux-s390x" "0.18.20" + "@esbuild/linux-x64" "0.18.20" + "@esbuild/netbsd-x64" "0.18.20" + "@esbuild/openbsd-x64" "0.18.20" + "@esbuild/sunos-x64" "0.18.20" + "@esbuild/win32-arm64" "0.18.20" + "@esbuild/win32-ia32" "0.18.20" + "@esbuild/win32-x64" "0.18.20" escalade@^3.1.1: version "3.1.1" @@ -1764,21 +1631,21 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz#8c2095440eca8c933bedcadf16fefa44dbe9ba5f" - integrity sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw== +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.45.0: - version "8.46.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.46.0.tgz#a06a0ff6974e53e643acc42d1dcf2e7f797b3552" - integrity sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg== + version "8.50.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.50.0.tgz#2ae6015fee0240fcd3f83e1e25df0287f487d6b2" + integrity sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.1" - "@eslint/js" "^8.46.0" - "@humanwhocodes/config-array" "^0.11.10" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.50.0" + "@humanwhocodes/config-array" "^0.11.11" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.12.4" @@ -1788,7 +1655,7 @@ eslint@^8.45.0: doctrine "^3.0.0" escape-string-regexp "^4.0.0" eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.2" + eslint-visitor-keys "^3.4.3" espree "^9.6.1" esquery "^1.4.2" esutils "^2.0.2" @@ -1934,22 +1801,23 @@ find-up@^5.0.0: path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.0.tgz#0e54ab4a1a60fe87e2946b6b00657f1c99e1af3f" + integrity sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew== dependencies: - flatted "^3.1.0" + flatted "^3.2.7" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flatted@^3.2.7: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== follow-redirects@^1.14.4, follow-redirects@^1.14.8: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== for-each@^0.3.3: version "0.3.3" @@ -1964,9 +1832,9 @@ fs.realpath@^1.0.0: integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.1: version "1.1.1" @@ -1978,7 +1846,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== @@ -2015,9 +1883,9 @@ glob@^7.1.3: path-is-absolute "^1.0.0" globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + version "13.22.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.22.0.tgz#0c9fcb9c48a2494fbb5edbfee644285543eba9d8" + integrity sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw== dependencies: type-fest "^0.20.2" @@ -2190,7 +2058,7 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-nan@^1.2.1: +is-nan@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== @@ -2240,6 +2108,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -2255,6 +2128,13 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +keyv@^4.5.3: + version "4.5.3" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" + integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug== + dependencies: + json-buffer "3.0.1" + keyvaluestorage-interface@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" @@ -2371,11 +2251,6 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -2389,9 +2264,9 @@ node-fetch-h2@^2.3.0: http2-client "^1.2.5" node-fetch@^2.6.1: - version "2.6.12" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" - integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -2453,7 +2328,7 @@ object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== -object-is@^1.0.1: +object-is@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== @@ -2466,6 +2341,16 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + on-exit-leak-free@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" @@ -2603,10 +2488,10 @@ pino@7.11.0: sonic-boom "^2.2.1" thread-stream "^0.15.1" -postcss@^8.4.26: - version "8.4.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.27.tgz#234d7e4b72e34ba5a92c29636734349e0d9c3057" - integrity sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ== +postcss@^8.4.27: + version "8.4.30" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.30.tgz#0e0648d551a606ef2192a26da4cabafcc09c1aa7" + integrity sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g== dependencies: nanoid "^3.3.6" picocolors "^1.0.0" @@ -2654,7 +2539,7 @@ qrcode-svg@^1.1.0: resolved "https://registry.yarnpkg.com/qrcode-svg/-/qrcode-svg-1.1.0.tgz#2087549843dc5d0a3f8e8aa046cd9bcf23708cc3" integrity sha512-XyQCIXux1zEIA3NPb0AeR8UMYvXZzWEhgdBgBjH9gO7M48H9uoHzviNz8pXw3UzrAcxRRRn9gxHewAVK7bn9qw== -qs@^6.11.0: +qs@^6.11.2: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== @@ -2671,16 +2556,6 @@ query-string@7.1.1: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -query-string@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" - integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg== - dependencies: - decode-uri-component "^0.2.2" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -2775,10 +2650,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup@^3.25.2: - version "3.27.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.27.2.tgz#59adc973504408289be89e5978e938ce852c9520" - integrity sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ== +rollup@^3.27.1: + version "3.29.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" + integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== optionalDependencies: fsevents "~2.3.2" @@ -2914,9 +2789,9 @@ slash@^3.0.0: integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== solid-js@^1.6.6: - version "1.7.9" - resolved "https://registry.yarnpkg.com/solid-js/-/solid-js-1.7.9.tgz#eb666d1c0ab0322bf844b566edbf40557dee66c7" - integrity sha512-p1orXnauMQmwYULZtuPAXyKNRGEN2qh60kLX4YURa3jvulxAqjlh2kWEljXCtAVR6UZPC16NXdj9ASHcH383Fg== + version "1.7.12" + resolved "https://registry.yarnpkg.com/solid-js/-/solid-js-1.7.12.tgz#e196aceb03790c15aedf109771c5bb9cc92516ea" + integrity sha512-QoyoOUKu14iLoGxjxWFIU8+/1kLT4edQ7mZESFPonsEXZ//VJtPKD8Ud1aTKzotj+MNWmSs9YzK6TdY+fO9Eww== dependencies: csstype "^3.1.0" seroval "^0.5.0" @@ -3053,9 +2928,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-api-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" - integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== tslib@1.14.1: version "1.14.1" @@ -3063,9 +2938,9 @@ tslib@1.14.1: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.1.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" - integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" @@ -3090,9 +2965,9 @@ typescript@^4.9.3: integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@^5.0.2: - version "5.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" @@ -3108,20 +2983,20 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.1.tgz#26f90f615427eca1b9f4d6a28288c147e2302a32" - integrity sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA== +url@^0.11.3: + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== dependencies: punycode "^1.4.1" - qs "^6.11.0" + qs "^6.11.2" util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -util@^0.12.0: +util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== @@ -3133,13 +3008,13 @@ util@^0.12.0: which-typed-array "^1.1.2" vite@^4.4.5: - version "4.4.8" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.8.tgz#31e4a438f8748695c68bd57ffd262ba93540fdf7" - integrity sha512-LONawOUUjxQridNWGQlNizfKH89qPigK36XhMI7COMGztz8KNY0JHim7/xDd71CZwGT4HtSRgI7Hy+RlhG0Gvg== + version "4.4.9" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.9.tgz#1402423f1a2f8d66fd8d15e351127c7236d29d3d" + integrity sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA== dependencies: esbuild "^0.18.10" - postcss "^8.4.26" - rollup "^3.25.2" + postcss "^8.4.27" + rollup "^3.27.1" optionalDependencies: fsevents "~2.3.2" diff --git a/solution/contracts/.ligo/repository_id b/solution/contracts/.ligo/repository_id deleted file mode 100644 index 46d7438..0000000 --- a/solution/contracts/.ligo/repository_id +++ /dev/null @@ -1 +0,0 @@ -93de71ba-4efe-481e-2438-5678fc53dd32 \ No newline at end of file diff --git a/solution/contracts/mutation_pokeGame.jsligo b/solution/contracts/mutation_pokeGame.jsligo new file mode 100644 index 0000000..8ca9748 --- /dev/null +++ b/solution/contracts/mutation_pokeGame.jsligo @@ -0,0 +1,47 @@ +#import "./pokeGame.jsligo" "PokeGame" + +#import "./unit_pokeGame.jsligo" "PokeGameTest" + +// reset state + +const _ = Test.reset_state(2 as nat, list([]) as list); + +const faucet = Test.nth_bootstrap_account(0); + +const sender1: address = Test.nth_bootstrap_account(1); + +const _1 = Test.log("Sender 1 has balance : "); + +const _2 = Test.log(Test.get_balance_of_address(sender1)); + +const _3 = Test.set_baker(faucet); + +const _4 = Test.set_source(faucet); + +const _tests = ( + ta: typed_address, + _: michelson_contract, + _2: int +): unit => { return PokeGameTest._testPoke(ta, sender1); }; + +const test_mutation = + ( + (): unit => { + const mutationErrorList = + Test.originate_and_mutate_all( + contract_of(PokeGame), + PokeGameTest.initial_storage, + PokeGameTest.initial_tez, + _tests + ); + match(mutationErrorList) { + when ([]): + unit + when ([head, ..._tail]): + do { + Test.log(head); + Test.assert_with_error(false, Test.to_string(head[1])) + } + }; + } + )(); diff --git a/solution/contracts/pokeGame.jsligo b/solution/contracts/pokeGame.jsligo index 0b619a9..c69e985 100644 --- a/solution/contracts/pokeGame.jsligo +++ b/solution/contracts/pokeGame.jsligo @@ -9,17 +9,10 @@ export type storage = { tzip18: TZIP18.tzip18 }; -type returned_feedback = [address, string]; //address that gives feedback and a string message - - -type oracle_param = contract; - -type parameter = { entrypointName: string, payload: bytes }; - type return_ = [list, storage]; const poke = ( - _: parameter, + _: { entrypointName: string, payload: bytes }, [pokeTraces, feedback, ticketOwnership, tzip18]: [ map, string, @@ -137,6 +130,13 @@ const init = ( ] }; +@view +const getView = (viewName: string, store: storage): bytes => { + if (viewName == "feedback") { + return Bytes.pack(store.feedback); + } else return failwith("View " + viewName + " not found on this contract"); +}; + /** * Function called by a parent contract or administrator to set the current version on an old contract **/ @@ -161,15 +161,11 @@ const changeVersion = ( ] }; -@view -const getView = (viewName: string, store: storage): bytes => { - if (viewName == "feedback") { - return Bytes.pack(store.feedback); - } else return failwith("View " + viewName + " not found on this contract"); -}; - @entry -export const main = (action: parameter, store: storage): return_ => { +export const main = ( + action: { entrypointName: string, payload: bytes }, + store: storage +): return_ => { //destructure the storage to avoid DUP const { pokeTraces, feedback, ticketOwnership, tzip18 } = store; diff --git a/solution/contracts/pokeGame.parameterList.jsligo b/solution/contracts/pokeGame.parameterList.jsligo index befa5d8..8c1093a 100644 --- a/solution/contracts/pokeGame.parameterList.jsligo +++ b/solution/contracts/pokeGame.parameterList.jsligo @@ -1,4 +1,10 @@ -#include "pokeGame.jsligo" +#import "pokeGame.jsligo" "Contract" // Define your parameter values as a list of LIGO variable definitions -// E.g. const aParameterValue : aParameterType = (Increment (1)); +// 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 \ No newline at end of file diff --git a/solution/contracts/pokeGame.storageList.jsligo b/solution/contracts/pokeGame.storageList.jsligo index a8ab03b..f1c731b 100644 --- a/solution/contracts/pokeGame.storageList.jsligo +++ b/solution/contracts/pokeGame.storageList.jsligo @@ -5,7 +5,7 @@ const default_storage = { feedback: "kiss", ticketOwnership: Map.empty as map>, //ticket of claims tzip18: { - proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, + proxy: "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ" as address, version: 1 as nat, contractPrevious: None() as option
, contractNext: None() as option
@@ -17,11 +17,11 @@ const storageV2 = { feedback: "hello", ticketOwnership: Map.empty as map>, tzip18: { - proxy: "KT1LXkvAPGEtdFNfFrTyBEySJvQnKrsPn4vD" as address, + proxy: "KT1BPoz3Yi8LPimxCiDvpmutbCNY8x3ghKyQ" as address, version: 2 as nat, contractPrevious: Some( - "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address + "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address ) as option
, - contractNext: None() as option
- } + contractNext: None() as option
, + }, }; diff --git a/solution/contracts/pokeGameLambda.jsligo b/solution/contracts/pokeGameLambda.jsligo index 5e2f1e9..c5d4fff 100644 --- a/solution/contracts/pokeGameLambda.jsligo +++ b/solution/contracts/pokeGameLambda.jsligo @@ -6,19 +6,13 @@ export type storage = { pokeTraces: map, feedback: string, ticketOwnership: map>, //ticket of claims - feedbackFunction + feedbackFunction: feedbackFunction }; -type returned_feedback = [address, string]; - -type oracle_param = contract; - -type parameter = unit; - type return_ = [list, storage]; @entry -const poke = (_: parameter, store: storage): return_ => { +const poke = (_: unit, store: storage): return_ => { const { pokeTraces, feedback, ticketOwnership, feedbackFunction } = store; const [t, tom]: [option>, map>] = Map.get_and_update( @@ -27,7 +21,7 @@ const poke = (_: parameter, store: storage): return_ => { ticketOwnership ); return match(t) { - when (None): + when (None()): failwith("User does not have tickets => not allowed") when (Some(_t)): [ @@ -84,7 +78,7 @@ const pokeAndGetFeedback = (oracleAddress: address, store: storage): return_ => feedback: feedbackFunction(oracleAddress) }; return match(t) { - when (None): + when (None()): failwith("User does not have tickets => not allowed") when (Some(_t)): [ @@ -100,7 +94,9 @@ const pokeAndGetFeedback = (oracleAddress: address, store: storage): return_ => }; @view -const feedback = (_: unit, store: storage): string => { return store.feedback }; +export const feedback = (_: unit, store: storage): string => { + return store.feedback +}; @entry const updateFeedbackFunction = (newCode: feedbackFunction, store: storage): return_ => { diff --git a/solution/contracts/proxy.jsligo b/solution/contracts/proxy.jsligo index 51e5e1a..02007cd 100644 --- a/solution/contracts/proxy.jsligo +++ b/solution/contracts/proxy.jsligo @@ -1,4 +1,4 @@ -type callContract = { entrypointName: string, payload: bytes }; +export type callContract = { entrypointName: string, payload: bytes }; export type entrypointType = { method: string, addr: address }; @@ -19,20 +19,20 @@ export type storage = { }; -export type _return = [list, storage]; +type _return = [list, storage]; // the proxy function @entry const callContract = (param: callContract, store: storage): _return => { return match(Big_map.find_opt(param.entrypointName, store.entrypoints)) { - when (None): + when (None()): failwith("No entrypoint found") when (Some(entry)): match( Tezos.get_contract_opt(entry.addr) as option> ) { - when (None): + when (None()): failwith("No contract found at this address") when (Some(contract)): [ @@ -75,7 +75,7 @@ const upgrade = ( do { let b: big_map = match(x.entrypoint) { - when (None): + when (None()): do { if (x.isRemoved == true) { return Big_map.remove(x.name, m) @@ -90,7 +90,7 @@ const upgrade = ( if (x.isRemoved == false) { return match(x.entrypoint) { - when (None): + when (None()): m when (Some(c)): Big_map.update(x.name, Some(c), m) @@ -111,7 +111,7 @@ const upgrade = ( //check if version needs to be changed return match(changeVersionOpt) { - when (None): + when (None()): [list([]) as list, { ...store, entrypoints: new_entrypoints }] when (Some(change)): do { @@ -120,7 +120,7 @@ const upgrade = ( Tezos.get_contract_opt(change.oldAddr) as option> ) { - when (None): + when (None()): failwith("No contract found at this address") when (Some(contract)): do { @@ -145,9 +145,9 @@ const upgrade = ( }; @view -const getView = (viewName: string, store: storage): bytes => { +export const getView = (viewName: string, store: storage): bytes => { return match(Big_map.find_opt(viewName, store.entrypoints)) { - when (None): + when (None()): failwith("View " + viewName + " not declared on this proxy") when (Some(ep)): Option.unopt( diff --git a/solution/contracts/proxy.parameterList.jsligo b/solution/contracts/proxy.parameterList.jsligo index f977610..839e9ec 100644 --- a/solution/contracts/proxy.parameterList.jsligo +++ b/solution/contracts/proxy.parameterList.jsligo @@ -11,7 +11,7 @@ const initProxyWithV1: parameter_of Contract = entrypoint: Some( { method: "Poke", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -22,7 +22,7 @@ const initProxyWithV1: parameter_of Contract = entrypoint: Some( { method: "PokeAndGetFeedback", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -33,7 +33,7 @@ const initProxyWithV1: parameter_of Contract = entrypoint: Some( { method: "Init", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -44,7 +44,7 @@ const initProxyWithV1: parameter_of Contract = entrypoint: Some( { method: "changeVersion", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -55,7 +55,7 @@ const initProxyWithV1: parameter_of Contract = entrypoint: Some( { method: "feedback", - addr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as + addr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address } ) @@ -77,7 +77,7 @@ const initProxyWithV2: parameter_of Contract = entrypoint: Some( { method: "Poke", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -88,7 +88,7 @@ const initProxyWithV2: parameter_of Contract = entrypoint: Some( { method: "PokeAndGetFeedback", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -99,7 +99,7 @@ const initProxyWithV2: parameter_of Contract = entrypoint: Some( { method: "Init", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -110,7 +110,7 @@ const initProxyWithV2: parameter_of Contract = entrypoint: Some( { method: "changeVersion", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -121,7 +121,7 @@ const initProxyWithV2: parameter_of Contract = entrypoint: Some( { method: "feedback", - addr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as + addr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) @@ -138,8 +138,8 @@ const changeVersionV1ToV2: parameter_of Contract = list([]) as list, Some( { - oldAddr: "KT1FAMmBMoaWLL6afKRh3FAQLYBoPr1m7YWd" as address, - newAddr: "KT1LFgAvH983cEV7KeYKoFm7XwXi2LrMv5HP" as address + oldAddr: "KT18ceGtUsNtQTk9smxQcaxAswRVkHDDKDgK" as address, + newAddr: "KT1QXXwzRYwrvtDAJpT1jnxym86YbhzMHnKF" as address } ) as option ] diff --git a/solution/contracts/unit_pokeGame.jsligo b/solution/contracts/unit_pokeGame.jsligo index f1f3464..5632141 100644 --- a/solution/contracts/unit_pokeGame.jsligo +++ b/solution/contracts/unit_pokeGame.jsligo @@ -12,7 +12,7 @@ const sender1: address = Test.nth_bootstrap_account(1); const _1 = Test.log("Sender 1 has balance : "); -const _2 = Test.log(Test.get_balance(sender1)); +const _2 = Test.log(Test.get_balance_of_address(sender1)); const _3 = Test.set_baker(admin); @@ -29,7 +29,6 @@ export const _testPokeGame = ( s: address ): unit => { const contr = Test.to_contract(taddr); - const contrAddress = Tezos.address(contr); const _ = Test.log("calling _testPokeGame on proxy : "); const _1 = Test.log(contr); Test.set_source(s); @@ -60,13 +59,9 @@ const testSender1Poke = > //interface schema map }; - const [tProxyaddr, _, _1] = - Test.originate_module( - contract_of(Proxy), - proxy_initial_storage, - initial_tez - ); - const proxyContr = Test.to_contract(tProxyaddr); + const orig = + Test.originate(contract_of(Proxy), proxy_initial_storage, initial_tez); + const proxyContr = Test.to_contract(orig.addr); const proxyContrAddress = Tezos.address(proxyContr); /***CONTRACT **/ @@ -83,14 +78,10 @@ const testSender1Poke = contractNext: None() as option
} }; - const [taddr, _2, _3] = - Test.originate_module( - contract_of(PokeGame), - initial_storage, - initial_tez - ); - const contr = Test.to_contract(taddr); - const addr = Tezos.address(contr); + const origContract = + Test.originate(contract_of(PokeGame), initial_storage, initial_tez); + const contr = Test.to_contract(origContract.addr); + const addr = Tezos.address(contr); /**Upgrade proxy **/ const status = @@ -135,19 +126,19 @@ const testSender1Poke = 0 as tez ); Test.log(status); - const storeProxy: Proxy.storage = Test.get_storage(tProxyaddr); + const storeProxy: Proxy.storage = + Test.get_storage_of_address(proxyContrAddress); Test.log(storeProxy); /** RUN TEST*/ _testPokeGame( - tProxyaddr, + orig.addr, "Init", Bytes.pack([sender1, 10 as nat]), sender1 ); - _testPokeGame(tProxyaddr, "Poke", (bytes `dummy`), sender1); - - const store: PokeGame.storage = Test.get_storage(taddr); + _testPokeGame(orig.addr, "Poke", (bytes `dummy`), sender1); + const store: PokeGame.storage = Test.get_storage_of_address(addr); Test.log(store); //check poke is registered @@ -164,7 +155,7 @@ const testSender1Poke = "receiver is not equal" ) } - when (None): + when (None()): assert_with_error(false, "don't find traces") } } diff --git a/solution/package-lock.json b/solution/package-lock.json index 6ebf593..fd1c7dc 100644 --- a/solution/package-lock.json +++ b/solution/package-lock.json @@ -505,9 +505,9 @@ } }, "node_modules/@types/bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz", + "integrity": "sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==", "dev": true, "dependencies": { "@types/node": "*" @@ -523,9 +523,9 @@ } }, "node_modules/@types/node": { - "version": "20.4.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.8.tgz", - "integrity": "sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg==", + "version": "20.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", + "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==", "dev": true }, "node_modules/ansi-regex": {