Skip to content

Commit 3806703

Browse files
committed
feat: rename mor eint he blockchain guides section
1 parent 942a0f3 commit 3806703

File tree

111 files changed

+429
-655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+429
-655
lines changed

content/docs/blockchain-guides/arbitrum/connect-to-a-node.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: "Arbitrum Connect To A Node"
2+
title: "Connect to a node"
33
---
44

5-
# Connect to a node
6-
75
For a software application to interact with a blockchain (e.g. by sending transactions/data to the network, or even just by reading data), it must connect to a node. This section describes how to connect to your Arbitrum node.
86

97
## Backend APIs
@@ -32,7 +30,7 @@ If you want to connect to a node deployed on the SettleMint platform, go to the
3230

3331
### JSON-WS
3432

35-
To make RPC requests over WebSockets, you can use wscat, which is by definition a Node.js based command-line tool. First you will need to connect to your nodes WebSocket server using wscat, as follows: `wscat -c ws://<JSON-RPC-ws-endpoint:port>`. All the credentials are provided in the **Connect** tab on the **Node detail page** in the **Blockchain nodes** section of your application. After you have established a connection, the terminal should display a '>' prompt. You will then be able to send individual requests as a JSON data package, as above, for instance:
33+
To make RPC requests over WebSockets, you can use wscat, which is by definition a Node.js based command-line tool. First you will need to connect to your node's WebSocket server using wscat, as follows: `wscat -c ws://<JSON-RPC-ws-endpoint:port>`. All the credentials are provided in the **Connect** tab on the **Node detail page** in the **Blockchain nodes** section of your application. After you have established a connection, the terminal should display a '>' prompt. You will then be able to send individual requests as a JSON data package, as above, for instance:
3634

3735
```json
3836
{
@@ -46,11 +44,11 @@ To make RPC requests over WebSockets, you can use wscat, which is by definition
4644

4745
### GraphQL
4846

49-
GraphQL is a query language and server-side runtime for APIs. It is designed to make APIs fast, flexible, and developer-friendly.
47+
GraphQL is a query language and server-side runtime for API's. It is designed to make APIs fast, flexible, and developer-friendly.
5048
We have a GraphQL interface that can be used with many different queries. These queries can be tested out in our GraphQL playground. You can also test out the different graphql queries with cURL, those request would look like this:
5149

5250
```bash
53-
curl -X POST -H "Content-Type: application/json" -H x-auth-token: <AUTH_TOKEN> --data
51+
curl -X POST -H "Content-Type: application/json" -H "x-auth-token: <AUTH_TOKEN>" --data
5452
'{ "query": "{syncing{startingBlock currentBlock highestBlock}}"}' http://<DOMAIN>.settlemint.com/graphql
5553
```
5654

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: "Arbitrum Integration Tools"
2+
title: "Integration tools"
33
---
44

5-
# Smart Contract Sets
6-
75
You can launch a Smart Contract Set to significantly accelerate the development of your smart contracts.
86

97
[Learn here how to use Smart Contract Sets to deploy your smart contracts](../../using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/1_smart-contract-sets.md).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Arbitrum",
3-
"pages": ["the-basics", "node-types", "connect-to-a-node", "network-stats", "integration-tools"]
3+
"pages": ["the-basics", "node-types", "connect-to-a-node", "network-stats", "integration-tools", "template-library"]
44
}

content/docs/blockchain-guides/arbitrum/network-stats.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: "Arbitrum Network Stats"
2+
title: "Network stats"
33
---
44

5-
# Network stats
6-
75
The dashboard gives you an overview of the following stats for the network:
86

97
## Best block
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: "Arbitrum Node Types"
2+
title: "Node types"
33
---
44

5-
# Node types
6-
75
All nodes running in SettleMint are configured to be **archive nodes**, meaning they all include all previous states of a given blockchain since its origin.
86

97
[Learn here how to interact with your Arbitrum node.](3_arbitrum-connect-to-a-node.md)

content/docs/blockchain-guides/arbitrum/template-library/arbitrum-erc-20.md renamed to content/docs/blockchain-guides/arbitrum/template-library/erc-20.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: "Arbitrum Erc 20"
2+
title: "ERC-20 token"
33
---
44

5-
# ERC-20 token
6-
75
ERC-20 tokens are blockchain-based assets, issued on all EVM compatible blockchain networks such as Arbitrum, that have value and can be sent and received. These tokens are fungible, meaning they can be exchanged with another token of the same type because they have identical properties and there is an equal value. For example, the ERC-20 token of Alice is exactly the same as the ERC-20 token of Bob. They can exchange their token without consequences.
86

97
Examples of fungible assets are currencies, stocks of a company, bonds, gold and other precious metals.
@@ -21,19 +19,20 @@ The ERC-20 smart contract on the SettleMint platform has the following features:
2119
- Pausable capabilities that let the admin pause the contract in case of emergency.
2220
- Burnable capabilities that let users burn (i.e destroy) their token.
2321

24-
By default, the account that deploys the ERC-20 smart contract gets 1,000,000 tokens. You can change this behaviour by modifying the **constructor** in **GenericToken.sol**. If you do not mint tokens in the constructor, make sure to mint some after the deployment.
22+
By default, the account that deploys the ERC-20 smart contract gets 1,000,000 tokens. You can change this behaviour by modifying the **"constructor"** in **"GenericToken.sol"**. If you do not mint tokens in the constructor, make sure to mint some after the deployment.
2523

2624
```solidity
2725
contract GenericToken is ERC20, ERC20Burnable, Pausable, AccessControl {
2826
constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {
2927
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
3028
_mint(msg.sender, 1000000 * 10**decimals());
3129
}
30+
}
3231
```
3332

3433
## Deploying an ERC-20 smart contract
3534

36-
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.
35+
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.
3736

3837
```typescript
3938
await deploy('GenericToken', {
@@ -43,9 +42,9 @@ await deploy('GenericToken', {
4342
});
4443
```
4544

46-
As soon as you are happy with the changes you made, just click on **deploy** in the **task runner** of the IDE and after a few seconds, your ERC-20 smart contract should be deployed on the network of your choice.
45+
As soon as you are happy with the changes you made, just click on **"deploy"** in the **"task runner"** of the IDE and after a few seconds, your ERC-20 smart contract should be deployed on the network of your choice.
4746

48-
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.
47+
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.
4948

5049
## ERC-20 with meta transactions
5150

@@ -73,7 +72,7 @@ function _msgData() internal view override(Context, ERC2771Context) returns (byt
7372
7473
```
7574

76-
Lets unpack this:
75+
Let's unpack this:
7776

7877
1. We pass in the constructor an Ethereum address, the `trustedForwarder`, to the `ERC2771Context` constructor. This enables the smart contract to accept transactions coming from the `Trusted Forwarder`.
7978
2. `_msgSender()` function is kind of an alias for `msg.sender`. When called it returns `msg.sender` for regular transactions, but for meta transactions it returns the end user (rather than the `relayer` or the `trusted forwarder`).
@@ -194,7 +193,7 @@ Validation refers to ensuring that the buyers meet certain conditions before the
194193

195194
Our templateset provides KYC / AML whitelisting capabilities out of the box. The buyers must be whitelisted before they can purchase tokens.
196195

197-
This is implemented using openzepellins `AccessControl`. The address with the `DEFAULT_ADMIN_ROLE` grants `WHITELISTED_ROLE` to buyers before they can purchase tokens.
196+
This is implemented using openzepellin's `AccessControl`. The address with the `DEFAULT_ADMIN_ROLE` grants `WHITELISTED_ROLE` to buyers before they can purchase tokens.
198197

199198
#### Purchase of tokens
200199

@@ -215,11 +214,11 @@ This can be done immediately after the tokens have been purchased or a certain a
215214

216215
To transfer the tokens immediately, set the `_vestingEndDate` field on the `CrowdSale` contract to `0` while deploying the contract.
217216

218-
When the vesting end date is not set, the tokens purchased get transferred immediately to the beneficiarys address.
217+
When the vesting end date is not set, the tokens purchased get transferred immediately to the beneficiary's address.
219218

220219
Transfering the tokens a certain amount of time after the purchase is achieved using two pieces:
221220
Setting the `_vestingEndDate` on the contract to the timestamp at the end of the vesting period
222-
Deploying a `VestingVault` contract and initializing `_vestingVault` field on the `CrowdSale` contract to its address
221+
Deploying a `VestingVault` contract and initializing `_vestingVault` field on the `CrowdSale` contract to it's address
223222

224223
The beneficiary in this case is the `VestingVault` contract. All the tokens purchased by buyers get stored in the `VestingVault` contract.
225224

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: "ERC-721 token"
3+
---
4+
5+
ERC-721 tokens are blockchain-based assets, issued on issued on all EVM compatible blockchain networks such as Arbitrum, that have value and can be sent and received. Contrary to the ERC-20 tokens, these ERC-721 tokens are non- fungible, meaning that two tokens from the same smart contract are not equivalent.
6+
7+
Non-fungible tokens, or NFTs, are digitally unique, no two NFTs are the same. For example, if Alice and Bob exchange their NFTs, one of them might feel unlucky as their new token is worth less than their previous ones. NFTs give the ability to assign or claim ownership of any unique piece of digital data, trackable on the blockchain. It can be created from digital objects, as a representation of digital or non-digital assets.
8+
9+
Examples of what an NFT can represent are real estate properties, collectibles, event tickets, music videos, and artwork.
10+
11+
The SettleMint platform comes with three ERC-721 contract sets.
12+
13+
- The first one, simply called **ERC-721 Token**, has all the functionalities to create the token, but it has no specific asset attached to it. It is up to you to create one. The optimised **ERC-721a Token** provides significant gas savings for minting multiple NFTs in a single transaction.
14+
- The second set, called **ERC-721 trading cards**, show you how you can create trading cards with different scarcities.
15+
- Finally, the third set, called **ERC-721 Generative Art**, demonstrates how you can automatically create images by combining several layers of assets. This is the process that was used to create famous NFT collections such as the Bored Ape Yacht Club or the Cryptopunks.
16+
17+
The trading cards and the generative art sets are extensions of the ERC-721 Token set. The specific features related to these two sets are presented in their respective sections.
18+
19+
## ERC-721 smart contract features
20+
21+
An ERC-721 smart contract is used to create non-fungible tokens and bring them to the blockchain.
22+
23+
The process of creating an ERC-721 has a few distinct phases. The smart contract sets define one such a process which is what we describe below. This is by no means the only way to run your ERC-721 project, if you plan not to follow the playbook below, you can use it to setup your own flow easily.
24+
25+
### Phase 0: Image generation
26+
27+
#### Generative Art
28+
29+
The image generation code for the generative art set is based on the [Hashlips Art Engine](https://github.com/HashLips/hashlips_art_engine), please check out the
30+
README file in the `art_engine` folder on the usage instructions.
31+
32+
In short, replace the images in the `art_engine/layers` folder, change the settings in the `art_engine/src/config.js` file, and run `yarn artengine:build` to generate your images. Rinse and repeat until you are happy with the result. Note that the generated images are randomized
33+
to prevent streaks of similar images, this can be configured in the `art_engine/src/config.js` file.
34+
35+
If you want to use the engine to generate a preview image run `yarn artengine:preview` for a static image and `yarn artengine:preview_gif` for a gif.
36+
37+
Using `yarn artengine:rarity` you can check the rarity of each generated image.
38+
39+
If you want to pixelate your images, use `yarn artengine:pixelate`, the settings are again in the `art_engine/src/config.js` file.
40+
41+
Not that the generated metadata does not have a real base uri set, after we have uploaded everything to IPFS, we can set it in the `art_engine/src/config.js` file and update all the metadata using `yarn artengine:update_info`.
42+
43+
The end result looks like this:
44+
![thumbzup_419.png](../../../../img/document360/Images/thumbzup_419.png)
45+
46+
```json
47+
{
48+
"name": "thumbzup #419",
49+
"image": "ipfs://bafybeihroeexeljv5yoyum2x4jz6riuqp6xwg6y7cg7jaumcdpyrjxg5zi",
50+
"attributes": [
51+
{
52+
"trait_type": "background",
53+
"value": "yellow"
54+
},
55+
{
56+
"trait_type": "body",
57+
"value": "thumb"
58+
},
59+
{
60+
"trait_type": "face",
61+
"value": "happy"
62+
},
63+
{
64+
"trait_type": "hair",
65+
"value": "long brown hair"
66+
},
67+
{
68+
"trait_type": "accessories",
69+
"value": "sunglasses"
70+
}
71+
]
72+
}
73+
```
74+
75+
#### Trading Cards
76+
77+
The image generation code for Trading Cards is based on the a Hardhat task found in the `tasks` folder. This task is written especially for the
78+
cards for this example project, but it should be fairly simple to adapt it to your needs.
79+
80+
In short, replace the images in the `assets/layers`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Template Library",
3-
"pages": ["arbitrum-erc-20", "arbitrum-erc-721", "arbitrum-state-machine"]
3+
"pages": ["erc-20", "erc-721", "state-machine"]
44
}

content/docs/blockchain-guides/polygon/template-library/polygon-state-machine.md renamed to content/docs/blockchain-guides/arbitrum/template-library/state-machine.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: "Polygon State Machine"
2+
title: "State machine"
33
---
44

5-
# State Machine
6-
75
This smart contract set implements a state machine. State machines are usually used to represent a system where an entity goes through several sequential states.
86

97
Each state has different functions and different roles associated with it. You can call certain functions only if the state you are in is associated with that function. The different roles associated with a state are the roles who are allowed to perform transition to the next state from the given state.

content/docs/blockchain-guides/arbitrum/the-basics.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
2-
title: "Arbitrum The Basics"
2+
title: "The basics"
33
---
44

5-
# The basics
6-
75
Arbitrum was launched in August 2021 by Offchain Labs, and has its own cryptocurrency since March 2023 called ARB. It is a layer 2 scaling solution for Ethereum that focusses on security, scalability and compatibility. Arbitrum uses optimistic rollup technology to process transactions off-chain, which allows it to offer significantly faster transaction speeds and lower fees than Ethereum mainnet. It uses AVM (Arbitrum Virtual Machine) which is a custom virtual machine that was created for the Arbitrum Layer 2 scaling solution. The AVM is designed to be fully compatible with the Ethereum Virtual Machine (EVM), but it also includes a number of optimizations that make it more efficient and scalable. In addition to scalability and compatibility, Arbitrum is also focused on decentralization. The Arbitrum network is secured by a decentralized network of validators, and it is governed by a DAO (decentralized autonomous organization). This ensures that Arbitrum is not controlled by any single entity.
86

97
## Mainnet and Testnet
108

11-
SettleMint supports, the **Arbitrum One Mainnet** and the **Arbitrum Goerli Testnet** .
9+
SettleMint supports, the **Arbitrum One Mainnet** and the **Arbitrum Testnet** .
1210

1311
The Mainnet is the primary public Arbitrum production blockchain, where actual-value transactions take place. Each transaction requires payment of a transaction fee, payable in the native coin ARB. The Testnet is an instance of the blockchain to be used for testing and experimentation. There are also coins used in the Testnet but they have no value, so there is no risk of real fund.
1412

0 commit comments

Comments
 (0)