-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added iwarden docs, did a restructure in the section * a minor fix * small fixes in the iwarden reference * Add category for x warden * Add space * Add spaces * rename * Minor fixes * Add keys * Only add code snippets Remove o/p to reduce overall length of tutorial * Add code snippet for - Update space, Add space owner, Remove space owner * Add CLI command for - Update space, Add space owner, Remove space owner * Minor fixes * Add code snippet + CLI command for - Query key, Query Key by ID, Query key by Space ID and Update Key * Shuffle * Rename * Rename * Rename * Shuffle * Add keychain structure * fixed broken links * Minor fixes * Add keyrequest structure * cleanup * Add signature structure * Add preq * Update space with preq * Update keys with preq * Minor fix * Update keychain with preq * Update keyrequest with preq * Update signaturerequest with preq * Add code for keychain * Add code for keyrequest * Add code for keychain * Minor update * Add code for signature-request * Minor update * edited precomile docs * edited precomile docs --------- Co-authored-by: Margarita Skomorokh <ijonele@gmail.com>
- Loading branch information
1 parent
19a528f
commit fae2674
Showing
23 changed files
with
2,417 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"position": 4, | ||
"label": "Precompiles reference", | ||
"collapsible": true, | ||
"collapsed": false, | ||
"link": { | ||
"type": "generated-index", | ||
"title": "Precompiles reference" | ||
}, | ||
"customProps": {} | ||
} |
2 changes: 1 addition & 1 deletion
2
docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 5 | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Examples of OApps | ||
|
11 changes: 11 additions & 0 deletions
11
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"position": 4, | ||
"label": "Interact with Warden modules", | ||
"collapsible": true, | ||
"collapsed": false, | ||
"link": { | ||
"type": "generated-index", | ||
"title": "Interact with Warden modules" | ||
}, | ||
"customProps": {} | ||
} |
96 changes: 96 additions & 0 deletions
96
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# Get started | ||
|
||
## Overview | ||
|
||
This guide shows how to prepare an EVM smart contract for interacting with [Warden Protocol modules](/category/warden-protocol-modules). | ||
|
||
You're going to call modules from your contract by using functions from the available [Warden precompiles](/category/precompiles). | ||
|
||
## Prerequisites | ||
|
||
Before you start, complete the following prerequisites: | ||
|
||
1. [Install Foundry](https://book.getfoundry.sh/getting-started/installation) by running this command: | ||
|
||
```bash | ||
curl -L https://foundry.paradigm.xyz | bash \ | ||
foundryup | ||
``` | ||
|
||
2. [Prepare the chain](../deploy-smart-contracts-on-warden/deploy-an-evm-contract#1-prepare-the-chain), setting up your private key. | ||
|
||
## 1. Create a project and contract | ||
|
||
1. Initialize a new Foundry project and navigate to its directory: | ||
|
||
```bash | ||
forge init warden-smart-contract --no-commit | ||
cd warden-smart-contract | ||
``` | ||
|
||
2. In the `/src` directory, create a new contract named `Warden.sol`. | ||
|
||
3. Finally, prepare the contract code. You can use code samples from the following sections: | ||
|
||
- [Interact with x/warden](/category/interact-with-xwarden) | ||
|
||
## 2. Compile and deploy the contract | ||
|
||
1. Export your private key and the RPC URL as environmental variables: | ||
|
||
<Tabs> | ||
<TabItem value="local" label="Local node"> | ||
```bash | ||
export PRIVATE_KEY=my-private-key | ||
export RPC_URL=http://127.0.0.1:8545 | ||
``` | ||
</TabItem> | ||
<TabItem value="chiado" label="Chiado"> | ||
```bash | ||
export PRIVATE_KEY=my-private-key | ||
export RPC_URL=https://evm.chiado.wardenprotocol.org | ||
``` | ||
</TabItem> | ||
</Tabs> | ||
|
||
:::warning | ||
In production, never store private keys directly in environment variables. Consider using encrypted keystores or secure key management solutions like `.env`. | ||
::: | ||
|
||
2. Compile your contract using Foundry: | ||
|
||
```bash | ||
forge build | ||
``` | ||
|
||
3. Deploy the contract: | ||
|
||
```bash | ||
forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY src/Warden.sol:WardenContract | ||
``` | ||
|
||
4. Export your contract address returned in `Deployed to`: | ||
|
||
``` | ||
export CONTRACT_ADDRESS=my-contract-address | ||
``` | ||
|
||
5. Verify the deployment: | ||
|
||
```bash | ||
cast code $CONTRACT_ADDRESS --rpc-url $RPC_URL | ||
``` | ||
|
||
## Next steps | ||
|
||
- To dive deeper and find code samples for each function from Warden precompiles, see the following guides: | ||
- [Interact with x/warden](/category/interact-with-xwarden) | ||
- *Other modules: coming soon.* | ||
- For an overview of the functions, refer to the [Precompiles](/category/precompiles) section. |
11 changes: 11 additions & 0 deletions
11
...ocs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"position": 2, | ||
"label": "Interact with x/warden", | ||
"collapsible": true, | ||
"collapsed": true, | ||
"link": { | ||
"type": "generated-index", | ||
"title": "Interact with x/warden" | ||
}, | ||
"customProps": {} | ||
} |
Oops, something went wrong.