Skip to content

Commit

Permalink
Merge pull request #336 from neonlabsorg/main
Browse files Browse the repository at this point in the history
Introduce documentation about Neon Safe
  • Loading branch information
himaster authored Nov 13, 2024
2 parents 3803922 + c6c50c2 commit 6874b55
Show file tree
Hide file tree
Showing 20 changed files with 191 additions and 1 deletion.
Binary file added docs/developing/integrate/wallets/img/cli1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/cli2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/cli3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/cli4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/cli5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/cli6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/developing/integrate/wallets/img/safe9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions docs/developing/integrate/wallets/safe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: Safe
proofedDate: 20240609
iterationBy: na
includedInSite: false
approvedBy: na
comment:
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Introduction

What is Safe?

The Safe Account functions as a proxy contract, which means it forwards requests to a singleton contract. This singleton contract holds all the essential logic required for the Safe to operate. Proxy contracts are advantageous because they are typically more cost-effective to deploy and manage on public blockchains and they allow for easier upgrades. The primary purpose of the Safe proxy contract is to oversee and maintain the Safe’s state.
The term "contract state" refers to the variables (or values) associated with a specific contract. Functions and contract code are usually stored and executed as bytecode within the Neon EVM, while variables are managed separately. These variables are the values that functions change when they run. For the Safe, the singleton contract provides the functions that adjust the state variables in the proxy. This singleton contract is also called the master copy of the Safe.

Purpose:
The primary purpose of Safe Neon EVM is to facilitate the secure storage, management, and multi-signature capabilities for digital assets. By leveraging the features of the Neon EVM, it allows users to utilize Ethereum-compatible tools like Solidity and Vyper while benefiting from Solana’s low transaction fees, high speeds, and parallel processing capabilities.

## How to create a Safe account on Neon EVM Mainnet

### Step 1: Connect your wallet

1.1 Go to the [login](https://safe.neonevm.org/welcome) page and connect your wallet.

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe1.png)

</div>

1.2 1.2 Select your wallet from the available options to get started

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe2.png)

</div>

1.3 Create new Safe account

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe3.png)

</div>

1.4 Set the signer wallets

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe4.png)

</div>


1.5 Review the filled information

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe5.png)

</div>

1.6 Wait for the transaction confirmation
Accept the transaction in your initial wallet

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe6.png)

</div>

1.7 After the confirmation your account will be created

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe7.png)

</div>

1.8 Welcome page
<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/safe8.png)

</div>
93 changes: 93 additions & 0 deletions docs/developing/integrate/wallets/safe_cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: Safe CLI
proofedDate: 20241909
iterationBy: na
includedInSite: false
approvedBy: na
comment:
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Introduction

Get the Safe CLI
Prerequisite: Install Docker Desktop (https://www.docker.com/products/docker-desktop/)

Once Docker is installed on your system, create Safe account using the Safe guide

Purpose:

The primary purpose of the Neon CLI (Command Line Interface) for Neon EVM is to allow developers to manage, deploy, and operate Ethereum-compatible dApps on the Solana blockchain directly from the command line. This interface simplifies development tasks by enabling users to handle various functions, such as deploying smart contracts, configuring projects, managing databases, and setting up multi-signature accounts.


## Interact with a Safe wallet using CLI

### Step 1: Create 2 or more wallets

1.1 Go to the [login](https://safe.neonevm.org/welcome) page and connect your wallet and create two or more wallets

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/cli1.png)

</div>

### Step 2: Installation

Run
```
docker run -it safeglobal/safe-cli safe-cli 0x0000000000000000000000000000000000000000 https://neon-mainnet.everstake.one/
```

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/cli3.png)

</div>

### Step 3: How to remove an owner

3.1 Run
For 2 wallets:
```
load_cli_owners <private-key1> <private-key2>
```

If you have more wallets then add more private keys

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/cli4.png)

</div>

3.2 Run
```
show_cli_owners
```

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/cli5.png)

</div>

3.3 Run
```
remove_owner <address> --threshold 3
```

Example for 2 wallets:
```
remove_owner 0x0x0000000000000000000000000000000000000000 --threshold 2
```

If you have more than two wallets then change the number of --threshold

<div className='neon-img-width-600' style={{textAlign: 'center'}}>

![](img/cli6.png)

</div>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"clsx": "^2.1.0",
"docusaurus-json-schema-plugin": "^1.11.0",
"docusaurus-plugin-image-zoom": "^2.0.0",
"markdown-link-check": "^3.11.2",
"markdown-link-check": "3.12.2",
"neon-web-components": "^1.1.3",
"prism-react-renderer": "^2.3.1",
"raw-loader": "^4.0.2",
Expand Down
5 changes: 5 additions & 0 deletions sc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -e
#find ./README.md ./docs/ -regex ".*.[md|mdx]" -print0 | xargs -0 -n1 ./node_modules/markdown-link-check/bin/markdown-link-check --config linkcheck.config.json -v
find ..md ./docs/ -regex ".*.[md|mdx]" -print0 | xargs -0 -n1 sh -c './node_modules/markdown-link-check/bin/markdown-link-check --config linkcheck.config.json -v "$1"; echo "File: $1; Exit code: $?"' _
./node_modules/markdown-link-check/bin/markdown-link-check --config linkcheck.config.json -v ./docs/operating/operator-introduction.md
./node_modules/markdown-link-check/bin/markdown-link-check --config linkcheck.config.json -v ./docs/quick_start.mdx
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ const sidebars = {
items: [
'developing/integrate/wallets/integrating_metamask_into_your_dapp',
'developing/integrate/wallets/integrating_walletconnect',
'developing/integrate/wallets/safe',
'developing/integrate/wallets/safe_cli',
'developing/integrate/wallets/integrating_web3auth',
'developing/integrate/oracles/integrating_chainlink',
'developing/integrate/oracles/integrating_pyth',
Expand Down

0 comments on commit 6874b55

Please sign in to comment.