From f123087611543b82348e553a969c03a0f9c9d94e Mon Sep 17 00:00:00 2001
From: "Hong Jing (Jingles)"
Date: Thu, 5 Sep 2024 10:44:29 +0800
Subject: [PATCH 01/17] init giftcard upgrade
---
packages/mesh-contract/src/common.ts | 5 +
.../.gitignore | 0
.../aiken.lock | 0
.../aiken.toml | 0
.../plutus.json | 0
.../readme.md | 0
.../validators/oneshot.ak | 0
.../giftcard/aiken-workspace-v2/plutus.json | 138 ++++++++++++++++++
.../mesh-contract/src/giftcard/offchain.ts | 33 +++--
9 files changed, 167 insertions(+), 9 deletions(-)
rename packages/mesh-contract/src/giftcard/{aiken-workspace => aiken-workspace-v1}/.gitignore (100%)
rename packages/mesh-contract/src/giftcard/{aiken-workspace => aiken-workspace-v1}/aiken.lock (100%)
rename packages/mesh-contract/src/giftcard/{aiken-workspace => aiken-workspace-v1}/aiken.toml (100%)
rename packages/mesh-contract/src/giftcard/{aiken-workspace => aiken-workspace-v1}/plutus.json (100%)
rename packages/mesh-contract/src/giftcard/{aiken-workspace => aiken-workspace-v1}/readme.md (100%)
rename packages/mesh-contract/src/giftcard/{aiken-workspace => aiken-workspace-v1}/validators/oneshot.ak (100%)
create mode 100644 packages/mesh-contract/src/giftcard/aiken-workspace-v2/plutus.json
diff --git a/packages/mesh-contract/src/common.ts b/packages/mesh-contract/src/common.ts
index c577de455..4b4522a41 100644
--- a/packages/mesh-contract/src/common.ts
+++ b/packages/mesh-contract/src/common.ts
@@ -13,6 +13,7 @@ export type MeshTxInitiatorInput = {
wallet?: BrowserWallet | MeshWallet;
networkId?: number;
stakeCredential?: string;
+ version?: number;
};
export class MeshTxInitiator {
@@ -21,6 +22,7 @@ export class MeshTxInitiator {
wallet?: BrowserWallet | MeshWallet;
stakeCredential?: string;
networkId = 0;
+ version = 1;
constructor({
mesh,
@@ -28,6 +30,7 @@ export class MeshTxInitiator {
wallet,
networkId = 0,
stakeCredential,
+ version = 1,
}: MeshTxInitiatorInput) {
this.mesh = mesh;
if (fetcher) {
@@ -47,6 +50,8 @@ export class MeshTxInitiator {
if (stakeCredential) {
this.stakeCredential = this.stakeCredential;
}
+
+ this.version = version;
}
protected signSubmitReset = async () => {
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace/.gitignore b/packages/mesh-contract/src/giftcard/aiken-workspace-v1/.gitignore
similarity index 100%
rename from packages/mesh-contract/src/giftcard/aiken-workspace/.gitignore
rename to packages/mesh-contract/src/giftcard/aiken-workspace-v1/.gitignore
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace/aiken.lock b/packages/mesh-contract/src/giftcard/aiken-workspace-v1/aiken.lock
similarity index 100%
rename from packages/mesh-contract/src/giftcard/aiken-workspace/aiken.lock
rename to packages/mesh-contract/src/giftcard/aiken-workspace-v1/aiken.lock
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace/aiken.toml b/packages/mesh-contract/src/giftcard/aiken-workspace-v1/aiken.toml
similarity index 100%
rename from packages/mesh-contract/src/giftcard/aiken-workspace/aiken.toml
rename to packages/mesh-contract/src/giftcard/aiken-workspace-v1/aiken.toml
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace/plutus.json b/packages/mesh-contract/src/giftcard/aiken-workspace-v1/plutus.json
similarity index 100%
rename from packages/mesh-contract/src/giftcard/aiken-workspace/plutus.json
rename to packages/mesh-contract/src/giftcard/aiken-workspace-v1/plutus.json
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace/readme.md b/packages/mesh-contract/src/giftcard/aiken-workspace-v1/readme.md
similarity index 100%
rename from packages/mesh-contract/src/giftcard/aiken-workspace/readme.md
rename to packages/mesh-contract/src/giftcard/aiken-workspace-v1/readme.md
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace/validators/oneshot.ak b/packages/mesh-contract/src/giftcard/aiken-workspace-v1/validators/oneshot.ak
similarity index 100%
rename from packages/mesh-contract/src/giftcard/aiken-workspace/validators/oneshot.ak
rename to packages/mesh-contract/src/giftcard/aiken-workspace-v1/validators/oneshot.ak
diff --git a/packages/mesh-contract/src/giftcard/aiken-workspace-v2/plutus.json b/packages/mesh-contract/src/giftcard/aiken-workspace-v2/plutus.json
new file mode 100644
index 000000000..e0dd61ff5
--- /dev/null
+++ b/packages/mesh-contract/src/giftcard/aiken-workspace-v2/plutus.json
@@ -0,0 +1,138 @@
+{
+ "preamble": {
+ "title": "meshjs/giftcard",
+ "description": "Aiken contracts for project 'meshjs/giftcard'",
+ "version": "0.0.0",
+ "plutusVersion": "v2",
+ "compiler": {
+ "name": "Aiken",
+ "version": "v1.0.29-alpha+unknown"
+ },
+ "license": "Apache-2.0"
+ },
+ "validators": [
+ {
+ "title": "oneshot.gift_card",
+ "redeemer": {
+ "title": "rdmr",
+ "schema": {
+ "$ref": "#/definitions/oneshot~1Action"
+ }
+ },
+ "parameters": [
+ {
+ "title": "token_name",
+ "schema": {
+ "$ref": "#/definitions/ByteArray"
+ }
+ },
+ {
+ "title": "utxo_ref",
+ "schema": {
+ "$ref": "#/definitions/aiken~1transaction~1OutputReference"
+ }
+ }
+ ],
+ "compiledCode": "5901f5010000323232323232322322232323225333009323232533300c3007300d3754002264646464a666026602c00426464a666024601a60266ea803854ccc048c034c04cdd5191980080080311299980b8008a60103d87a80001323253330163375e603660306ea800804c4cdd2a40006603400497ae0133004004001301b002301900115333012300c00113371e00402029405854ccc048cdc3800a4002266e3c0080405281bad3013002375c60220022c602800264a66601e601260206ea800452f5bded8c026eacc050c044dd500099191980080099198008009bab3016301730173017301700522533301500114bd6f7b630099191919299980b19b91488100002153330163371e9101000021003100513301a337606ea4008dd3000998030030019bab3017003375c602a0046032004602e00244a666028002298103d87a800013232323253330153372200e0042a66602a66e3c01c0084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd7180998081baa00337586024002601c6ea800858c040c044008c03c004c02cdd50008a4c26cac64a66601060060022a66601660146ea8010526161533300830020011533300b300a37540082930b0b18041baa003370e90011b8748000dd7000ab9a5573aaae7955cfaba05742ae89",
+ "hash": "0c0d17d9095fe6b07a2727403e2c6f2dff8042ed7c300cb67a2577a2"
+ },
+ {
+ "title": "oneshot.redeem",
+ "datum": {
+ "title": "_d",
+ "schema": {
+ "$ref": "#/definitions/Data"
+ }
+ },
+ "redeemer": {
+ "title": "_r",
+ "schema": {
+ "$ref": "#/definitions/Data"
+ }
+ },
+ "parameters": [
+ {
+ "title": "token_name",
+ "schema": {
+ "$ref": "#/definitions/ByteArray"
+ }
+ },
+ {
+ "title": "policy_id",
+ "schema": {
+ "$ref": "#/definitions/ByteArray"
+ }
+ }
+ ],
+ "compiledCode": "5901320100003232323232323223223222253330083232533300d3010002132533300b3370e6eb4c034009200113371e0020122940dd718058008b180700099299980499b8748008c028dd50008a5eb7bdb1804dd5980718059baa001323300100132330010013756601e602060206020602060186ea8c03cc030dd50019129998070008a5eb7bdb1804c8c8c8c94ccc03ccdc8a45000021533300f3371e91010000210031005133013337606ea4008dd3000998030030019bab3010003375c601c0046024004602000244a66601a002298103d87a8000132323232533300e337220140042a66601c66e3c0280084cdd2a4000660246e980052f5c02980103d87a80001330060060033756601e0066eb8c034008c044008c03c00452613656375c0026eb80055cd2ab9d5573caae7d5d02ba157441",
+ "hash": "39faa048196bb6b30f50815475e9d16b22e7a0ef6de5935b408ca617"
+ }
+ ],
+ "definitions": {
+ "ByteArray": {
+ "dataType": "bytes"
+ },
+ "Data": {
+ "title": "Data",
+ "description": "Any Plutus data."
+ },
+ "Int": {
+ "dataType": "integer"
+ },
+ "aiken/transaction/OutputReference": {
+ "title": "OutputReference",
+ "description": "An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",
+ "anyOf": [
+ {
+ "title": "OutputReference",
+ "dataType": "constructor",
+ "index": 0,
+ "fields": [
+ {
+ "title": "transaction_id",
+ "$ref": "#/definitions/aiken~1transaction~1TransactionId"
+ },
+ {
+ "title": "output_index",
+ "$ref": "#/definitions/Int"
+ }
+ ]
+ }
+ ]
+ },
+ "aiken/transaction/TransactionId": {
+ "title": "TransactionId",
+ "description": "A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.",
+ "anyOf": [
+ {
+ "title": "TransactionId",
+ "dataType": "constructor",
+ "index": 0,
+ "fields": [
+ {
+ "title": "hash",
+ "$ref": "#/definitions/ByteArray"
+ }
+ ]
+ }
+ ]
+ },
+ "oneshot/Action": {
+ "title": "Action",
+ "anyOf": [
+ {
+ "title": "Mint",
+ "dataType": "constructor",
+ "index": 0,
+ "fields": []
+ },
+ {
+ "title": "Burn",
+ "dataType": "constructor",
+ "index": 1,
+ "fields": []
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/mesh-contract/src/giftcard/offchain.ts b/packages/mesh-contract/src/giftcard/offchain.ts
index 50de3d359..53a6d8cad 100644
--- a/packages/mesh-contract/src/giftcard/offchain.ts
+++ b/packages/mesh-contract/src/giftcard/offchain.ts
@@ -19,9 +19,8 @@ import {
import { applyParamsToScript } from "@meshsdk/core-csl";
import { MeshTxInitiator, MeshTxInitiatorInput } from "../common";
-import blueprint from "./aiken-workspace/plutus.json";
-
-export const MeshGiftCardBlueprint = blueprint;
+import blueprintV1 from "./aiken-workspace-v1/plutus.json";
+import blueprintV2 from "./aiken-workspace-v2/plutus.json";
export class MeshGiftCardContract extends MeshTxInitiator {
tokenNameHex: string = "";
@@ -32,18 +31,34 @@ export class MeshGiftCardContract extends MeshTxInitiator {
utxoTxHash: string,
utxoTxId: number,
) => {
+ let scriptCbor;
+ switch (this.version) {
+ case 2:
+ scriptCbor = blueprintV2.validators[0]!.compiledCode;
+ break;
+ default:
+ scriptCbor = blueprintV1.validators[0]!.compiledCode;
+ }
+
return applyParamsToScript(
- blueprint.validators[0]!.compiledCode,
+ scriptCbor,
[builtinByteString(tokenNameHex), txOutRef(utxoTxHash, utxoTxId)],
"JSON",
);
};
- redeemCbor = (tokenNameHex: string, policyId: string) =>
- applyParamsToScript(blueprint.validators[1]!.compiledCode, [
- tokenNameHex,
- policyId,
- ]);
+ redeemCbor = (tokenNameHex: string, policyId: string) => {
+ let scriptCbor;
+ switch (this.version) {
+ case 2:
+ scriptCbor = blueprintV2.validators[1]!.compiledCode;
+ break;
+ default:
+ scriptCbor = blueprintV1.validators[1]!.compiledCode;
+ }
+
+ return applyParamsToScript(scriptCbor, [tokenNameHex, policyId]);
+ };
constructor(
inputs: MeshTxInitiatorInput,
From cfdb3c5489c6fcfd478d1996af8881f6143ee0da Mon Sep 17 00:00:00 2001
From: "Hong Jing (Jingles)"
Date: Thu, 5 Sep 2024 12:08:19 +0800
Subject: [PATCH 02/17] add docs link
---
apps/playground/package.json | 8 +-
.../button/button-float-documentation.tsx | 14 ++++
.../src/components/button/button.tsx | 36 ++++++---
.../pages/apis/transaction/basics/index.tsx | 2 +
.../pages/apis/transaction/minting/index.tsx | 2 +
.../apis/transaction/smart-contract/index.tsx | 2 +
.../pages/apis/transaction/staking/index.tsx | 3 +
.../src/pages/apis/txbuilder/basics/index.tsx | 4 +-
.../pages/apis/txbuilder/minting/index.tsx | 2 +
.../apis/txbuilder/smart-contract/index.tsx | 2 +
.../pages/apis/txbuilder/staking/index.tsx | 3 +
.../pages/apis/wallets/appwallet/index.tsx | 2 +
.../apis/wallets/browserwallet/index.tsx | 5 ++
.../pages/apis/wallets/meshwallet/index.tsx | 2 +
.../src/pages/providers/blockfrost.tsx | 2 +
apps/playground/src/pages/providers/koios.tsx | 2 +
.../src/pages/providers/maestro.tsx | 2 +
.../playground/src/pages/providers/ogmios.tsx | 2 +
apps/playground/src/pages/providers/yaci.tsx | 2 +
.../pages/smart-contracts/escrow/index.tsx | 2 +
.../pages/smart-contracts/giftcard/index.tsx | 2 +
.../smart-contracts/marketplace/index.tsx | 3 +
.../payment-splitter/index.tsx | 2 +
.../src/pages/smart-contracts/swap/index.tsx | 2 +
.../pages/smart-contracts/vesting/index.tsx | 2 +
apps/playground/src/styles/globals.css | 4 +
apps/playground/tailwind.config.js | 7 +-
package-lock.json | 74 +++++++++----------
28 files changed, 138 insertions(+), 57 deletions(-)
create mode 100644 apps/playground/src/components/button/button-float-documentation.tsx
diff --git a/apps/playground/package.json b/apps/playground/package.json
index 2d7a48baf..549ed060c 100644
--- a/apps/playground/package.json
+++ b/apps/playground/package.json
@@ -21,17 +21,17 @@
"@next/mdx": "^14.2.3",
"@next/third-parties": "^14.2.5",
"copy-to-clipboard": "^3.3.3",
- "flowbite": "^2.3.0",
+ "flowbite": "^2.5.1",
"flowbite-react": "^0.9.0",
"flowbite-typography": "^1.0.3",
+ "json-bigint": "^1.0.0",
"next": "^14.1.1",
"persist-and-sync": "^1.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-highlight": "^0.15.0",
"react-scroll": "^1.9.0",
- "zustand": "^4.5.4",
- "json-bigint": "^1.0.0"
+ "zustand": "^4.5.4"
},
"devDependencies": {
"@meshsdk/configs": "*",
@@ -51,4 +51,4 @@
"typescript": "^5.3.3"
},
"prettier": "@meshsdk/configs/prettier"
-}
\ No newline at end of file
+}
diff --git a/apps/playground/src/components/button/button-float-documentation.tsx b/apps/playground/src/components/button/button-float-documentation.tsx
new file mode 100644
index 000000000..3e1814c0a
--- /dev/null
+++ b/apps/playground/src/components/button/button-float-documentation.tsx
@@ -0,0 +1,14 @@
+import { DocumentTextIcon } from "@heroicons/react/24/solid";
+
+import Link from "../link";
+import Button from "./button";
+
+export default function ButtonFloatDocumentation({ href }: { href: string }) {
+ return (
+
+
+
+ );
+}
diff --git a/apps/playground/src/components/button/button.tsx b/apps/playground/src/components/button/button.tsx
index f035f8ad3..4fe0cea68 100644
--- a/apps/playground/src/components/button/button.tsx
+++ b/apps/playground/src/components/button/button.tsx
@@ -4,6 +4,8 @@ export default function Button({
style,
onClick,
disabled,
+ id,
+ tooltip,
}: {
children: React.ReactNode;
className?: string;
@@ -15,8 +17,10 @@ export default function Button({
| "info"
| "light"
| "dark";
- onClick: () => void;
+ onClick?: () => void;
disabled?: boolean;
+ id?: string;
+ tooltip?: string;
}) {
const styles = {
primary:
@@ -36,24 +40,32 @@ export default function Button({
let _style = style && styles[style] ? styles[style] : styles.primary;
if (className) {
- style += ` ${className}`;
+ _style += ` ${className}`;
}
if (disabled) {
_style += ` cursor-not-allowed`;
}
- style += ` not-format`;
+ _style += ` not-format button-with-tooltip`;
return (
-
+ <>
+
+ >
);
}
diff --git a/apps/playground/src/pages/apis/transaction/basics/index.tsx b/apps/playground/src/pages/apis/transaction/basics/index.tsx
index dc0e7c3f6..05218de24 100644
--- a/apps/playground/src/pages/apis/transaction/basics/index.tsx
+++ b/apps/playground/src/pages/apis/transaction/basics/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -66,6 +67,7 @@ const ReactPage: NextPage = () => {
sending assets and various options to customize the transaction.
+
diff --git a/apps/playground/src/pages/apis/transaction/minting/index.tsx b/apps/playground/src/pages/apis/transaction/minting/index.tsx
index b348f3704..5a392a029 100644
--- a/apps/playground/src/pages/apis/transaction/minting/index.tsx
+++ b/apps/playground/src/pages/apis/transaction/minting/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -44,6 +45,7 @@ const ReactPage: NextPage = () => {
minting and burning assets.
+
diff --git a/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx b/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx
index 54c883002..4d0212b56 100644
--- a/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx
+++ b/apps/playground/src/pages/apis/transaction/smart-contract/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -48,6 +49,7 @@ const ReactPage: NextPage = () => {
smart contracts.
+
diff --git a/apps/playground/src/pages/apis/transaction/staking/index.tsx b/apps/playground/src/pages/apis/transaction/staking/index.tsx
index 8df2b89f1..4cf2adcc0 100644
--- a/apps/playground/src/pages/apis/transaction/staking/index.tsx
+++ b/apps/playground/src/pages/apis/transaction/staking/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -42,6 +43,8 @@ const ReactPage: NextPage = () => {
staking process.
+
+
diff --git a/apps/playground/src/pages/apis/txbuilder/basics/index.tsx b/apps/playground/src/pages/apis/txbuilder/basics/index.tsx
index 1db052e13..62d793349 100644
--- a/apps/playground/src/pages/apis/txbuilder/basics/index.tsx
+++ b/apps/playground/src/pages/apis/txbuilder/basics/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
@@ -11,11 +12,11 @@ import TxbuilderCip20 from "./cip20";
import TxbuilderCoinSelection from "./coin-selection";
import TxbuilderInitializeTxbuilder from "./initialize-txbuilder";
import TxbuilderMultisig from "./multisig";
+import TxbuilderMultisigNativeScript from "./multisig-native-script";
import TxbuilderSendValues from "./send-values";
import TxbuilderSetNetwork from "./set-network";
import TxbuilderSetRequiredSigners from "./set-required-signers";
import TxbuilderSetTime from "./set-time";
-import TxbuilderMultisigNativeScript from "./multisig-native-script";
const ReactPage: NextPage = () => {
const sidebarItems = [
@@ -65,6 +66,7 @@ const ReactPage: NextPage = () => {
>
+
{/* */}
diff --git a/apps/playground/src/pages/apis/txbuilder/minting/index.tsx b/apps/playground/src/pages/apis/txbuilder/minting/index.tsx
index 9a3662dd1..e2b3b1f26 100644
--- a/apps/playground/src/pages/apis/txbuilder/minting/index.tsx
+++ b/apps/playground/src/pages/apis/txbuilder/minting/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -47,6 +48,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx b/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx
index 58441a9a9..c05116134 100644
--- a/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx
+++ b/apps/playground/src/pages/apis/txbuilder/smart-contract/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -53,6 +54,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/pages/apis/txbuilder/staking/index.tsx b/apps/playground/src/pages/apis/txbuilder/staking/index.tsx
index 840129961..ec98f2a5d 100644
--- a/apps/playground/src/pages/apis/txbuilder/staking/index.tsx
+++ b/apps/playground/src/pages/apis/txbuilder/staking/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -33,6 +34,8 @@ const ReactPage: NextPage = () => {
>
<>>
+
+
diff --git a/apps/playground/src/pages/apis/wallets/appwallet/index.tsx b/apps/playground/src/pages/apis/wallets/appwallet/index.tsx
index faba4f39a..5632bacac 100644
--- a/apps/playground/src/pages/apis/wallets/appwallet/index.tsx
+++ b/apps/playground/src/pages/apis/wallets/appwallet/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -39,6 +40,7 @@ const ReactPage: NextPage = () => {
fully customed applications's backend.
+
diff --git a/apps/playground/src/pages/apis/wallets/browserwallet/index.tsx b/apps/playground/src/pages/apis/wallets/browserwallet/index.tsx
index e15d2eecc..a98b0e145 100644
--- a/apps/playground/src/pages/apis/wallets/browserwallet/index.tsx
+++ b/apps/playground/src/pages/apis/wallets/browserwallet/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
@@ -78,12 +79,16 @@ const ReactPage: NextPage = () => {
are useful for building dApps.
+ Check out the full documentation on
+
In this section, you can connect wallet and try APIs for dApps to
communicate with your wallet.
+
+
diff --git a/apps/playground/src/pages/apis/wallets/meshwallet/index.tsx b/apps/playground/src/pages/apis/wallets/meshwallet/index.tsx
index 680e2f343..f6dc6ade1 100644
--- a/apps/playground/src/pages/apis/wallets/meshwallet/index.tsx
+++ b/apps/playground/src/pages/apis/wallets/meshwallet/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
import Metatags from "~/components/site/metatags";
@@ -63,6 +64,7 @@ const ReactPage: NextPage = () => {
get started.
+
diff --git a/apps/playground/src/pages/providers/blockfrost.tsx b/apps/playground/src/pages/providers/blockfrost.tsx
index b507a2c52..0786ade96 100644
--- a/apps/playground/src/pages/providers/blockfrost.tsx
+++ b/apps/playground/src/pages/providers/blockfrost.tsx
@@ -2,6 +2,7 @@ import type { NextPage } from "next";
import { BlockfrostProvider } from "@meshsdk/core";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
@@ -69,6 +70,7 @@ const ReactPage: NextPage = () => {
+
{
+
{
const sidebarItems = [
@@ -75,6 +76,7 @@ const ReactPage: NextPage = () => {
Get started:
+
{
Get started:
+
{
Get started:
+
{
const sidebarItems = [
@@ -86,6 +87,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/pages/smart-contracts/giftcard/index.tsx b/apps/playground/src/pages/smart-contracts/giftcard/index.tsx
index 768fbf1cd..fa713bb0a 100644
--- a/apps/playground/src/pages/smart-contracts/giftcard/index.tsx
+++ b/apps/playground/src/pages/smart-contracts/giftcard/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
@@ -82,6 +83,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/pages/smart-contracts/marketplace/index.tsx b/apps/playground/src/pages/smart-contracts/marketplace/index.tsx
index f7f98a4db..4e60d9ce4 100644
--- a/apps/playground/src/pages/smart-contracts/marketplace/index.tsx
+++ b/apps/playground/src/pages/smart-contracts/marketplace/index.tsx
@@ -13,6 +13,7 @@ import MarketplaceBuyAsset from "./buy-asset";
import MarketplaceCancelListing from "./cancel-listing";
import MarketplaceListAsset from "./list-asset";
import MarketplaceUpdateListing from "./update-listing";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
const ReactPage: NextPage = () => {
const sidebarItems = [
@@ -112,6 +113,8 @@ const ReactPage: NextPage = () => {
>
+
+
diff --git a/apps/playground/src/pages/smart-contracts/payment-splitter/index.tsx b/apps/playground/src/pages/smart-contracts/payment-splitter/index.tsx
index 4c4691b16..59f10f1a3 100644
--- a/apps/playground/src/pages/smart-contracts/payment-splitter/index.tsx
+++ b/apps/playground/src/pages/smart-contracts/payment-splitter/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
@@ -102,6 +103,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/pages/smart-contracts/swap/index.tsx b/apps/playground/src/pages/smart-contracts/swap/index.tsx
index 72864e3e3..cffbf8f3a 100644
--- a/apps/playground/src/pages/smart-contracts/swap/index.tsx
+++ b/apps/playground/src/pages/smart-contracts/swap/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import MintMeshToken from "~/components/cardano/mint-mesh-token";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
@@ -86,6 +87,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/pages/smart-contracts/vesting/index.tsx b/apps/playground/src/pages/smart-contracts/vesting/index.tsx
index 555d3e1ae..933bd34a4 100644
--- a/apps/playground/src/pages/smart-contracts/vesting/index.tsx
+++ b/apps/playground/src/pages/smart-contracts/vesting/index.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
+import ButtonFloatDocumentation from "~/components/button/button-float-documentation";
import SidebarFullwidth from "~/components/layouts/sidebar-fullwidth";
import Link from "~/components/link";
import TitleIconDescriptionBody from "~/components/sections/title-icon-description-body";
@@ -84,6 +85,7 @@ const ReactPage: NextPage = () => {
>
+
diff --git a/apps/playground/src/styles/globals.css b/apps/playground/src/styles/globals.css
index b5c61c956..404c03a11 100644
--- a/apps/playground/src/styles/globals.css
+++ b/apps/playground/src/styles/globals.css
@@ -1,3 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
+.button-with-tooltip:hover .button-with-tooltip-content {
+ visibility: visible;
+}
diff --git a/apps/playground/tailwind.config.js b/apps/playground/tailwind.config.js
index 6255a9d62..17994b23f 100644
--- a/apps/playground/tailwind.config.js
+++ b/apps/playground/tailwind.config.js
@@ -1,11 +1,12 @@
+const flowbite = require("flowbite-react/tailwind");
+
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "class",
content: [
- "./node_modules/flowbite/**/*.js",
- "./node_modules/flowbite-react/**/*.js",
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
+ flowbite.content(),
],
theme: {
extend: {
@@ -73,5 +74,5 @@ module.exports = {
],
},
},
- plugins: [require("flowbite-typography"), require("flowbite/plugin")],
+ plugins: [require("flowbite-typography"), flowbite.plugin()],
};
diff --git a/package-lock.json b/package-lock.json
index 984b0b972..b5465bd4d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -276,7 +276,7 @@
"@next/mdx": "^14.2.3",
"@next/third-parties": "^14.2.5",
"copy-to-clipboard": "^3.3.3",
- "flowbite": "^2.3.0",
+ "flowbite": "^2.5.1",
"flowbite-react": "^0.9.0",
"flowbite-typography": "^1.0.3",
"json-bigint": "^1.0.0",
@@ -22364,7 +22364,7 @@
},
"packages/mesh-common": {
"name": "@meshsdk/common",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
"bech32": "^2.0.0",
@@ -22381,14 +22381,14 @@
},
"packages/mesh-contract": {
"name": "@meshsdk/contract",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
- "@meshsdk/core": "1.7.0",
- "@meshsdk/core-csl": "1.7.0",
- "@meshsdk/core-cst": "1.7.0",
- "@meshsdk/transaction": "1.7.0"
+ "@meshsdk/common": "1.7.2",
+ "@meshsdk/core": "1.7.2",
+ "@meshsdk/core-csl": "1.7.2",
+ "@meshsdk/core-cst": "1.7.2",
+ "@meshsdk/transaction": "1.7.2"
},
"devDependencies": {
"@meshsdk/configs": "*",
@@ -22399,16 +22399,16 @@
},
"packages/mesh-core": {
"name": "@meshsdk/core",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
- "@meshsdk/core-csl": "1.7.0",
- "@meshsdk/core-cst": "1.7.0",
- "@meshsdk/provider": "1.7.0",
- "@meshsdk/react": "1.7.0",
- "@meshsdk/transaction": "1.7.0",
- "@meshsdk/wallet": "1.7.0"
+ "@meshsdk/common": "1.7.2",
+ "@meshsdk/core-csl": "1.7.2",
+ "@meshsdk/core-cst": "1.7.2",
+ "@meshsdk/provider": "1.7.2",
+ "@meshsdk/react": "1.7.2",
+ "@meshsdk/transaction": "1.7.2",
+ "@meshsdk/wallet": "1.7.2"
},
"devDependencies": {
"@meshsdk/configs": "*",
@@ -22419,10 +22419,10 @@
},
"packages/mesh-core-csl": {
"name": "@meshsdk/core-csl",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
+ "@meshsdk/common": "1.7.2",
"@sidan-lab/sidan-csl-rs-browser": "0.8.0",
"@sidan-lab/sidan-csl-rs-nodejs": "0.8.0",
"json-bigint": "^1.0.0"
@@ -22438,7 +22438,7 @@
},
"packages/mesh-core-cst": {
"name": "@meshsdk/core-cst",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
"@cardano-sdk/core": "^0.35.4",
@@ -22447,7 +22447,7 @@
"@harmoniclabs/cbor": "1.3.0",
"@harmoniclabs/plutus-data": "1.2.4",
"@harmoniclabs/uplc": "1.2.4",
- "@meshsdk/common": "1.7.0",
+ "@meshsdk/common": "1.7.2",
"@stricahq/bip32ed25519": "^1.1.0",
"@stricahq/cbors": "^1.0.0",
"pbkdf2": "^3.1.2"
@@ -22464,11 +22464,11 @@
},
"packages/mesh-provider": {
"name": "@meshsdk/provider",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
- "@meshsdk/core-cst": "1.7.0",
+ "@meshsdk/common": "1.7.2",
+ "@meshsdk/core-cst": "1.7.2",
"axios": "^1.7.2"
},
"devDependencies": {
@@ -22480,12 +22480,12 @@
},
"packages/mesh-react": {
"name": "@meshsdk/react",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
- "@meshsdk/transaction": "1.7.0",
- "@meshsdk/wallet": "1.7.0",
+ "@meshsdk/common": "1.7.2",
+ "@meshsdk/transaction": "1.7.2",
+ "@meshsdk/wallet": "1.7.2",
"react": "^18.2.0"
},
"devDependencies": {
@@ -22500,12 +22500,12 @@
},
"packages/mesh-transaction": {
"name": "@meshsdk/transaction",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
- "@meshsdk/core-csl": "1.7.0",
- "@meshsdk/core-cst": "1.7.0",
+ "@meshsdk/common": "1.7.2",
+ "@meshsdk/core-csl": "1.7.2",
+ "@meshsdk/core-cst": "1.7.2",
"json-bigint": "^1.0.0"
},
"devDependencies": {
@@ -22518,13 +22518,13 @@
},
"packages/mesh-wallet": {
"name": "@meshsdk/wallet",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "1.7.0",
- "@meshsdk/core-csl": "1.7.0",
- "@meshsdk/core-cst": "1.7.0",
- "@meshsdk/transaction": "1.7.0",
+ "@meshsdk/common": "1.7.2",
+ "@meshsdk/core-csl": "1.7.2",
+ "@meshsdk/core-cst": "1.7.2",
+ "@meshsdk/transaction": "1.7.2",
"@nufi/dapp-client-cardano": "^0.3.1",
"@nufi/dapp-client-core": "^0.3.1"
},
@@ -22538,7 +22538,7 @@
},
"scripts/mesh-cli": {
"name": "meshjs",
- "version": "1.7.0",
+ "version": "1.7.2",
"license": "Apache-2.0",
"dependencies": {
"chalk": "5.3.0",
From 5d0fbb5709a67a23a37b232bdaeac0df45fd1ca5 Mon Sep 17 00:00:00 2001
From: "Hong Jing (Jingles)"
Date: Thu, 5 Sep 2024 17:09:51 +0800
Subject: [PATCH 03/17] update checkSignature guide
---
.../src/pages/guides/prove-wallet-ownership/index.mdx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/playground/src/pages/guides/prove-wallet-ownership/index.mdx b/apps/playground/src/pages/guides/prove-wallet-ownership/index.mdx
index dc548e82f..cc28230d5 100644
--- a/apps/playground/src/pages/guides/prove-wallet-ownership/index.mdx
+++ b/apps/playground/src/pages/guides/prove-wallet-ownership/index.mdx
@@ -132,7 +132,7 @@ import { checkSignature } from '@meshsdk/core';
async function backendVerifySignature(userAddress, signature) {
// do: get 'nonce' from user (database) using 'userAddress'
- const result = checkSignature(nonce, userAddress, signature);
+ const result = checkSignature(nonce, signature);
// do: update 'nonce' in the database with another random string
@@ -206,7 +206,7 @@ async function backendGetNonce(userAddress) {
async function backendVerifySignature(userAddress, signature) {
// do: get 'nonce' from database
- const result = checkSignature(nonce, userAddress, signature);
+ const result = checkSignature(nonce, signature);
if(result){
// create JWT or approve certain process
}
From 42b575e3f412a05f44be8a16c1683f5fd24103ad Mon Sep 17 00:00:00 2001
From: SIDANWhatever
Date: Thu, 5 Sep 2024 17:49:03 +0800
Subject: [PATCH 04/17] fix: fixing contracts for mainnet
---
packages/mesh-contract/src/escrow/offchain.ts | 8 ++++----
packages/mesh-contract/src/marketplace/offchain.ts | 2 +-
packages/mesh-contract/src/swap/offchain.ts | 4 ++--
packages/mesh-core/src/utils/serializer.ts | 8 ++++++--
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/packages/mesh-contract/src/escrow/offchain.ts b/packages/mesh-contract/src/escrow/offchain.ts
index f3309e570..b391c9f34 100644
--- a/packages/mesh-contract/src/escrow/offchain.ts
+++ b/packages/mesh-contract/src/escrow/offchain.ts
@@ -112,8 +112,8 @@ export class MeshEscrowContract extends MeshTxInitiator {
recipientAmount,
] = inputDatum.fields;
- const initiatorAddress = serializeAddressObj(initiatorAddressObj);
- const recipientAddress = serializeAddressObj(recipientAddressObj!);
+ const initiatorAddress = serializeAddressObj(initiatorAddressObj, this.networkId);
+ const recipientAddress = serializeAddressObj(recipientAddressObj!, this.networkId);
const initiatorToReceive =
MeshValue.fromValue(initiatorAmount).toAssets();
const recipientToReceive = MeshValue.fromValue(
@@ -220,8 +220,8 @@ export class MeshEscrowContract extends MeshTxInitiator {
recipientAddressObj,
recipientAmount,
] = inputDatum.fields;
- const initiatorAddress = serializeAddressObj(initiatorAddressObj);
- const recipientAddress = serializeAddressObj(recipientAddressObj);
+ const initiatorAddress = serializeAddressObj(initiatorAddressObj, this.networkId);
+ const recipientAddress = serializeAddressObj(recipientAddressObj, this.networkId);
const initiatorToReceive = MeshValue.fromValue(recipientAmount).toAssets();
const recipientToReceive = MeshValue.fromValue(initiatorAmount).toAssets();
diff --git a/packages/mesh-contract/src/marketplace/offchain.ts b/packages/mesh-contract/src/marketplace/offchain.ts
index 85a01f2b4..d24661381 100644
--- a/packages/mesh-contract/src/marketplace/offchain.ts
+++ b/packages/mesh-contract/src/marketplace/offchain.ts
@@ -183,7 +183,7 @@ export class MeshMarketplaceContract extends MeshTxInitiator {
(inputDatum.fields[1].int as number) + Number(inputLovelace);
if (sellerToReceiveLovelace > 0) {
- const sellerAddress = serializeAddressObj(inputDatum.fields[0]);
+ const sellerAddress = serializeAddressObj(inputDatum.fields[0], this.networkId);
const sellerToReceive = [
{
unit: "lovelace",
diff --git a/packages/mesh-contract/src/swap/offchain.ts b/packages/mesh-contract/src/swap/offchain.ts
index 0d6c254bf..e0c9c9ef2 100644
--- a/packages/mesh-contract/src/swap/offchain.ts
+++ b/packages/mesh-contract/src/swap/offchain.ts
@@ -76,7 +76,7 @@ export class MeshSwapContract extends MeshTxInitiator {
const inlineDatum = deserializeDatum(
swapUtxo.output.plutusData!,
);
- const initiatorAddress = serializeAddressObj(inlineDatum.fields[0]);
+ const initiatorAddress = serializeAddressObj(inlineDatum.fields[0], this.networkId);
const initiatorToReceive = inlineDatum.fields[2];
await this.mesh
@@ -112,7 +112,7 @@ export class MeshSwapContract extends MeshTxInitiator {
const inlineDatum = deserializeDatum(
swapUtxo.output.plutusData!,
);
- const initiatorAddress = serializeAddressObj(inlineDatum.fields[0]);
+ const initiatorAddress = serializeAddressObj(inlineDatum.fields[0], this.networkId);
await this.mesh
.spendingPlutusScriptV2()
.txIn(
diff --git a/packages/mesh-core/src/utils/serializer.ts b/packages/mesh-core/src/utils/serializer.ts
index d22c2b5e2..325cf53b0 100644
--- a/packages/mesh-core/src/utils/serializer.ts
+++ b/packages/mesh-core/src/utils/serializer.ts
@@ -63,10 +63,14 @@ export const serializePlutusScript = (
/**
* Serialize address in Cardano data JSON format into bech32 address
* @param address The Cardano address in data JSON format
+ * @param networkId 0 (testnet) or 1 (mainnet). Default to be 0 (testnet).
* @returns Bech32 address
*/
-export const serializeAddressObj = (address: PubKeyAddress | ScriptAddress) => {
- return core.serializeAddressObj(address);
+export const serializeAddressObj = (
+ address: PubKeyAddress | ScriptAddress,
+ networkId = 0,
+) => {
+ return core.serializeAddressObj(address, networkId);
};
/**
From 14c433ae79b3c4b29a7aedd2ba042d895588708c Mon Sep 17 00:00:00 2001
From: SIDANWhatever
Date: Thu, 5 Sep 2024 17:50:40 +0800
Subject: [PATCH 05/17] feat: expose lower level api utxo selection for tx
class
---
packages/mesh-transaction/src/transaction/index.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/mesh-transaction/src/transaction/index.ts b/packages/mesh-transaction/src/transaction/index.ts
index e678f0e10..6300f8cac 100644
--- a/packages/mesh-transaction/src/transaction/index.ts
+++ b/packages/mesh-transaction/src/transaction/index.ts
@@ -633,8 +633,10 @@ export class Transaction {
}
private async addTxInputsAsNeeded() {
- const utxos = await this.initiator.getUtxos();
- this.txBuilder.selectUtxosFrom(utxos);
+ if (this.txBuilder.meshTxBuilderBody.extraInputs.length === 0) {
+ const utxos = await this.initiator.getUtxos();
+ this.txBuilder.selectUtxosFrom(utxos);
+ }
}
private async addChangeAddress() {
From 041463de73981caf51854ed258d2da74f311a481 Mon Sep 17 00:00:00 2001
From: "Hong Jing (Jingles)"
Date: Thu, 5 Sep 2024 19:31:03 +0800
Subject: [PATCH 06/17] init governance
---
.../public/{drep => governance}/meshjs.jsonld | 0
.../public/governance/network-3524352_640.jpg | Bin 0 -> 117567 bytes
.../layouts/image-header-and-body.tsx | 28 +++--
.../src/components/layouts/markdown.tsx | 1 +
.../layouts/sidebar/sticky-sidebar.tsx | 97 ++++++++++++++++++
.../playground/src/pages/governance/index.mdx | 29 ++++++
apps/playground/src/pages/guides/nextjs.mdx | 5 +
7 files changed, 151 insertions(+), 9 deletions(-)
rename apps/playground/public/{drep => governance}/meshjs.jsonld (100%)
create mode 100644 apps/playground/public/governance/network-3524352_640.jpg
create mode 100644 apps/playground/src/components/layouts/sidebar/sticky-sidebar.tsx
create mode 100644 apps/playground/src/pages/governance/index.mdx
diff --git a/apps/playground/public/drep/meshjs.jsonld b/apps/playground/public/governance/meshjs.jsonld
similarity index 100%
rename from apps/playground/public/drep/meshjs.jsonld
rename to apps/playground/public/governance/meshjs.jsonld
diff --git a/apps/playground/public/governance/network-3524352_640.jpg b/apps/playground/public/governance/network-3524352_640.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6e6af8b201b86c34df8398737ffd96b5372f9338
GIT binary patch
literal 117567
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