diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..786dbdf5 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true, + "arrowParens": "avoid" +} diff --git a/docs/about-settlemint/4_components.mdx b/docs/about-settlemint/4_components.mdx index c4ace517..78f4b10e 100644 --- a/docs/about-settlemint/4_components.mdx +++ b/docs/about-settlemint/4_components.mdx @@ -5,12 +5,12 @@ description: Overview of the SettleMint components and tools available to build sidebar_position: 1 --- -import blockchainApplication from '@site/static/img/about-settlemint/blockchain-application.png'; -import blockchainNetwork from '@site/static/img/about-settlemint/network-node.png'; -import smartContract from '@site/static/img/about-settlemint/smart-contract.png'; -import middleware from '@site/static/img/about-settlemint/middleware.png'; -import storage from '@site/static/img/about-settlemint/storage.png'; -import integration from '@site/static/img/about-settlemint/integration.png'; +import blockchainApplication from "@site/static/img/about-settlemint/blockchain-application.png"; +import blockchainNetwork from "@site/static/img/about-settlemint/network-node.png"; +import smartContract from "@site/static/img/about-settlemint/smart-contract.png"; +import middleware from "@site/static/img/about-settlemint/middleware.png"; +import storage from "@site/static/img/about-settlemint/storage.png"; +import integration from "@site/static/img/about-settlemint/integration.png"; This guide will explain each of the tools and services on SettleMint and how they connected to build a blockchain application. @@ -22,12 +22,12 @@ build a blockchain application. alt="Blockchain Application" width="70%" height="70%" - style={{ display: 'block', margin: '0 auto' }} + style={{ display: "block", margin: "0 auto" }} /> The first step to building anything on SettleMint is to [create an application](../../using-platform/create-an-application). You can think of an application as the collection of resources that you need to build your blockchain application. This includes a blockchain network, smart contracts, -middleware, storage, and integrations.{' '} +middleware, storage, and integrations.{" "} ## Add a Blockchain Network and Node @@ -36,13 +36,13 @@ middleware, storage, and integrations.{' '} alt="Blockchain Network and Node" width="70%" height="70%" - style={{ display: 'block', margin: '0 auto' }} + style={{ display: "block", margin: "0 auto" }} /> After creating a blockchain application, you now need to [add a blockchain network](../../using-platform/add-a-network-to-an-application) and node to your application. SettleMint offeres a variety of different [blockchain networks](../supported-blockchains) to choose from whatever your usecase may be. Networks need nodes to support the blockchain to run, once a [network is created](../../using-platform/add-a-node-to-a-network/) -then a node is also added automatically.{' '} +then a node is also added automatically.{" "} ## Create a Smart Contract @@ -51,10 +51,10 @@ then a node is also added automatically.{' '} alt="Add a Smart Contract" width="70%" height="70%" - style={{ display: 'block', margin: '0 auto' }} + style={{ display: "block", margin: "0 auto" }} /> Smart Contracts allow us to run code on the blockchain. Developing a smart contract -by [adding a smart contract set](../../using-platform/add_smart_contract_sets/create_smart_contract_set), +by [adding a smart contract set](../../using-platform/dev-tools/code-studio/smart-contract-sets), is an important step to reaching the business and product goals of your blockchain application. @@ -65,12 +65,12 @@ application. alt="Middleware" width="70%" height="70%" - style={{ display: 'block', margin: '0 auto' }} + style={{ display: "block", margin: "0 auto" }} /> Blockchain applications produce data that lives on the blockchain, but we need to be able to access that data in order to use it. Creating a [middleware](../../using-platform/middleware/) allows us SettleMint currently offers two middleware services: The Graph and Smart -Contract Portal Middleware.{' '} +Contract Portal Middleware.{" "} ## Add Storage @@ -79,7 +79,7 @@ Contract Portal Middleware.{' '} alt="Storage" width="70%" height="70%" - style={{ display: 'block', margin: '0 auto' }} + style={{ display: "block", margin: "0 auto" }} /> Your blockchain application may need to store data. Blockchains are good for running different processes in a decentralized way but can be costly to store large amounts @@ -93,7 +93,7 @@ IPFS (decentralized) and MinIO (centralized) S3 storage. alt="Integration" width="70%" height="70%" - style={{ display: 'block', margin: '0 auto' }} + style={{ display: "block", margin: "0 auto" }} /> Blockchains are not the only technology that your blockchain application may need to interact with. SettleMint offers an [Integration Studio](../../using-platform/integration-studio) diff --git a/docs/blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md b/docs/blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md index 02bc6dcd..4f12d8e2 100644 --- a/docs/blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md +++ b/docs/blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/0_Ethereum/Template-library/1_ethereum-erc-20.md b/docs/blockchain-guides/0_Ethereum/Template-library/1_ethereum-erc-20.md index 6461fd02..eddb78ba 100644 --- a/docs/blockchain-guides/0_Ethereum/Template-library/1_ethereum-erc-20.md +++ b/docs/blockchain-guides/0_Ethereum/Template-library/1_ethereum-erc-20.md @@ -35,7 +35,7 @@ To set the name and symbol for your token, go to the **“deploy”** folder and await deploy('GenericToken', { from: deployer, args: ['GenericToken', 'GT'], - log: true, + log: true }); ``` @@ -86,14 +86,14 @@ const EIP712Domain = [ { name: 'name', type: 'string' }, { name: 'version', type: 'string' }, { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: 'verifyingContract', type: 'address' } ]; const domain = { name: 'MinimalForwarder', version: '0.0.1', chainId: parseInt(await getChainId()), - verifyingContract: forwarderAddress, + verifyingContract: forwarderAddress }; const types = { EIP712Domain, @@ -103,8 +103,8 @@ const types = { { name: 'value', type: 'uint256' }, { name: 'gas', type: 'uint256' }, { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, - ], + { name: 'data', type: 'bytes' } + ] }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData('transfer', [ + walletTwoAddress, + ethers.utils.parseUnits('10') +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,14 +128,16 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read('Forwarder', 'getNonce', walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, value: '0', gas: '100000', nonce: walletOneNonce, - data: functionData, + data: functionData }; const signedData = ethSigUtil.signTypedData({ @@ -141,9 +146,9 @@ const signedData = ethSigUtil.signTypedData({ types: types, domain: domain, primaryType: 'ForwardRequest', - message: req, + message: req }, - version: ethSigUtil.SignTypedDataVersion.V4, + version: ethSigUtil.SignTypedDataVersion.V4 }); ``` @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/0_Ethereum/Template-library/2_ethereum-erc-721.md b/docs/blockchain-guides/0_Ethereum/Template-library/2_ethereum-erc-721.md index 9185693a..849efda8 100644 --- a/docs/blockchain-guides/0_Ethereum/Template-library/2_ethereum-erc-721.md +++ b/docs/blockchain-guides/0_Ethereum/Template-library/2_ethereum-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/10_Polygon-zkEVM/5_polygon-zkevm-integration-tools.md b/docs/blockchain-guides/10_Polygon-zkEVM/5_polygon-zkevm-integration-tools.md index dd386ef1..3290a1c4 100644 --- a/docs/blockchain-guides/10_Polygon-zkEVM/5_polygon-zkevm-integration-tools.md +++ b/docs/blockchain-guides/10_Polygon-zkEVM/5_polygon-zkevm-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library @@ -67,4 +67,4 @@ Here are some prompts to get you started: - Write a Solidity ERC721 token representing real estate, based on OpenZeppelin and allow fractional ownership of this NFT in the form of ERC20 tokens. - Write The Graph indexing code that indexes an ERC721 token on the Ethereum Mainnet. - \ No newline at end of file + diff --git a/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/1_polygon-zkevm-erc-20.md b/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/1_polygon-zkevm-erc-20.md index 05e94736..dfd7c3db 100644 --- a/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/1_polygon-zkevm-erc-20.md +++ b/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/1_polygon-zkevm-erc-20.md @@ -35,7 +35,7 @@ To set the name and symbol for your token, go to the **“deploy”** folder and await deploy('GenericToken', { from: deployer, args: ['GenericToken', 'GT'], - log: true, + log: true }); ``` @@ -86,14 +86,14 @@ const EIP712Domain = [ { name: 'name', type: 'string' }, { name: 'version', type: 'string' }, { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: 'verifyingContract', type: 'address' } ]; const domain = { name: 'MinimalForwarder', version: '0.0.1', chainId: parseInt(await getChainId()), - verifyingContract: forwarderAddress, + verifyingContract: forwarderAddress }; const types = { EIP712Domain, @@ -103,8 +103,8 @@ const types = { { name: 'value', type: 'uint256' }, { name: 'gas', type: 'uint256' }, { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, - ], + { name: 'data', type: 'bytes' } + ] }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData('transfer', [ + walletTwoAddress, + ethers.utils.parseUnits('10') +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,14 +128,16 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read('Forwarder', 'getNonce', walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, value: '0', gas: '100000', nonce: walletOneNonce, - data: functionData, + data: functionData }; const signedData = ethSigUtil.signTypedData({ @@ -141,9 +146,9 @@ const signedData = ethSigUtil.signTypedData({ types: types, domain: domain, primaryType: 'ForwardRequest', - message: req, + message: req }, - version: ethSigUtil.SignTypedDataVersion.V4, + version: ethSigUtil.SignTypedDataVersion.V4 }); ``` @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. \ No newline at end of file +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/2_polygon-zkevm-erc-721.md b/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/2_polygon-zkevm-erc-721.md index ed723d71..363f7c88 100644 --- a/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/2_polygon-zkevm-erc-721.md +++ b/docs/blockchain-guides/10_Polygon-zkEVM/Template-library/2_polygon-zkevm-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. \ No newline at end of file +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/11_Fantom/5_fantom-integration-tools.md b/docs/blockchain-guides/11_Fantom/5_fantom-integration-tools.md index b517618b..c5be17ec 100644 --- a/docs/blockchain-guides/11_Fantom/5_fantom-integration-tools.md +++ b/docs/blockchain-guides/11_Fantom/5_fantom-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/11_Fantom/Template-library/1_fantom-erc-20.md b/docs/blockchain-guides/11_Fantom/Template-library/1_fantom-erc-20.md index 0a9de589..bd6d718c 100644 --- a/docs/blockchain-guides/11_Fantom/Template-library/1_fantom-erc-20.md +++ b/docs/blockchain-guides/11_Fantom/Template-library/1_fantom-erc-20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/11_Fantom/Template-library/2_fantom-erc-721.md b/docs/blockchain-guides/11_Fantom/Template-library/2_fantom-erc-721.md index fc8259b7..0b7a7304 100644 --- a/docs/blockchain-guides/11_Fantom/Template-library/2_fantom-erc-721.md +++ b/docs/blockchain-guides/11_Fantom/Template-library/2_fantom-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/12_Soneium/5_soneium-integration-tools.md b/docs/blockchain-guides/12_Soneium/5_soneium-integration-tools.md index 4d239eba..621f7bea 100644 --- a/docs/blockchain-guides/12_Soneium/5_soneium-integration-tools.md +++ b/docs/blockchain-guides/12_Soneium/5_soneium-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/12_Soneium/Template-library/1_soneium-erc-20.md b/docs/blockchain-guides/12_Soneium/Template-library/1_soneium-erc-20.md index 91632091..6ee85aa9 100644 --- a/docs/blockchain-guides/12_Soneium/Template-library/1_soneium-erc-20.md +++ b/docs/blockchain-guides/12_Soneium/Template-library/1_soneium-erc-20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/12_Soneium/Template-library/2_soneium-erc-721.md b/docs/blockchain-guides/12_Soneium/Template-library/2_soneium-erc-721.md index cf5dbc63..b27a0f07 100644 --- a/docs/blockchain-guides/12_Soneium/Template-library/2_soneium-erc-721.md +++ b/docs/blockchain-guides/12_Soneium/Template-library/2_soneium-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md b/docs/blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md index e32b1706..4ff7c7dc 100644 --- a/docs/blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md +++ b/docs/blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/1_Hyperledger-Besu/9_enterprise-ethereum-connect-external-network.md b/docs/blockchain-guides/1_Hyperledger-Besu/9_enterprise-ethereum-connect-external-network.md index f35fdef7..c12437ed 100644 --- a/docs/blockchain-guides/1_Hyperledger-Besu/9_enterprise-ethereum-connect-external-network.md +++ b/docs/blockchain-guides/1_Hyperledger-Besu/9_enterprise-ethereum-connect-external-network.md @@ -16,7 +16,7 @@ The SettleMint platform seamlessly integrates with existing external networks. Y 4. Enter names for the network and the node. 5. Upload the network's genesis file. Bootnodes specified in the genesis file will be automatically identified and added as external nodes. 6. Add at least one enode URL of an existing running node on the network. Note: If a bootnode is specified in the genesis file, it will be added automatically as an external node, allowing you to skip this step. -7. Choose the deployment plan for the node. For more information about deployment plans, [see here](../../using-platform/22_deployment-plans.md). +7. Choose the deployment plan for the node. For more information about deployment plans, [see here](../../using-platform/21_deployment-plans.md). This process will create a new non-validator node in your existing network. @@ -24,7 +24,7 @@ This process will create a new non-validator node in your existing network. To add more nodes to your network: -1. Navigate to the create node form (see [Adding a Node to a Network](../../using-platform/2_add-a-node-to-a-network.md) for detailed instructions). +1. Navigate to the create node form (see [Adding a Node to a Network](../../using-platform/4_add-a-node-to-a-network.md) for detailed instructions). 2. Choose between creating the node as a validator or non-validator. 3. Note: To deploy nodes as validators, a majority (66%) of validators must be running on the SettleMint platform. 4. If you don't have a majority, create the node as a non-validator first, then follow the process in [Add a Validator](#add-a-validator) to make it a validator. diff --git a/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/1_enterprise-ethereum-erc20.md b/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/1_enterprise-ethereum-erc20.md index 6461fd02..1559bca7 100644 --- a/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/1_enterprise-ethereum-erc20.md +++ b/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/1_enterprise-ethereum-erc20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/2_enterprise-ethereum-erc721.md b/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/2_enterprise-ethereum-erc721.md index 9185693a..849efda8 100644 --- a/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/2_enterprise-ethereum-erc721.md +++ b/docs/blockchain-guides/1_Hyperledger-Besu/Template-library/2_enterprise-ethereum-erc721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md b/docs/blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md index 80ec15c1..566a49e5 100644 --- a/docs/blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md +++ b/docs/blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/2_Avalanche/Template-library/1_avalanche-erc-20.md b/docs/blockchain-guides/2_Avalanche/Template-library/1_avalanche-erc-20.md index 9d4dd3cf..1d254fe7 100644 --- a/docs/blockchain-guides/2_Avalanche/Template-library/1_avalanche-erc-20.md +++ b/docs/blockchain-guides/2_Avalanche/Template-library/1_avalanche-erc-20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/2_Avalanche/Template-library/2_avalanche-erc-721.md b/docs/blockchain-guides/2_Avalanche/Template-library/2_avalanche-erc-721.md index 790ea582..a04b4f0d 100644 --- a/docs/blockchain-guides/2_Avalanche/Template-library/2_avalanche-erc-721.md +++ b/docs/blockchain-guides/2_Avalanche/Template-library/2_avalanche-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/4_Polygon/5_polygon-integration-tools.md b/docs/blockchain-guides/4_Polygon/5_polygon-integration-tools.md index f0c10a12..5c60e8f4 100644 --- a/docs/blockchain-guides/4_Polygon/5_polygon-integration-tools.md +++ b/docs/blockchain-guides/4_Polygon/5_polygon-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/4_Polygon/Template-library/1_polygon-erc-20.md b/docs/blockchain-guides/4_Polygon/Template-library/1_polygon-erc-20.md index 94cfa844..3ce7d254 100644 --- a/docs/blockchain-guides/4_Polygon/Template-library/1_polygon-erc-20.md +++ b/docs/blockchain-guides/4_Polygon/Template-library/1_polygon-erc-20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/4_Polygon/Template-library/2_polygon-erc-721.md b/docs/blockchain-guides/4_Polygon/Template-library/2_polygon-erc-721.md index 116784c6..5d148bcb 100644 --- a/docs/blockchain-guides/4_Polygon/Template-library/2_polygon-erc-721.md +++ b/docs/blockchain-guides/4_Polygon/Template-library/2_polygon-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/7_Arbitrum/5_arbitrum-integration-tools.md b/docs/blockchain-guides/7_Arbitrum/5_arbitrum-integration-tools.md index f628ce76..f4219bce 100644 --- a/docs/blockchain-guides/7_Arbitrum/5_arbitrum-integration-tools.md +++ b/docs/blockchain-guides/7_Arbitrum/5_arbitrum-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/7_Arbitrum/Template-library/1_arbitrum-erc-20.md b/docs/blockchain-guides/7_Arbitrum/Template-library/1_arbitrum-erc-20.md index 4f4a34d7..906823e9 100644 --- a/docs/blockchain-guides/7_Arbitrum/Template-library/1_arbitrum-erc-20.md +++ b/docs/blockchain-guides/7_Arbitrum/Template-library/1_arbitrum-erc-20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/7_Arbitrum/Template-library/2_arbitrum-erc-721.md b/docs/blockchain-guides/7_Arbitrum/Template-library/2_arbitrum-erc-721.md index 025c755f..e4aa5b1e 100644 --- a/docs/blockchain-guides/7_Arbitrum/Template-library/2_arbitrum-erc-721.md +++ b/docs/blockchain-guides/7_Arbitrum/Template-library/2_arbitrum-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/8_Optimism/5_optimism-integration-tools.md b/docs/blockchain-guides/8_Optimism/5_optimism-integration-tools.md index 3a8994fc..cd2e93d9 100644 --- a/docs/blockchain-guides/8_Optimism/5_optimism-integration-tools.md +++ b/docs/blockchain-guides/8_Optimism/5_optimism-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/8_Optimism/Template-library/1_optimism-erc-20.md b/docs/blockchain-guides/8_Optimism/Template-library/1_optimism-erc-20.md index d9b9d51f..1d3dc070 100644 --- a/docs/blockchain-guides/8_Optimism/Template-library/1_optimism-erc-20.md +++ b/docs/blockchain-guides/8_Optimism/Template-library/1_optimism-erc-20.md @@ -32,9 +32,9 @@ contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl { To set the name and symbol for your token, go to the **“deploy”** folder and in **“00_Deploy_GenericToken.ts”**, change the values in **“args”** in the **“deploy”** function. ```typescript -await deploy('GenericToken', { +await deploy("GenericToken", { from: deployer, - args: ['GenericToken', 'GT'], + args: ["GenericToken", "GT"], log: true, }); ``` @@ -83,27 +83,27 @@ First, to send meta transactions using the `forwarder`, we have to define three ```typescript const EIP712Domain = [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, ]; const domain = { - name: 'MinimalForwarder', - version: '0.0.1', + name: "MinimalForwarder", + version: "0.0.1", chainId: parseInt(await getChainId()), verifyingContract: forwarderAddress, }; const types = { EIP712Domain, ForwardRequest: [ - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'gas', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, + { name: "from", type: "address" }, + { name: "to", type: "address" }, + { name: "value", type: "uint256" }, + { name: "gas", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "data", type: "bytes" }, ], }; ``` @@ -117,7 +117,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData("transfer", [ + walletTwoAddress, + ethers.utils.parseUnits("10"), +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -125,12 +128,14 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read("Forwarder", "getNonce", walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, - value: '0', - gas: '100000', + value: "0", + gas: "100000", nonce: walletOneNonce, data: functionData, }; @@ -140,7 +145,7 @@ const signedData = ethSigUtil.signTypedData({ data: { types: types, domain: domain, - primaryType: 'ForwardRequest', + primaryType: "ForwardRequest", message: req, }, version: ethSigUtil.SignTypedDataVersion.V4, @@ -150,7 +155,7 @@ const signedData = ethSigUtil.signTypedData({ Finally, once the transaction is signed, we can send it to the `forwarder`: ```typescript -await forwarder.execute(req, signedData, { gasLimit: '100000' }); +await forwarder.execute(req, signedData, { gasLimit: "100000" }); ``` ## ERC-20 Crowdsale @@ -261,4 +266,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/8_Optimism/Template-library/2_optimism-erc-721.md b/docs/blockchain-guides/8_Optimism/Template-library/2_optimism-erc-721.md index 602fb7f1..aaf77b28 100644 --- a/docs/blockchain-guides/8_Optimism/Template-library/2_optimism-erc-721.md +++ b/docs/blockchain-guides/8_Optimism/Template-library/2_optimism-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/9_Hedera/5_hedera-integration-tools.md b/docs/blockchain-guides/9_Hedera/5_hedera-integration-tools.md index 6a5abec7..3e668203 100644 --- a/docs/blockchain-guides/9_Hedera/5_hedera-integration-tools.md +++ b/docs/blockchain-guides/9_Hedera/5_hedera-integration-tools.md @@ -45,7 +45,7 @@ For example, to run the `smartcontract:deploy` task using the terminal, open a n ## Private key -To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/17_private-keys.md) +To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the **Private keys section** of your application. [More about private keys.](../../using-platform/12_private-keys.md) ## Template library diff --git a/docs/blockchain-guides/9_Hedera/Template-library/1_hedera-erc-20.md b/docs/blockchain-guides/9_Hedera/Template-library/1_hedera-erc-20.md index c0c67c35..f41f47b7 100644 --- a/docs/blockchain-guides/9_Hedera/Template-library/1_hedera-erc-20.md +++ b/docs/blockchain-guides/9_Hedera/Template-library/1_hedera-erc-20.md @@ -35,7 +35,7 @@ To set the name and symbol for your token, go to the **“deploy”** folder and await deploy('GenericToken', { from: deployer, args: ['GenericToken', 'GT'], - log: true, + log: true }); ``` @@ -43,7 +43,7 @@ As soon as you are happy with the changes you made, just click on **“deploy” The **“GenericToken.ts”** script in the **“test”** folder showcases all the functionalities of the ERC-20 standard. It shows you how to use the smart contract in your dapp. -*Note:* On the Hedera Mainnet time to time you can get timeouts errors(`Service Unavailable` in the IDE UI). JSON RPC relay in Hedera is a complex software which relies on multiple components (the consensus nodes, and the mirror node). One Ethereum TX can generate more than ten Hedera txs and if one of the tx fails due to the connection timeout, it can cause the problem. However, it's likely to have the problem with the smart contract deployment only. If you can keep trying a couple of times and then once your contract is deployed successfully. The subsequent contract calls should not have this kind of problem. +_Note:_ On the Hedera Mainnet time to time you can get timeouts errors(`Service Unavailable` in the IDE UI). JSON RPC relay in Hedera is a complex software which relies on multiple components (the consensus nodes, and the mirror node). One Ethereum TX can generate more than ten Hedera txs and if one of the tx fails due to the connection timeout, it can cause the problem. However, it's likely to have the problem with the smart contract deployment only. If you can keep trying a couple of times and then once your contract is deployed successfully. The subsequent contract calls should not have this kind of problem. ## ERC-20 with meta transactions @@ -88,14 +88,14 @@ const EIP712Domain = [ { name: 'name', type: 'string' }, { name: 'version', type: 'string' }, { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, + { name: 'verifyingContract', type: 'address' } ]; const domain = { name: 'MinimalForwarder', version: '0.0.1', chainId: parseInt(await getChainId()), - verifyingContract: forwarderAddress, + verifyingContract: forwarderAddress }; const types = { EIP712Domain, @@ -105,8 +105,8 @@ const types = { { name: 'value', type: 'uint256' }, { name: 'gas', type: 'uint256' }, { name: 'nonce', type: 'uint256' }, - { name: 'data', type: 'bytes' }, - ], + { name: 'data', type: 'bytes' } + ] }; ``` @@ -119,7 +119,10 @@ The name and version of domain have to match those of the forwarder (see the con Then, we need to generate the function data as follows: ```typescript -const functionData = token.interface.encodeFunctionData('transfer', [walletTwoAddress, ethers.utils.parseUnits('10')]); +const functionData = token.interface.encodeFunctionData('transfer', [ + walletTwoAddress, + ethers.utils.parseUnits('10') +]); ``` In that expression, `transfer` is the ERC-20 function we want to execute, `walletTwoAddress` is the account that will receive the tokens and the last parameter is the amount of tokens to be transferred. @@ -127,14 +130,16 @@ In that expression, `transfer` is the ERC-20 function we want to execute, `walle The last step before sending the meta transaction is to create and sign the message containing the underlying transaction as follows: ```typescript -const walletOneNonce = Number(await read('Forwarder', 'getNonce', walletOneAddress)); +const walletOneNonce = Number( + await read('Forwarder', 'getNonce', walletOneAddress) +); const req = { from: walletOneAddress, to: token.address, value: '0', gas: '100000', nonce: walletOneNonce, - data: functionData, + data: functionData }; const signedData = ethSigUtil.signTypedData({ @@ -143,9 +148,9 @@ const signedData = ethSigUtil.signTypedData({ types: types, domain: domain, primaryType: 'ForwardRequest', - message: req, + message: req }, - version: ethSigUtil.SignTypedDataVersion.V4, + version: ethSigUtil.SignTypedDataVersion.V4 }); ``` @@ -263,4 +268,4 @@ Here we are going to deploy: ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/blockchain-guides/9_Hedera/Template-library/2_hedera-erc-721.md b/docs/blockchain-guides/9_Hedera/Template-library/2_hedera-erc-721.md index 4a125204..d35430c3 100644 --- a/docs/blockchain-guides/9_Hedera/Template-library/2_hedera-erc-721.md +++ b/docs/blockchain-guides/9_Hedera/Template-library/2_hedera-erc-721.md @@ -220,4 +220,4 @@ yarn smartcontract:deploy:reveal ## Integration with the Middleware -Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/11_middleware.md) that allows you to index and query this data easily and efficiently. +Working with complex or large data in your dApp can be a challenge. In the SettleMint platform we provide you with a [middleware solution](../../../using-platform/7_middleware.md) that allows you to index and query this data easily and efficiently. diff --git a/docs/launch-platform/managed-cloud-deployment/1_quickstart.md b/docs/launch-platform/managed-cloud-deployment/1_quickstart.md index a41ad983..0dae6cb7 100644 --- a/docs/launch-platform/managed-cloud-deployment/1_quickstart.md +++ b/docs/launch-platform/managed-cloud-deployment/1_quickstart.md @@ -8,7 +8,7 @@ sidebar_position: 3 ##### This guide will help you explore some of the core building blocks of working with SettleMint even if this is your first time working with a Blockchain -In this guide you will learn how to [create a blockchain network](../../using-platform/1_add-a-network-to-an-application.md), [deploy a node](../../using-platform/2_add-a-node-to-a-network.md), write a [smart contract](../../using-platform/6_add_smart_contract_sets/0_smart_contracts.md) and [create an integration](../../using-platform/9_integration-studio.md). +In this guide you will learn how to [create a blockchain network](../../using-platform/1_add-a-network-to-an-application.md), [deploy a node](../../using-platform/4_add-a-node-to-a-network.md), write a [smart contract](../../using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/1_smart-contract-sets.md) and [create an integration](../../using-platform/8_integration-studio.md). Below is both a video and written guide for you to build along to: @@ -364,7 +364,7 @@ const deploy: DeployFunction = async ({ deployments, getNamedAccounts }) => { args: [], - log: true, + log: true }); }; diff --git a/docs/reference/14_statuses.md b/docs/reference/14_statuses.md index e1157912..db9ff41a 100644 --- a/docs/reference/14_statuses.md +++ b/docs/reference/14_statuses.md @@ -15,4 +15,4 @@ The following service statuses are defined: - **Deleting** - The service is being deleted. - **Scaling** - The resource pack for the service is scaling. -In relation to the resource usage of your services, specific [resource usage statuses](../using-platform/15_resource-usage.md) are defined. +In relation to the resource usage of your services, specific [resource usage statuses](../using-platform/19_resource-usage.md) are defined. diff --git a/docs/using-platform/13_insights.md b/docs/using-platform/10_insights.md similarity index 100% rename from docs/using-platform/13_insights.md rename to docs/using-platform/10_insights.md diff --git a/docs/using-platform/8_storage.md b/docs/using-platform/11_storage.md similarity index 100% rename from docs/using-platform/8_storage.md rename to docs/using-platform/11_storage.md diff --git a/docs/using-platform/12_firefly.md b/docs/using-platform/12_firefly.md deleted file mode 100644 index ea208b30..00000000 --- a/docs/using-platform/12_firefly.md +++ /dev/null @@ -1,135 +0,0 @@ -# Firefly FabConnect - -Firefly FabConnect is an open-source middleware that lets you interact with your Fabric network and the chaincode deployed on it. When you add the FabConnect middleware to your application on the SettleMint Platform, you automatically deploy a RESTful API to: - -- Manage identities on your network. -- Send transactions to your chaincode. -- Check any transaction receipt. -- Create event streams and subscriptions. - -:::warning Warning - -Before you start, make sure you are running: - -- A Fabric Network. -- A Fabric smart contract set. - -::: - -## Manage Identities - -Identities on a Fabric network are managed in two steps. First, a CA admin must register users. This is a process in which the CA admin gives an ID and secret to an identity. Then, the user of the identity enrolls the ID and secret pair to get a public/private key pair to sign transactions. - -Registering an identity can be done as follows using Firefly FabConnect: - -```shell -curl --request POST \ - --url https://fireflyfab-7853.gke-europe.settlemint.com/identities \ - --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ - --header 'Content-Type: application/json' \ - --data '{ - "type": "client", - "name": "user3", - "attributes": {} -}' -``` - -This request returns the secret associated with name user3: - -```shell - -{ -"name": "user3", -"secret": "fkrTKPOZZYWO" -} - -``` - -The end user of that identity can enroll it as follows: - -```shell - -curl --request POST \ - --url \ - --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ - --header 'Content-Type: application/json' \ - --data '{ -"secret": "fkrTKPOZZYWO" -"attributes": {} -}' - -``` - -## Sending Transactions - -Assuming that you have a [chaincode deployed](../blockchain-guides/5_Hyperledger-Fabric/6_hyperledger-fabric-integration-tools.md) on your network, you can send a transaction through the middleware: - -```shell - -curl --request POST \ - --url \ - --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ - --header 'Content-Type: application/json' --data '{ -"headers": { -"type": "SendTransaction", -"signer": "user3", -"channel": "default-channel", -"chaincode": "assetTransfer" -}, -"func": "CreateAsset", -"args": [ -"asset01", "blue", "5", "Alice", "500" -], -"init": false, "fly-sync": true -}' - -``` - -This transaction creates an asset in the assetTransfer chaincode deployed on the Fabric network. - -## Create Event Streams - -Firefly FabConnect can also be used to stream events happening on your network. You can either use webhook or websocket to deliver the data. - -This request create a stream using webhooks: - -```shell - -curl --request POST \ - --url \ - --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ - --header 'Content-Type: application/json' \ - --data '{ -"type": "webhook", -"name": "AssetTransfer", -"webhook": { -"url": "", -"tlsSkipVerifyHost": "true" -} -}' - -``` - -The response contains an event stream ID that is required to create a subscription: - -```shell - -curl --request POST \ - --url \ - --header 'Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ - --header 'Content-Type: application/json' \ - --data '{ -"payloadType": "string", -"name": "mySubscription", -"channel": "default-channel", -"signer": "user3", -"fromBlock": "0", -"stream": "es-92183185-01e3-4bc9-5433-348a640f5fe1", -"filter": { -"blockType": "tx", -"chaincodeId": "", -"eventFilter": "" -} -}' - -``` diff --git a/docs/using-platform/17_private-keys.md b/docs/using-platform/12_private-keys.md similarity index 100% rename from docs/using-platform/17_private-keys.md rename to docs/using-platform/12_private-keys.md diff --git a/docs/using-platform/18_user_wallet.md b/docs/using-platform/13_user_wallet.md similarity index 100% rename from docs/using-platform/18_user_wallet.md rename to docs/using-platform/13_user_wallet.md diff --git a/docs/using-platform/24_custom-deployment.md b/docs/using-platform/14_custom-deployment.md similarity index 98% rename from docs/using-platform/24_custom-deployment.md rename to docs/using-platform/14_custom-deployment.md index d545fa58..93b49dbf 100644 --- a/docs/using-platform/24_custom-deployment.md +++ b/docs/using-platform/14_custom-deployment.md @@ -71,8 +71,7 @@ When using Custom Deployment, keep the following limitations in mind: 2. **Read-Only Filesystem**: The filesystem is read-only. For data persistence, consider using: - - Hasura: A GraphQL engine that provides a scalable database solution. See [Backend-as-a-service - documentation](../backend-as-a-service). + - Hasura: A GraphQL engine that provides a scalable database solution. See [Hasura](./9_hasura-backend-as-a-service.md). - Other External Services: Depending on your specific needs, you may use other cloud-based storage or database services. 3. **Stateless Applications**: Your applications should be designed to be stateless. This ensures better scalability and reliability in a cloud environment. diff --git a/docs/using-platform/15_dev-tools/0_code-studio/0_code-studio.md b/docs/using-platform/15_dev-tools/0_code-studio/0_code-studio.md new file mode 100644 index 00000000..1078a991 --- /dev/null +++ b/docs/using-platform/15_dev-tools/0_code-studio/0_code-studio.md @@ -0,0 +1,19 @@ +--- +title: Code Studio +description: Code Studio introduction +sidebar_position: 0 +--- + +# Code Studio + +## Introduction + +The Code Studio is a web-based Visual Studio Code IDE. It offers a comprehensive toolset for building decentralized applications (dApps), including pre-configured extensions and a seamless GitHub integration. + +With the built-in SettleMint SDK Command Line Interface (CLI), you can easily use platform services directly from within the Code Studio, making it easier to build your dApp. + +### Types of Code Studio + +Currently, we offer the following types of Code Studio: + +- [Smart contract sets](./1_smart-contract-sets/1_smart-contract-sets.md) - Smart contract sets Code Studio is a powerful tool that simplifies the development of your smart contracts. It includes pre-built smart contract set templates for your chosen use case, which are easily customizable to match your needs. The IDE also includes compilation and migration scripts that drastically simplify deployment to the relevant blockchain. diff --git a/docs/using-platform/6_add_smart_contract_sets/0_smart_contracts.md b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/1_smart-contract-sets.md similarity index 69% rename from docs/using-platform/6_add_smart_contract_sets/0_smart_contracts.md rename to docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/1_smart-contract-sets.md index 6d58525b..3d451480 100644 --- a/docs/using-platform/6_add_smart_contract_sets/0_smart_contracts.md +++ b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/1_smart-contract-sets.md @@ -1,28 +1,43 @@ --- -title: Overview -description: Overview +title: Smart contract sets +description: Smart contract sets sidebar_position: 0 --- -# Deploying Smart Contracts +# Smart contract sets ## Introduction -To make developing smart contracts easier, we offer an open-source [template library](./1_smart_contract_templates.md) and an Integrated Development Environment (IDE). The template library includes pre-built smart contracts that you can customize to meet your specific needs. +To make developing smart contracts easier, we offer an open-source [template library](2_smart-contract-templates.md) which includes pre-built smart contracts which you can customize to meet your specific needs. -If you need a fundamental explanation of what smart contracts are and how they work, we recommend contacting our team to join our Learn World Blockchain course. Our experts will guide you through the basics, ensuring you have a solid foundation before diving into development. For a practical guide, please visit [deploying a contract](./3_deploying_a_contract.md). +If you need a fundamental explanation of what smart contracts are and how they work, we recommend contacting our team to join our Learn World Blockchain course. Our experts will guide you through the basics, ensuring you have a solid foundation before diving into development. For a practical guide, please visit [deploying a contract](4_deploying-a-contract.md). SettleMint's smart contract sets include both Hardhat and Foundry, enabling you to compile, test, and deploy using your preferred framework or a combination of both. This flexibility allows you to optimize your development process to best suit your project needs and preferences. +The programming languages for smart contracts differ depending on the protocol. For blockchain networks that are EVM (Ethereum Virtual Machine) compatible, and are listed below, the programming language used is Solidity. + +- [Hyperledger Besu Smart contract set](../../../../blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md) +- [Ethereum Smart contract set](../../../../blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md) +- [Avalanche Smart contract set](../../../../blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md) +- [Polygon Smart contract set](../../../../blockchain-guides/4_Polygon/5_polygon-integration-tools.md) + +For Hyperledger Fabric, the programming language used is TypeScript and Go. + +- [Hyperledger Fabric Smart contract set](../../../../blockchain-guides/5_Hyperledger-Fabric/6_hyperledger-fabric-integration-tools.md) + ## Overview of the Smart Contract Deployment Process on SettleMint The following is a high-level overview of smart contract development processes at SettleMint. -### 1. Deploying a Smart Contract Set +### 1. Adding a Smart Contract Set -- **Add Smart Contract Set**: Navigate to the smart contract sets page and press the button "Add Smart Contract Set." +- **Add dev tool**: Navigate to the application you want to create the smart contract set in, then to the dev tools page and press the button "Add dev tool". +- **Code studio**: Select the "Code studio" option as the type of dev tool. +- **Smart contract set**: Select the "Smart contract set" option as the type of Code studio. - **Picking Your Template**: Pick the template of your choice. +For detailed instructions, please see [add a smart contract set](3_add-smart-contract-set.md). + ### 2. Compiling and Configuring The Smart Contract - **Compiling**: Convert your smart contract code into a format that the blockchain can understand and execute. diff --git a/docs/using-platform/6_add_smart_contract_sets/1_smart_contract_templates.md b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/2_smart-contract-templates.md similarity index 87% rename from docs/using-platform/6_add_smart_contract_sets/1_smart_contract_templates.md rename to docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/2_smart-contract-templates.md index 15c181aa..d7054396 100644 --- a/docs/using-platform/6_add_smart_contract_sets/1_smart_contract_templates.md +++ b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/2_smart-contract-templates.md @@ -1,20 +1,17 @@ --- title: Templates -description: Rapid Deployment with Smart Contract Templates +description: Rapid deployment with smart contract templates sidebar_position: 1 --- SettleMint's smart contract templates serve as open-source, ready-to-use foundations for blockchain application development, significantly accelerating the deployment process. These templates enable users to quickly customize and extend their blockchain applications, leveraging tested and community-enhanced frameworks to reduce development time and accelerate market entry. -
-![Example banner](../../../static/img/smart-contract-sets/all-templates.png) -
- ### Open-Source Smart Contract Templates under the MIT License + Benefit from the expertise of the blockchain community and trust in the reliability of your smart contracts. These templates are vetted and used by major enterprises and institutions, ensuring enhanced security and confidence in your deployments. ### Create Your Own Smart Contract Templates for Your Consortium + Within the self-managed Blockchain Transformation Platform (BTP), you can create and add your own templates for use within your consortium. This fosters a collaborative environment where templates can be reused and built upon, promoting innovation and efficiency within your network. To get started, visit: [SettleMint GitHub Repository](https://github.com/settlemint/solidity-empty) - diff --git a/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/3_add-smart-contract-set.md b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/3_add-smart-contract-set.md new file mode 100644 index 00000000..1b11e1ae --- /dev/null +++ b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/3_add-smart-contract-set.md @@ -0,0 +1,56 @@ +--- +title: Add a Smart contract set +description: Add a Smart contract set +sidebar_position: 1 +--- + +# Add a Smart contract set + +By using smart contracts, you can add **business logic** to your application. + +Smart contracts are programs that run on the blockchain and define the rules of your use case. They are self-executing with an 'if this, then that' pattern and activate when predefined conditions are met, such as a smart contract that transfers the ownership of a car once a certain amount of money is transferred to the seller's account. + +## How to Add a Smart contract set + +Navigate to the **application** where you want to add the Smart contract set. + +Follow these steps to add the Smart contract set: + +1. Navigate to **Dev tools** and click on **Add a Dev tool**. + + ![Dev tools](../../../../../static/img/smart-contract-sets/empty-dev-tools.png) + +2. Select **Code Studio** as the Dev tool type. + + ![Select Code Studio](../../../../../static/img/smart-contract-sets/select-code-studio.png) + +3. Choose **Smart Contract Set** as the Dev tool type. + + ![Select Smart contract set](../../../../../static/img/smart-contract-sets/select-smart-contract-set.png) + +4. Choose a **template**. The Code studio will contain the smart contracts for your selected template. + + ![Select template](../../../../../static/img/smart-contract-sets/select-template.png) + +5. Click **Continue** to enter the name, user and deployment plan for your Smart contract set. + + ![Click Continue](../../../../../static/img/smart-contract-sets/click-continue.png) + +6. Enter a **Dev tool name** that will be easily recognizable in your dashboards, then choose the **Dev tool user**. The chosen user will be the only one with access to this Dev tool. + + ![Enter name and user](../../../../../static/img/smart-contract-sets/enter-name-user.png) + +7. Choose a **Deployment Plan**. Select the type, cloud provider, region, and resource pack. [More about deployment plans](/docs/launch-platform/managed-cloud-deployment/13_deployment-plans.md). +8. Review the resource cost for this smart contract set displayed at the bottom of the form. Click **Confirm** to add the Smart contract set. + + ![Confirm](../../../../../static/img/smart-contract-sets/confirm.png) + +You are now ready to use the Smart contract set, configure it to your needs and deploy smart contracts! + +For protocol-specific information, please refer to the relevant section in our blockchain guides: + +- [Hyperledger Besu Smart Contracts IDE](/docs/blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md) +- [Ethereum Smart Contracts IDE](/docs/blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md) +- [Avalanche Smart Contracts IDE](/docs/blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md) +- [Polygon Smart Contracts IDE](/docs/blockchain-guides/4_Polygon/5_polygon-integration-tools.md) +- [Hyperledger Fabric Smart Contracts IDE](/docs/blockchain-guides/5_Hyperledger-Fabric/6_hyperledger-fabric-integration-tools.md) diff --git a/docs/using-platform/6_add_smart_contract_sets/3_deploying_a_contract.md b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/4_deploying-a-contract.md similarity index 77% rename from docs/using-platform/6_add_smart_contract_sets/3_deploying_a_contract.md rename to docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/4_deploying-a-contract.md index 493fb9a6..9f7757fb 100644 --- a/docs/using-platform/6_add_smart_contract_sets/3_deploying_a_contract.md +++ b/docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/4_deploying-a-contract.md @@ -1,10 +1,10 @@ --- -title: Deploying a Smart Contract -description: Deploying a Smart Contract +title: Deploying a smart contract +description: Deploying a smart contract sidebar_position: 3 --- -# Deploying a Smart Contract +# Deploying a smart contract Deploying a smart contract in SettleMint won't be much different from doing so in your own environment. @@ -28,16 +28,16 @@ The typical folder structure of SettleMint's smart contract set will include: Follow these steps to deploy a contract using the Task Manager: 1. Click `View in Fullscreen Mode` for a better user experience :) - ![Fresh IDE](../../../static/img/deploy-scs/full-screen-mode.png) + ![Fresh IDE](../../../../../static/img/deploy-scs/full-screen-mode.png) 2. Navigate to the `Task Manager`. - ![Task Manager](../../../static/img/deploy-scs/nav-task-mg.png) + ![Task Manager](../../../../../static/img/deploy-scs/nav-task-mg.png) 3. Click `Foundry - Build` or `Hardhat - Build` to compile the Smart Contract. - ![Press Build](../../../static/img/deploy-scs/task-mg-build.png) + ![Press Build](../../../../../static/img/deploy-scs/task-mg-build.png) 4. Then run `Hardhat - Deploy to local network` to deploy locally or `Hardhat - Deploy to platform network` to deploy to your connected network. - ![Press Deploy](../../../static/img/deploy-scs/task-mg-deploy.png) + ![Press Deploy](../../../../../static/img/deploy-scs/task-mg-deploy.png) Great job! Your contract has been successfully deployed. @@ -46,12 +46,12 @@ Great job! Your contract has been successfully deployed. Follow these steps to deploy a contract using the terminal: 1. Open the terminal. - ![Open Terminal](../../../static/img/deploy-scs/open-terminal.png) + ![Open Terminal](../../../../../static/img/deploy-scs/open-terminal.png) 2. Run the command `forge build` or `Hardhat compile` to compile the smart contracts. - ![Build Terminal](../../../static/img/deploy-scs/terminal-build.png) + ![Build Terminal](../../../../../static/img/deploy-scs/terminal-build.png) 3. Then run `npx hardhat ignition deploy IGNITION_MODULE_PATH` or forge create --rpc-url YOUR_RPC_URL --private-key YOUR_PRIVATE_KEY --constructor-args ARG1 ARG2` to deploy to your connected network. - ![Deploy Terminal](../../../static/img/deploy-scs/terminal-deploy.png) + ![Deploy Terminal](../../../../../static/img/deploy-scs/terminal-deploy.png) Well done! You've successfully deployed your contract. diff --git a/docs/using-platform/15_dev-tools/15_dev-tools.md b/docs/using-platform/15_dev-tools/15_dev-tools.md new file mode 100644 index 00000000..e0fa41c9 --- /dev/null +++ b/docs/using-platform/15_dev-tools/15_dev-tools.md @@ -0,0 +1,19 @@ +--- +title: Dev Tools +description: Dev tools introduction +sidebar_position: 0 +--- + +# Dev Tools + +## Introduction + +To make development easier, we offer Development tools. These tools are designed to help you build your decentralized application (dApp) faster, whether it is smart contract, frontend or backend development. + +We offer the following tools: + +### Code studio + +The Code studio is an Integrated Development Environment (IDE). Currently, we offer the following types of Code studio: + +- [Smart contract sets](./0_code-studio/1_smart-contract-sets/1_smart-contract-sets.md) - This is an IDE you can launch with a pre-built smart contract template. You can choose a template from our open-source [template library](./0_code-studio/1_smart-contract-sets/2_smart-contract-templates.md). diff --git a/docs/using-platform/15_dev-tools/_category_.json b/docs/using-platform/15_dev-tools/_category_.json new file mode 100644 index 00000000..c07ecd9f --- /dev/null +++ b/docs/using-platform/15_dev-tools/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Dev Tools", + "position": 15 +} diff --git a/docs/using-platform/20_application-access-tokens.md b/docs/using-platform/16_application-access-tokens.md similarity index 100% rename from docs/using-platform/20_application-access-tokens.md rename to docs/using-platform/16_application-access-tokens.md diff --git a/docs/using-platform/21_personal-access-tokens.md b/docs/using-platform/17_personal-access-tokens.md similarity index 97% rename from docs/using-platform/21_personal-access-tokens.md rename to docs/using-platform/17_personal-access-tokens.md index 726e51dc..8e9c353b 100644 --- a/docs/using-platform/21_personal-access-tokens.md +++ b/docs/using-platform/17_personal-access-tokens.md @@ -1,6 +1,6 @@ # Personal access tokens -Personal access tokens (or [Application access tokens](20_application-access-tokens.md)) let you connect your SettleMint services with other apps securely. They represent an individual user, and have the same rights as the user's role in the organization (admin or user). They can be used to connect to all services that the user has access to. +Personal access tokens (or [Application access tokens](16_application-access-tokens.md)) let you connect your SettleMint services with other apps securely. They represent an individual user, and have the same rights as the user's role in the organization (admin or user). They can be used to connect to all services that the user has access to. ## Create a personal access token diff --git a/docs/using-platform/23_audit_logs.md b/docs/using-platform/18_audit_logs.md similarity index 100% rename from docs/using-platform/23_audit_logs.md rename to docs/using-platform/18_audit_logs.md diff --git a/docs/using-platform/15_resource-usage.md b/docs/using-platform/19_resource-usage.md similarity index 93% rename from docs/using-platform/15_resource-usage.md rename to docs/using-platform/19_resource-usage.md index 04cec237..2f373a87 100644 --- a/docs/using-platform/15_resource-usage.md +++ b/docs/using-platform/19_resource-usage.md @@ -1,7 +1,6 @@ --- -title: Monitoring Resource Usage -description: Guide to adding a Blockchain Node to a Network -sidebar_position: 15 +title: Resource Usage +description: Guide to monitoring resource usage --- # Resource usage diff --git a/docs/using-platform/1_add-a-network-to-an-application.md b/docs/using-platform/1_add-a-network-to-an-application.md index df1f51f9..34d15a7c 100644 --- a/docs/using-platform/1_add-a-network-to-an-application.md +++ b/docs/using-platform/1_add-a-network-to-an-application.md @@ -35,7 +35,7 @@ Joining a permissioned network: Joining a network with an invitation code: -- [How to join an existing network in SettleMint with an invitation code](./4_join-a-network-by-invitation.md). For more information on inviting network participants, see [how to invite network participants](./3_invite-network-participants.md). +- [How to join an existing network in SettleMint with an invitation code](./3_join-a-network-by-invitation.md). For more information on inviting network participants, see [how to invite network participants](./2_invite-network-participants.md). ## How to add a blockchain network @@ -54,7 +54,7 @@ Follow these steps to set up the blockchain network: :::info -Note that your network requires at least 1 validating node to be operational. We will deploy 1 validating node to your network initially. You can [add more nodes](2_add-a-node-to-a-network.md) later. +Note that your network requires at least 1 validating node to be operational. We will deploy 1 validating node to your network initially. You can [add more nodes](4_add-a-node-to-a-network.md) later. ::: @@ -66,7 +66,7 @@ The network is now added to the **blockchain network overview** with the status Navigate to the **Blockchain nodes** section of the application to see the **first node** that was deployed with the network. Click this node in the overview list to see detailed information, such as stats, usage metrics, connection info, logs, etc. Available node information varies depending on the protocol. -You can now start [adding more nodes](2_add-a-node-to-a-network.md). +You can now start [adding more nodes](4_add-a-node-to-a-network.md). ## Manage a network @@ -82,6 +82,6 @@ Click **Manage network** to see the available actions. You can only perform thes :::warning Warning -You can only delete a blockchain network when it has no more associated resources (e.g., nodes, smart contract sets, etc.). Resources must be deleted one by one first. +You can only delete a blockchain network when it has no more associated resources (e.g., nodes, middlewares, etc.). Resources must be deleted one by one first. ::: diff --git a/docs/using-platform/16_health-monitoring-tools.md b/docs/using-platform/20_health-monitoring-tools.md similarity index 97% rename from docs/using-platform/16_health-monitoring-tools.md rename to docs/using-platform/20_health-monitoring-tools.md index 1e5a1896..93f16e33 100644 --- a/docs/using-platform/16_health-monitoring-tools.md +++ b/docs/using-platform/20_health-monitoring-tools.md @@ -10,7 +10,7 @@ Go to the **service's overview page** or a **service detail page** to view the s ## Resource usage status & metrics -You can view the resources (memory, vCPU, and disk space) allocated to your services at any time, and follow up on the current usage. When the current resource usage is about to reach its limit, you will see a warning with the recommendation to scale your resource pack to keep the service running. [More info on resource usage](15_resource-usage.md) +You can view the resources (memory, vCPU, and disk space) allocated to your services at any time, and follow up on the current usage. When the current resource usage is about to reach its limit, you will see a warning with the recommendation to scale your resource pack to keep the service running. [More info on resource usage](19_resource-usage.md) Go to the **Resource tab** of a **service detail page** to view the resource usage status and metrics. diff --git a/docs/using-platform/22_deployment-plans.md b/docs/using-platform/21_deployment-plans.md similarity index 99% rename from docs/using-platform/22_deployment-plans.md rename to docs/using-platform/21_deployment-plans.md index f26df423..7bca7c51 100644 --- a/docs/using-platform/22_deployment-plans.md +++ b/docs/using-platform/21_deployment-plans.md @@ -1,7 +1,6 @@ --- title: Deployment Plans description: A list of the available Deployment Plans for SettleMint -sidebar_position: 2 --- # Deployment plans diff --git a/docs/using-platform/3_invite-network-participants.md b/docs/using-platform/2_invite-network-participants.md similarity index 100% rename from docs/using-platform/3_invite-network-participants.md rename to docs/using-platform/2_invite-network-participants.md diff --git a/docs/using-platform/4_join-a-network-by-invitation.md b/docs/using-platform/3_join-a-network-by-invitation.md similarity index 93% rename from docs/using-platform/4_join-a-network-by-invitation.md rename to docs/using-platform/3_join-a-network-by-invitation.md index 851294db..12874eb8 100644 --- a/docs/using-platform/4_join-a-network-by-invitation.md +++ b/docs/using-platform/3_join-a-network-by-invitation.md @@ -11,4 +11,4 @@ Follow these steps if you received an invitation to join a blockchain network: 5. Choose **Join by invitation code**, and then click **Continue**. 6. Enter the **invitation code** included in the email you received, and click **Confirm**. The network now appears in the overview. Click to see more details of the network. -You can now start [adding nodes to the network](2_add-a-node-to-a-network.md). +You can now start [adding nodes to the network](4_add-a-node-to-a-network.md). diff --git a/docs/using-platform/2_add-a-node-to-a-network.md b/docs/using-platform/4_add-a-node-to-a-network.md similarity index 96% rename from docs/using-platform/2_add-a-node-to-a-network.md rename to docs/using-platform/4_add-a-node-to-a-network.md index 52c16672..8ab4cbac 100644 --- a/docs/using-platform/2_add-a-node-to-a-network.md +++ b/docs/using-platform/4_add-a-node-to-a-network.md @@ -1,7 +1,6 @@ --- title: Add a Blockchain Node description: Guide to adding a Blockchain Node to a Network -sidebar_position: 3 --- # Add a node to a network @@ -57,6 +56,6 @@ Nodes do not autoscale. However, you can scale your deployment if you notice tha :::warning Warning -You can only delete a blockchain node when it has no more resources (e.g. smart contract sets) related to it. Resources first have to be deleted one by one. +You can only delete a blockchain node when it has no more resources (e.g. middleware) related to it. Resources first have to be deleted one by one. ::: diff --git a/docs/using-platform/3_add-a-load-balancer.md b/docs/using-platform/6_add-a-load-balancer.md similarity index 99% rename from docs/using-platform/3_add-a-load-balancer.md rename to docs/using-platform/6_add-a-load-balancer.md index f360e5e6..92a80d56 100644 --- a/docs/using-platform/3_add-a-load-balancer.md +++ b/docs/using-platform/6_add-a-load-balancer.md @@ -1,7 +1,6 @@ --- title: Add a Load Balancer description: Guide to adding a Load Balancer to a Blockchain Network -sidebar_position: 4 --- # Add a Load Balancer diff --git a/docs/using-platform/6_add_smart_contract_sets/2_create_smart_contract_set.md b/docs/using-platform/6_add_smart_contract_sets/2_create_smart_contract_set.md deleted file mode 100644 index 4c5f9c91..00000000 --- a/docs/using-platform/6_add_smart_contract_sets/2_create_smart_contract_set.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Add a Smart Contract Set -description: Add a Smart Contract Set -sidebar_position: 1 ---- - -# Add a Smart Contract Set - -By using smart contract sets, you can add **business logic** to your application. - -Smart contract sets are programs that run on the blockchain and define the rules of your use case. They are self-executing with an 'if this, then that' pattern and activate when predefined conditions are met, such as a smart contract that transfers the ownership of a car once a certain amount of money is transferred to the seller's account. - -To expedite the process of writing and deploying smart contracts, we offer a [template library](./1_smart_contract_templates.md) and an Integrated Development Environment (IDE). The template library includes pre-built smart contract sets for specific use cases, which are easily customizable to match your needs. - -## How to Add a Smart Contract Set - -Navigate to the **application** where you want to add the smart contract set. Ensure you have a network with a node in place. - -Click **Smart Contract Sets** in the left navigation, and then click **Add a Smart Contract Set**. This opens a form. - -Follow these steps to add the smart contract set: - -1. Navigate to **Smart Contract Sets** and press **Add a Smart Contract Set**. - ![Smart contract sets](../../../static/img/smart-contract-sets/add-set.png) -2. Select which of your **blockchain nodes** the smart contract set needs to be deployed to, and click **Continue**. - ![Select node](../../../static/img/smart-contract-sets/select-node.png) -3. Choose a **template**. The IDE instance will contain a set of pre-built smart contract templates for your selected use case. - ![Select template](../../../static/img/smart-contract-sets/select-a-template.png) -4. Choose a **Smart Contract Set Name** that will be easily recognizable in your dashboards, then select the **IDE User**. - The IDE that comes with the smart contract set is a single-user application. This user can be you or another member of your organization. - ![Select template](../../../static/img/smart-contract-sets/set-name.png) -5. Choose a **Deployment Plan**. Select the type, cloud provider, region, and resource pack. [More about deployment plans](/docs/launch-platform/managed-cloud-deployment/13_deployment-plans.md). - ![Select template](../../../static/img/smart-contract-sets/cloud-provider.png) -6. Review the resource cost for this smart contract set displayed at the bottom of the form. Click **Confirm** to add the smart contract set. - -You are now ready to use the IDE to configure the smart contract set to your needs and deploy it. You will see your deployed smart contracts in the **Details tab**. - -For protocol-specific information, please refer to the relevant section in our blockchain guides: - -- [Hyperledger Besu Smart Contracts IDE](/docs/blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md) -- [Ethereum Smart Contracts IDE](/docs/blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md) -- [Avalanche Smart Contracts IDE](/docs/blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md) -- [Polygon Smart Contracts IDE](/docs/blockchain-guides/4_Polygon/5_polygon-integration-tools.md) -- [Hyperledger Fabric Smart Contracts IDE](/docs/blockchain-guides/5_Hyperledger-Fabric/6_hyperledger-fabric-integration-tools.md) diff --git a/docs/using-platform/6_add_smart_contract_sets/_category_.json b/docs/using-platform/6_add_smart_contract_sets/_category_.json deleted file mode 100644 index e81b8ef7..00000000 --- a/docs/using-platform/6_add_smart_contract_sets/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Smart Contract Sets", - "position": 3 -} diff --git a/docs/using-platform/7_integrated-development-environment.md b/docs/using-platform/7_integrated-development-environment.md deleted file mode 100644 index ad1f9f1f..00000000 --- a/docs/using-platform/7_integrated-development-environment.md +++ /dev/null @@ -1,13 +0,0 @@ -# Integrated Development Environment - -The SettleMint Integrated Development Environment (IDE) is a powerful tool that simplifies the development of your smart contracts. It includes pre-built smart contract set templates for a certain use case, which are easily customizable to match your specific use case. The IDE also includes compilation and migration scripts that drastically simplify deployment to the relevant blockchain. - -When you [add a smart contract set](./6_add_smart_contract_sets/0_smart_contracts.md), you get an instance of the IDE that is configured to the blockchain and smart contract set templates of your choice. Go to the **IDE tab** on the **Smart contract sets details page** to access it. - -The IDE programming languages for smart contracts differ depending on the protocol. For blockchain networks that are EVM (Ethereum Virtual Machine) compatible, and are listed below, the programming language used is Solidity. - -- [Hyperledger Besu smart contracts IDE](../blockchain-guides/1_Hyperledger-Besu/6_enterprise-ethereum-integration-tools.md) -- [Ethereum smart contracts IDE](../blockchain-guides/0_Ethereum/5_ethereum-integration-tools.md) -- [Avalanche smart contracts IDE](../blockchain-guides/2_Avalanche/5_avalanche-integration-tools.md) -- [Polygon smart contracts IDE](../blockchain-guides/4_Polygon/5_polygon-integration-tools.md) -- [Hyperledger Fabric smart contracts IDE](../blockchain-guides/5_Hyperledger-Fabric/6_hyperledger-fabric-integration-tools.md) diff --git a/docs/using-platform/11_middleware.md b/docs/using-platform/7_middleware.md similarity index 77% rename from docs/using-platform/11_middleware.md rename to docs/using-platform/7_middleware.md index 3cadf6ee..cff5cc91 100644 --- a/docs/using-platform/11_middleware.md +++ b/docs/using-platform/7_middleware.md @@ -275,3 +275,139 @@ When setting up a new middleware, you'll need to adjust the Attestation Indexer The Attestation Indexer's GraphQL API provides the capability to execute intricate queries on attestations. It allows for filtering based on attributes such as type, issuer, and subject, enabling the retrieval of specific attestations or sets of attestations that satisfy particular conditions. ![GraphQL](../../static/img/using-the-platform/eas-graphql.png) + +## Firefly FabConnect + +Firefly FabConnect is an open-source middleware that lets you interact with your Fabric network and the chaincode deployed on it. When you add the FabConnect middleware to your application on the SettleMint Platform, you automatically deploy a RESTful API to: + +- Manage identities on your network. +- Send transactions to your chaincode. +- Check any transaction receipt. +- Create event streams and subscriptions. + +:::warning Warning + +Before you start, make sure you are running: + +- A Fabric Network. +- A Fabric smart contract set. + +::: + +## Manage Identities + +Identities on a Fabric network are managed in two steps. First, a CA admin must register users. This is a process in which the CA admin gives an ID and secret to an identity. Then, the user of the identity enrolls the ID and secret pair to get a public/private key pair to sign transactions. + +Registering an identity can be done as follows using Firefly FabConnect: + +```shell +curl --request POST \ + --url https://fireflyfab-7853.gke-europe.settlemint.com/identities \ + --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ + --header 'Content-Type: application/json' \ + --data '{ + "type": "client", + "name": "user3", + "attributes": {} +}' +``` + +This request returns the secret associated with name user3: + +```shell + +{ +"name": "user3", +"secret": "fkrTKPOZZYWO" +} + +``` + +The end user of that identity can enroll it as follows: + +```shell + +curl --request POST \ + --url \ + --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ + --header 'Content-Type: application/json' \ + --data '{ +"secret": "fkrTKPOZZYWO" +"attributes": {} +}' + +``` + +## Sending Transactions + +Assuming that you have a [chaincode deployed](../blockchain-guides/5_Hyperledger-Fabric/6_hyperledger-fabric-integration-tools.md) on your network, you can send a transaction through the middleware: + +```shell + +curl --request POST \ + --url \ + --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ + --header 'Content-Type: application/json' --data '{ +"headers": { +"type": "SendTransaction", +"signer": "user3", +"channel": "default-channel", +"chaincode": "assetTransfer" +}, +"func": "CreateAsset", +"args": [ +"asset01", "blue", "5", "Alice", "500" +], +"init": false, "fly-sync": true +}' + +``` + +This transaction creates an asset in the assetTransfer chaincode deployed on the Fabric network. + +## Create Event Streams + +Firefly FabConnect can also be used to stream events happening on your network. You can either use webhook or websocket to deliver the data. + +This request create a stream using webhooks: + +```shell + +curl --request POST \ + --url \ + --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ + --header 'Content-Type: application/json' \ + --data '{ +"type": "webhook", +"name": "AssetTransfer", +"webhook": { +"url": "", +"tlsSkipVerifyHost": "true" +} +}' + +``` + +The response contains an event stream ID that is required to create a subscription: + +```shell + +curl --request POST \ + --url \ + --header 'Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYW1icm9pc2UiLCJlbWFpbCI6ImFtYnJvaXNlQHNldHRsZW1pbnQuY29tIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20v…' \ + --header 'Content-Type: application/json' \ + --data '{ +"payloadType": "string", +"name": "mySubscription", +"channel": "default-channel", +"signer": "user3", +"fromBlock": "0", +"stream": "es-92183185-01e3-4bc9-5433-348a640f5fe1", +"filter": { +"blockType": "tx", +"chaincodeId": "", +"eventFilter": "" +} +}' + +``` diff --git a/docs/using-platform/9_integration-studio.md b/docs/using-platform/8_integration-studio.md similarity index 98% rename from docs/using-platform/9_integration-studio.md rename to docs/using-platform/8_integration-studio.md index 3db74de1..fa972a74 100644 --- a/docs/using-platform/9_integration-studio.md +++ b/docs/using-platform/8_integration-studio.md @@ -45,7 +45,7 @@ Double-click any of the nodes to see the code they are running. This code is wri Before we show you how to set up your own flow, we recommend reading this [article by Node-RED on creating your first flow](https://nodered.org/docs/tutorials/first-flow). -Now let's set up an example flow together and build an endpoint to get the latest block number of the Polygon Mumbai Testnet using the Integration Studio. If you do not have a Polygon Mumbai Node, you can easily [deploy a node](2_add-a-node-to-a-network.md) first. +Now let's set up an example flow together and build an endpoint to get the latest block number of the Polygon Mumbai Testnet using the Integration Studio. If you do not have a Polygon Mumbai Node, you can easily [deploy a node](4_add-a-node-to-a-network.md) first. #### Step 1 @@ -61,7 +61,7 @@ Drag and drop a **function node**. This is the node that will query the blockcha `rpcEndpoint` is the RPC url of your Polygon Mumbai Node. Under the **Connect tab** of your Polygon Mumbai node, you will find its RPC url. -`accessToken` - You will need an access token for your application. If you do not have one, you can easily [create an access token](20_application-access-tokens.md) first. +`accessToken` - You will need an access token for your application. If you do not have one, you can easily [create an access token](16_application-access-tokens.md) first. Enter the following snippet in the Message tab. diff --git a/docs/using-platform/10_backend-as-a-service.md b/docs/using-platform/9_hasura-backend-as-a-service.md similarity index 97% rename from docs/using-platform/10_backend-as-a-service.md rename to docs/using-platform/9_hasura-backend-as-a-service.md index 811d39b6..b67022cd 100644 --- a/docs/using-platform/10_backend-as-a-service.md +++ b/docs/using-platform/9_hasura-backend-as-a-service.md @@ -1,4 +1,4 @@ -# Backend-as-a-service +# Hasura - Backend-as-a-service Many dApps need more than just decentralised tools to build an end-to-end solution. Maybe you need to save KYC information, or store metadata related to NFT's or other smart contracts you do not want to put on IPFS. This is where the backend-as-a-service solution comes in, based on [Hasura](https://hasura.io/docs/latest/graphql/core/index.html). @@ -37,7 +37,7 @@ If you need to execute tasks based on changes to your database you can leverage **Access to your database** can be handled all the way to the row level by using the authentication and authorisation options available in Hasura. [Learn more here.](https://hasura.io/docs/latest/graphql/core/auth/index.html) -This is of course on top of the [application access tokens](20_application-access-tokens.md) and [personal access tokens](21_personal-access-tokens.md) in the platform you can use to close off access to the entire API. +This is of course on top of the [application access tokens](16_application-access-tokens.md) and [personal access tokens](17_personal-access-tokens.md) in the platform you can use to close off access to the entire API. ## Backups diff --git a/docs/using-platform/_category_.json b/docs/using-platform/_category_.json index bc51cfb9..7a059946 100644 --- a/docs/using-platform/_category_.json +++ b/docs/using-platform/_category_.json @@ -1,4 +1,4 @@ { - "label": "Building With SettleMint", + "label": "Building with SettleMint", "position": 3 } diff --git a/releases/2025-01-08-dev-tools.md b/releases/2025-01-08-dev-tools.md new file mode 100644 index 00000000..bf89c157 --- /dev/null +++ b/releases/2025-01-08-dev-tools.md @@ -0,0 +1,25 @@ +# Introducing Dev Tools + +![Changelog Image](../static/img/releases/dev-tools.png) + +We've made some exciting changes to improve your development experience: + +**What's New** + +- We've introduced a new **Dev Tools** section that will host various services aimed at making the development of decentralized applications easier +- The first tool we're launching is **Code Studio** - our Integrated Development Environment (IDE) based on Visual Studio Code +- Smart contract sets are now available as the first type of Code Studio +- For more information on Dev Tools, please refer to the [Dev Tools documentation](/docs/using-platform/dev-tools/) + +**What's Changed** + +- The "Smart contract sets" service has moved into Dev Tools +- Don't worry - all the same great features of Smart contract sets are still there, just in a new home! + +**Coming Soon** + +Stay tuned for more types of Code Studios that will make building decentralized applications even easier! + +--- + +**Note**: All existing Smart contract sets functionality remains unchanged - we've just reorganized things to make room for more developer tools. diff --git a/src/css/custom.css b/src/css/custom.css index 9a1e0c77..f08ead12 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -72,7 +72,6 @@ nav.navbar { } [data-theme='dark'] button { - background-color: #346eee; color: #ffff; } diff --git a/static/img/releases/dev-tools.png b/static/img/releases/dev-tools.png new file mode 100644 index 00000000..707b09cc Binary files /dev/null and b/static/img/releases/dev-tools.png differ diff --git a/static/img/smart-contract-sets/add-set.png b/static/img/smart-contract-sets/add-set.png deleted file mode 100644 index 06f2f73b..00000000 Binary files a/static/img/smart-contract-sets/add-set.png and /dev/null differ diff --git a/static/img/smart-contract-sets/all-templates.png b/static/img/smart-contract-sets/all-templates.png deleted file mode 100644 index 0d161d27..00000000 Binary files a/static/img/smart-contract-sets/all-templates.png and /dev/null differ diff --git a/static/img/smart-contract-sets/click-continue.png b/static/img/smart-contract-sets/click-continue.png new file mode 100644 index 00000000..e0e7e353 Binary files /dev/null and b/static/img/smart-contract-sets/click-continue.png differ diff --git a/static/img/smart-contract-sets/cloud-provider.png b/static/img/smart-contract-sets/cloud-provider.png deleted file mode 100644 index cc5eb066..00000000 Binary files a/static/img/smart-contract-sets/cloud-provider.png and /dev/null differ diff --git a/static/img/smart-contract-sets/confirm.png b/static/img/smart-contract-sets/confirm.png new file mode 100644 index 00000000..8f6d364a Binary files /dev/null and b/static/img/smart-contract-sets/confirm.png differ diff --git a/static/img/smart-contract-sets/empty-dev-tools.png b/static/img/smart-contract-sets/empty-dev-tools.png new file mode 100644 index 00000000..6169f01d Binary files /dev/null and b/static/img/smart-contract-sets/empty-dev-tools.png differ diff --git a/static/img/smart-contract-sets/enter-name-user.png b/static/img/smart-contract-sets/enter-name-user.png new file mode 100644 index 00000000..bb8a15ee Binary files /dev/null and b/static/img/smart-contract-sets/enter-name-user.png differ diff --git a/static/img/smart-contract-sets/select-a-template.png b/static/img/smart-contract-sets/select-a-template.png deleted file mode 100644 index 85bec680..00000000 Binary files a/static/img/smart-contract-sets/select-a-template.png and /dev/null differ diff --git a/static/img/smart-contract-sets/select-code-studio.png b/static/img/smart-contract-sets/select-code-studio.png new file mode 100644 index 00000000..0a0d2f40 Binary files /dev/null and b/static/img/smart-contract-sets/select-code-studio.png differ diff --git a/static/img/smart-contract-sets/select-node.png b/static/img/smart-contract-sets/select-node.png deleted file mode 100644 index b21a2ea6..00000000 Binary files a/static/img/smart-contract-sets/select-node.png and /dev/null differ diff --git a/static/img/smart-contract-sets/select-smart-contract-set.png b/static/img/smart-contract-sets/select-smart-contract-set.png new file mode 100644 index 00000000..c2ff3e62 Binary files /dev/null and b/static/img/smart-contract-sets/select-smart-contract-set.png differ diff --git a/static/img/smart-contract-sets/select-template.png b/static/img/smart-contract-sets/select-template.png new file mode 100644 index 00000000..4159bf0d Binary files /dev/null and b/static/img/smart-contract-sets/select-template.png differ diff --git a/static/img/smart-contract-sets/set-name.png b/static/img/smart-contract-sets/set-name.png deleted file mode 100644 index d2fbff21..00000000 Binary files a/static/img/smart-contract-sets/set-name.png and /dev/null differ