Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/solidity-by-example/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"position": 0,
"label": "Solidity by example",
"link": {
"title": "Solidity by example",
"slug": "solidity-by-example",
"type": "generated-index"
}
}
9 changes: 9 additions & 0 deletions src/solidity-by-example/application/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"position": 2,
"label": "Application",
"link": {
"title": "Application",
"slug": "application",
"type": "generated-index"
}
}
8 changes: 8 additions & 0 deletions src/solidity-by-example/basic/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"position": 0,
"label": "Basic",
"link": {
"slug": "solidity-by-example/basic",
"type": "generated-index"
}
}
47 changes: 47 additions & 0 deletions src/solidity-by-example/basic/first-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 2
title: First Application
description: Specifies the compiler version of Solidity
---

Here is a simple contract that you can get, increment and decrement the count store in this contract.

```solidity
// SPDX-License-Identifier: MIT
pragma ever-solidity ^0.70.0;

contract Counter {
uint public count;

// Function to increment count by 1
function inc() public {
// This action is required to process external messages that bring no value
tvm.accept();
count += 1;
}

// Function to decrement count by 1
function dec() public {
// This action is required to process external messages that bring no value
tvm.accept();
// This function will fail if count = 0
count -= 1;
}
}
```

## Deploying the contract

```shell
npx everdev sol compile first-app.sol
npx everdev contract deploy first-app -v 100000000
```

## Interacting with the contract

```shell
npx everdev contract run first-app inc
npx everdev contract run-local first-app count
npx everdev contract run first-app dec
npx everdev contract run-local first-app count
```
32 changes: 32 additions & 0 deletions src/solidity-by-example/basic/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
sidebar_position: 1
title: "Hello World"
description: Specifies the compiler version of Solidity
---

`pragma` specifies the compiler version of Solidity.


```solidity
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.70.0 and less than 0.71.0
pragma ever-solidity ^0.70.0;

contract HelloWorld {
string public greet = "Hello World!";
}
```

## Deploying the contract

```shell
npx everdev sol set --compiler 0.70.0
npx everdev sol compile hello-world.sol
npx everdev contract deploy hello-world -v 100000000
```

## Interacting with the contract

```shell
npx everdev contract run-local hello-world greet
```
9 changes: 9 additions & 0 deletions src/solidity-by-example/hack/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"position": 3,
"label": "Hack",
"link": {
"title": "Hack",
"slug": "hack",
"type": "generated-index"
}
}
3 changes: 2 additions & 1 deletion src/standard/TIP-1/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 1.1 COPYLEFT
sidebar_position: 1
description: Developer business models and license information
slug: /standard/TIP-1.1
---

# COPYLEFT (TIP-1.1)
Expand Down Expand Up @@ -112,4 +113,4 @@ To recap the proposed system is compatible with all four essential freedoms:

[^4]: [Economics in a Sharded Blockchain — Section 06 — Developer Business Models](https://near.org/papers/economics-in-sharded-blockchain/#developer-business-models)

[^5]: [Misinterpreting Copyright — A Series of Errors](https://www.gnu.org/philosophy/misinterpreting-copyright.en.html)
[^5]: [Misinterpreting Copyright — A Series of Errors](https://www.gnu.org/philosophy/misinterpreting-copyright.en.html)
3 changes: 2 additions & 1 deletion src/standard/TIP-1/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
title: 1.2 MYCODE
sidebar_position: 2
description: Returns the Cell with the current code of the smartcontract
slug: /standard/TIP-1.2
---

# MYCODE (TIP-1.2)

`F82A` — `MYCODE (- s)` — returns the Cell with the current code of the smartcontract. Equivalent to `GETPARAM 10`. Smartcontract has own code which cell representation can be obtained by this instruction.
`F82A` — `MYCODE (- s)` — returns the Cell with the current code of the smartcontract. Equivalent to `GETPARAM 10`. Smartcontract has own code which cell representation can be obtained by this instruction.
3 changes: 1 addition & 2 deletions src/standard/TIP-1/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"position": 0,
"collapsed": false,
"position": 1,
"label": "TIP-1 TVM Opcode",
"link": {
"slug": "standard/TIP-1",
Expand Down
3 changes: 1 addition & 2 deletions src/standard/TIP-3/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"position": 1,
"collapsed": false,
"position": 3,
"label": "TIP-3 FT"
}
3 changes: 1 addition & 2 deletions src/standard/TIP-4/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"position": 2,
"collapsed": false,
"position": 4,
"label": "TIP-4 NFT"
}
3 changes: 1 addition & 2 deletions src/standard/TIP-6/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"position": 3,
"collapsed": false,
"position": 6,
"label": "TIP-6"
}