Skip to content
Open
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
6 changes: 3 additions & 3 deletions docs/develop/client/artela-web3.js/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ let aspectBytecode = '0x' + fs.readFileSync('./build/release.wasm', {
let aspect = new web3.atl.Aspect();
aspect = await aspect.deploy({
data: aspectBytecode,
properties: [ // <-- properity to initialize the aspect, key-value pairs
properties: [ // <-- property to initialize the aspect, key-value pairs
{ 'key': 'owner', 'value': accounts[0] }
]
}).send({ from: accounts[0], nonce, ...sendOptions });
Expand Down Expand Up @@ -150,7 +150,7 @@ You can update an existing Aspect's code and properties using aspectId by follow
// ...
await new web3.atl.Aspect('0x{aspect-id}').upgrade({
data: aspectBytecode,
properties: [ // <-- properity can also be updated during the upgrade
properties: [ // <-- property can also be updated during the upgrade
{ 'key': 'owner', 'value': accounts[0] }
]
}).send({ from: accounts[0], nonce, ...sendOptions });
Expand Down Expand Up @@ -193,4 +193,4 @@ await new web3.atl.Aspect('0x{aspect-id}')
The first version of Aspect operation calls follows the bytes in bytes out manner, users need to encode and decode the call data themselves. We will provide a more user-friendly way to call Aspect in a later version.
:::

------------------------------------------------------------------------------
------------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions docs/develop/get-started/sol-hello-world/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ npm run account:create -- --pkfile {privateKey-path}

> * --pkfile : privateKey path for sender. (optional, default value: `./privateKey.txt`).

If your account lacks test tokens, join [Discard](https://discord.com/invite/artela),and request some in `testnet-faucet` channel.
If your account lacks test tokens, join [Discord](https://discord.com/invite/artela),and request some in `testnet-faucet` channel.


#### 2.3.4 Deploy your contract
Expand Down Expand Up @@ -207,7 +207,7 @@ For example, to add logic after a smart contract call execution, open `aspect.ts

### 3.2. Access State Changes of Smart Contract in Aspect

To integrate the state of `HelloWord` contract with your Aspect, follow these steps:
To integrate the state of the `HelloWord` contract with your Aspect, follow these steps:

In `assembly/aspect`, add your Aspect to check the transaction, if `world` function is called, then revert:

Expand Down Expand Up @@ -273,7 +273,7 @@ npm run contract:bind -- --pkfile {privateKey-path} \

### 3.6. Test the Smart Contract and Aspect Integration

Now that the `HelloWord` contract and Aspect are bound, call `world` to test, due to Aspect interception, the transaction is reverted.
Now that the `HelloWorld` contract and Aspect are bound, call `world` to test, due to Aspect interception, the transaction is reverted.

```bash
npm run contract:call -- --pkfile {privateKey-path} \
Expand Down
8 changes: 4 additions & 4 deletions docs/develop/guides/erc20-contract/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ This will create a project directory with the following structure:
│ │ └── aspect.ts <-- Entry functions for the aspect
│ └── index.ts
├── contracts <-- Place your smart contracts here
├── scripts <-- Utilitity scripts, including deploying, binding and etc.
├── scripts <-- Utility scripts, including deploying, binding and etc.
│ ├── aspect-deploy.cjs
│ ├── bind.cjs
│ ├── contract-call.cjs
Expand Down Expand Up @@ -93,7 +93,7 @@ pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Borker is Ownable {
contract Broker is Ownable {
address private deployer;
address immutable _tokenIn;

Expand Down Expand Up @@ -186,7 +186,7 @@ npm run account:create -- --pkfile ./brokerPk.txt

> * --pkfile : privateKey path for sender. (optional, default value: `./privateKey.txt`).

If your account lacks test tokens, join [Discard](https://discord.com/invite/artela),and request some in `testnet-faucet` channel.
If your account lacks test tokens, join [Discord](https://discord.com/invite/artela),and request some in `testnet-faucet` channel.


#### 2.3.4 Deploy your contract
Expand Down Expand Up @@ -231,4 +231,4 @@ npm run contract:send -- --pkfile ./tokenPk.txt

Confirm the successful `transfer` on Artela Testnet [blockchain explorer](https://testnet-scan.artela.network/) using `transaction hash` in output.

![img.png](img.png)
![img.png](img.png)
10 changes: 5 additions & 5 deletions docs/develop/guides/reentrancy-guard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ transaction [here](https://explorer.phalcon.xyz/tx/eth/0xa84aa065ce61dbb1eb50ab6

Learn more from our blog:

[How does Aspect Programming prevent reentrancy attacks through on-chain runtime protection](https://github.com/artela-network/example/blob/main/curve_reentrance/README.md).
[How does Aspect Programming prevent reentrancy attacks through on-chain runtime protection?](https://github.com/artela-network/example/blob/main/curve_reentrance/README.md)

## Pre-requisites

Expand Down Expand Up @@ -57,7 +57,7 @@ npm run account:create -- --pkfile ./attack_accounts.txt
If you don't have a test token in your account, please join [our discard](https://discord.com/invite/artela)
,require testnet faucet.

If you lack test tokens, request some in our [Discord]((https://discord.com/invite/artela)) testnet-faucet channel.
If you lack test tokens, request some in our [Discard]((https://discord.com/invite/artela)) testnet-faucet channel.

## 3. Create Smart Contracts

Expand All @@ -69,10 +69,10 @@ methods: `add_liquidity` and `remove_liquidity`. Both are guarded by the same re

``` python
event AddLiquidity:
excuted: uint256
executed: uint256

event RemoveLiquidity:
excuted: uint256
executed: uint256

deployer: address

Expand Down Expand Up @@ -264,4 +264,4 @@ protection succeeded, you will see the transaction reverted.





6 changes: 3 additions & 3 deletions docs/develop/guides/storage-contract/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ This will create a project directory with the following structure:
│ │ └── aspect.ts <-- Entry functions for the aspect
│ └── index.ts
├── contracts <-- Place your smart contracts here
├── scripts <-- Utilitity scripts, including deploying, binding and etc.
├── scripts <-- Utility scripts, including deploying, binding and etc.
│ ├── aspect-deploy.cjs
│ ├── bind.cjs
│ ├── contract-call.cjs
Expand Down Expand Up @@ -144,7 +144,7 @@ npm run account:create

> * --pkfile : privateKey path for sender. (optional, default value: `./privateKey.txt`).

If your account lacks test tokens, join [Discard](https://discord.com/invite/artela),and request some in `testnet-faucet` channel.
If your account lacks test tokens, join [Discord](https://discord.com/invite/artela),and request some in `testnet-faucet` channel.


#### 2.3.4 Deploy your contract
Expand Down Expand Up @@ -184,4 +184,4 @@ npm run contract:call -- --contract {artToken-address} \

Confirm the successful on Artela Testnet [blockchain explorer](https://testnet-scan.artela.network/) using `transaction hash` in output.

![img.png](img.png)
![img.png](img.png)
6 changes: 3 additions & 3 deletions docs/develop/node/access-testnet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Once you've initiated the node, connect to the JSON-RPC port service here:

[genesis.json](./genesis.json)

> **Admin**: Getting the genesis from the home directory `$HOME/.aretlad/config/genesis.json`of any node.
> **Admin**: Getting the genesis from the home directory `$HOME/.aretlad/config/genesis.json` of any node.
>

### 2. Presistent nodes
### 2. Persistent nodes

```json
ef1777650f2a5f96cfbf2b1b21feb45ef09bbaa4@172.16.10.2:26656
Expand Down Expand Up @@ -60,4 +60,4 @@ b8160265953ff82a9e7d6752cc5b95e3d3be6d7e@172.16.10.3:26656
172.16.10.3:26657
172.16.10.4:26657
172.16.10.5:26657
```
```
4 changes: 2 additions & 2 deletions docs/develop/node/full-node-setup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export PATH=$PATH:$HOME/go/bin

Ask admin of Artela Testnet for the download link.

Uninstall and copy the binaray `artelad` to `/usr/local/bin`.
Uninstall and copy the binary `artelad` to `/usr/local/bin`.

## 2. Init node

Expand All @@ -61,7 +61,7 @@ mv genesis.json $HOME/.artelad/config/genesis.json

**3). Configure**

Get presistent seeds from [2. Presistent nodes](./access-testnet#public-information-on-testnet)
Get persistent seeds from [2. Persistent nodes](./access-testnet#public-information-on-testnet)

Add two of them to `seeds` in `app.toml`

Expand Down
8 changes: 4 additions & 4 deletions docs/develop/node/testnet-setup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ make clean && make
# find 'artelad' in ./build

# you can copy the binary to $GOPATH/bin
# this is unnecessary if your are going to run testenet in docker
# this is unnecessary if your are going to run testnet in docker
make install
```

Expand Down Expand Up @@ -160,7 +160,7 @@ sed -i 's/"extra_eips": \[\]/"extra_eips": \[3855\]/g' node3/artelad/config/gene

### 4). Copy the node configuration to your devices

Copy each of the node configuretions in `artela/testenet/` to the device.
Copy each of the node configurations in `artela/testnet/` to the device.

```bash
scp ./testnet/node0/artelad/* user@your-device-0:~/.artelad/
Expand All @@ -176,12 +176,12 @@ scp ./testnet/node3/artelad/* user@your-device-3:~/.artelad/
Start the node in your devices.

```bash
artelad start --pruning=nothing --log_level debug --minimum-gas-prices=0.0001aartela --api.enable --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable
artelad start --pruning=nothing --log_level debug --minimum-gas-prices=0.0001artela --api.enable --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable
```

## 4. The genesis account

In the process of generating the testnet, each validator node has a corresponding EOA (Externally Owned Account) account with the encryption algorithm `eth_secp256k1`, which is written into the `genesis.json` file. Additionally, `5e21 aartela` have been deposited into each account. The key.info of each account is stored in
In the process of generating the testnet, each validator node has a corresponding EOA (Externally Owned Account) account with the encryption algorithm `eth_secp256k1`, which is written into the `genesis.json` file. Additionally, `5e21 artela` have been deposited into each account. The key.info of each account is stored in

`~/.artelad/config/keyring-test/node<validator_number>.json`.

Expand Down