Skip to content

Commit 364a157

Browse files
authored
Add request examples (#23)
* rm mantle * add examples
1 parent d7c0e3e commit 364a157

18 files changed

Lines changed: 248 additions & 4183 deletions

.env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MISTRAL_API_KEY='88888'
2-
MANTLE_RPC_URL='88888'
2+
ARBITRUM_RPC_URL='88888'
33
PRIVATE_KEY='88888'
44
RUKH_TOKEN_ADDRESS='0xefb5b4F08e12EEB2d5B3FDD73E30fa0D661D5429'
55
PORT=3000

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A lightweight, developer-friendly toolkit for building AI agents with Web3 integ
33

44
- 🚀 Quick setup and minimal configuration
55
- 🔄 Built-in session management and persistent storage
6-
- 🔗 Seamless Web3 integration with [Mantle Network](https://www.mantle.xyz/)
6+
- 🔗 Seamless Web3 integration
77
- 🛠️ Modular architecture for easy LLM integration (Mistral, Anthropic, OpenAI, etc.)
88
- 📝 Auto-generated OpenAPI documentation
99
- 🎮 Token-gated access control built-in
@@ -13,8 +13,8 @@ Live at: **http://rukh.w3hc.org/api**
1313

1414
Solidity contracts:
1515

16-
- [Rukh governance token](https://explorer.sepolia.mantle.xyz/address/0x4db173196C37bF4Df60277A843590690F52bEB6a#code)
17-
- [Rukh DAO](https://explorer.sepolia.mantle.xyz/address/0x446200cB329592134989B615d4C02f9f3c9E970F#code)
16+
- [Rukh governance token](https://sepolia.arbiscan.io/address/0x281d3F386A48D31DC65E366081f5E3E3fA49B663#code)
17+
- [Rukh DAO](https://sepolia.arbiscan.io/address/0xf79c712228Bf3b8E71760291822c88A41C510244#code)
1818

1919
## Features
2020

@@ -88,9 +88,9 @@ Will return:
8888
{
8989
"output": "Rukh is a powerful bird.",
9090
"model": "ministral-3b-2410",
91-
"network": "mantle-sepolia",
91+
"network": "arbitrum-sepolia",
9292
"txHash": "0xd96b35d1daefd6dc8368f7a075a1a627df960a541eb30268b1b85cedbae0214a",
93-
"explorerLink": "https://explorer.sepolia.mantle.xyz/tx/0xd96b35d1daefd6dc8368f7a075a1a627df960a541eb30268b1b85cedbae0214a",
93+
"explorerLink": "https://sepolia.arbiscan.io/tx/0x7946e7d46a2115779902a73ceb01d6817479c60200350c46876677566858e899",
9494
"sessionId": "bdce1931-b09d-49ef-954b-d20074d11ffa"
9595
}
9696
```
@@ -116,4 +116,6 @@ Feel free to reach out to [Julien](https://github.com/julienbrg) through:
116116
- Telegram: [@julienbrg](https://t.me/julienbrg)
117117
- Twitter: [@julienbrg](https://twitter.com/julienbrg)
118118
- Discord: [julienbrg](https://discordapp.com/users/julienbrg)
119-
- LinkedIn: [julienberanger](https://www.linkedin.com/in/julienberanger/)
119+
- LinkedIn: [julienberanger](https://www.linkedin.com/in/julienberanger/)
120+
121+
<img src="https://bafkreid5xwxz4bed67bxb2wjmwsec4uhlcjviwy7pkzwoyu5oesjd3sp64.ipfs.w3s.link" alt="built-with-ethereum-w3hc" width="100"/>

contracts/.env.template

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Signer Private Key (signer[0])
22
SIGNER_PRIVATE_KEY="88888"
33

4-
# Mantle Mainnet
5-
MANTLE_MAINNET_RPC_ENDPOINT_URL="88888"
6-
MANTLE_EXPLORER_API_KEY="88888"
4+
# Aritrum Mainnet
5+
ARBITRUM_MAINNET_RPC_ENDPOINT_URL="88888"
6+
ARBITRUM_ETHERSCAN_API_KEY="88888"
77

8-
# Mantle Sepolia
9-
MANTLE_SEPOLIA_RPC_ENDPOINT_URL="88888"
8+
# Aritrum Sepolia
9+
ARBITRUM_SEPOLIA_RPC_ENDPOINT_URL="88888"

contracts/README.md

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,14 @@ Rukh Governance Token & DAO contracts.
1010
- [Hardhat Verify plugin](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify)
1111
- [Hardhat Deploy plugin](https://github.com/wighawag/hardhat-deploy)
1212

13-
## Supported Networks
14-
15-
| Network | Chain ID | Documentation |
16-
|---------|----------|---------------|
17-
| Mantle | 5000 | [Documentation](https://docs.mantle.xyz/) |
18-
| Mantle Sepolia | 5003 | [Documentation](https://docs.mantle.xyz/) |
19-
20-
## Contract Verification
21-
22-
| Network | Explorer URL | API URL | API Key Variable |
23-
|---------|--------------|---------|-----------------|
24-
| Mantle | https://explorer.mantle.xyz | https://explorer.mantle.xyz/api | MANTLE_EXPLORER_API_KEY |
25-
| Mantle Sepolia | https://explorer.sepolia.mantle.xyz | https://explorer.sepolia.mantle.xyz/api | MANTLE_EXPLORER_API_KEY |
26-
2713
### Manual Contract Verification
2814

2915
```bash
3016
npx hardhat verify --network <NETWORK_NAME> <CONTRACT_ADDRESS> "10000000000000000000000"
3117
```
3218

3319
Where:
34-
- `<NETWORK_NAME>`: `mantle`, `mantle-sepolia`
20+
- `<NETWORK_NAME>`: `arbitrum`, `arbitrum-sepolia`
3521
- `<CONTRACT_ADDRESS>`: The address where your contract was deployed
3622

3723
## Installation
@@ -63,7 +49,7 @@ Deploy to supported networks:
6349
```bash
6450
pnpm deploy:<network>
6551
```
66-
Supported values for `<network>`: `mantle`, `mantle-sepolia`
52+
Supported values for `<network>`: `arbitrum`, `arbitrum-sepolia`
6753

6854
### Network Operations
6955

@@ -90,50 +76,6 @@ pnpm send:<network> <amount>
9076
- OpenZeppelin Contracts [v5.1.0](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.1.0)
9177
- Ethers [v6.13.4](https://docs.ethers.org/v6/)
9278

93-
## Feb 11 deployment
94-
95-
``` pnpm deploy:mantle-sepolia
96-
97-
98-
> [email protected] deploy:mantle-sepolia /Users/ju/rukh-contracts
99-
> hardhat deploy --network mantle-sepolia --reset
100-
101-
WARNING: You are currently using Node.js v23.7.0, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions
102-
103-
104-
Nothing to compile
105-
No need to generate any newer typings.
106-
Deploying RukhGovernanceToken and RukhGovernor to Mantle Sepolia...
107-
Deployer: 0x265E31444C6E279870eB20c15B0547373635840b
108-
deploying "RukhGovernanceToken" (tx: 0x043fb29883adda9ef2d241aec83ec62f5d3c8e797ff832754de601d066eb4c8d)...: deployed at 0x4db173196C37bF4Df60277A843590690F52bEB6a with 6248499908 gas
109-
deploying "RukhGovernor" (tx: 0x37d372fa08bcdc2906a897491588a498efcca833c85f2498534385b79e8b1ac1)...: deployed at 0x446200cB329592134989B615d4C02f9f3c9E970F with 12289240863 gas
110-
RukhGovernanceToken deployed to: 0x4db173196C37bF4Df60277A843590690F52bEB6a
111-
RukhGovernor deployed to: 0x446200cB329592134989B615d4C02f9f3c9E970F
112-
113-
Mantle Explorer verification in progress...
114-
Successfully submitted source code for contract
115-
contracts/RukhGovernanceToken.sol:RukhGovernanceToken at 0x4db173196C37bF4Df60277A843590690F52bEB6a
116-
for verification on the block explorer. Waiting for verification result...
117-
118-
Successfully verified contract RukhGovernanceToken on the block explorer.
119-
https://explorer.sepolia.mantle.xyz/address/0x4db173196C37bF4Df60277A843590690F52bEB6a#code
120-
121-
Successfully verified contract RukhGovernanceToken on Sourcify.
122-
https://repo.sourcify.dev/contracts/full_match/5003/0x4db173196C37bF4Df60277A843590690F52bEB6a/
123-
124-
Successfully submitted source code for contract
125-
contracts/RukhGovernor.sol:RukhGovernor at 0x446200cB329592134989B615d4C02f9f3c9E970F
126-
for verification on the block explorer. Waiting for verification result...
127-
128-
Successfully verified contract RukhGovernor on the block explorer.
129-
https://explorer.sepolia.mantle.xyz/address/0x446200cB329592134989B615d4C02f9f3c9E970F#code
130-
131-
Successfully verified contract RukhGovernor on Sourcify.
132-
https://repo.sourcify.dev/contracts/full_match/5003/0x446200cB329592134989B615d4C02f9f3c9E970F/
133-
134-
Mantle Explorer verification completed ✅
135-
```
136-
13779
## Support
13880

13981
Feel free to reach out to [Julien](https://github.com/julienbrg) on [Farcaster](https://warpcast.com/julien-), [Element](https://matrix.to/#/@julienbrg:matrix.org), [Status](https://status.app/u/iwSACggKBkp1bGllbgM=#zQ3shmh1sbvE6qrGotuyNQB22XU5jTrZ2HFC8bA56d5kTS2fy), [Telegram](https://t.me/julienbrg), [Twitter](https://twitter.com/julienbrg), [Discord](https://discordapp.com/users/julienbrg), or [LinkedIn](https://www.linkedin.com/in/julienberanger/).

contracts/deploy/deploy-rukh.ts

Lines changed: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,55 @@
1-
import "@nomiclabs/hardhat-ethers"
2-
import color from "cli-color"
3-
var msg = color.xterm(39).bgXterm(128)
4-
import hre, { ethers } from "hardhat"
1+
import '@nomiclabs/hardhat-ethers';
2+
import color from 'cli-color';
3+
var msg = color.xterm(39).bgXterm(128);
4+
import hre, { ethers } from 'hardhat';
55

66
export default async ({ getNamedAccounts, deployments }: any) => {
7-
const { deploy } = deployments
8-
const { deployer } = await getNamedAccounts()
9-
10-
console.log(
11-
"Deploying RukhGovernanceToken and RukhGovernor to Mantle Sepolia..."
12-
)
13-
console.log("Deployer:", deployer)
14-
15-
const rukhToken = await deploy("RukhGovernanceToken", {
16-
from: deployer,
17-
args: [deployer],
18-
log: true
19-
})
20-
21-
const rukhGovernor = await deploy("RukhGovernor", {
22-
from: deployer,
23-
args: [rukhToken.address],
24-
log: true
25-
})
26-
27-
if (hre.network.name === "mantle-sepolia") {
28-
try {
29-
console.log(
30-
"RukhGovernanceToken deployed to:",
31-
msg(rukhToken.address)
32-
)
33-
console.log("RukhGovernor deployed to:", msg(rukhGovernor.address))
34-
35-
console.log("\nMantle Explorer verification in progress...")
36-
37-
await new Promise(resolve => setTimeout(resolve, 30 * 1000))
38-
39-
await hre.run("verify:verify", {
40-
address: rukhToken.address,
41-
constructorArguments: [deployer]
42-
})
43-
44-
await hre.run("verify:verify", {
45-
address: rukhGovernor.address,
46-
constructorArguments: [rukhToken.address]
47-
})
48-
49-
console.log("Mantle Explorer verification completed ✅")
50-
} catch (error) {
51-
console.error("Error during verification:", error)
52-
}
53-
} else {
54-
console.log("Not on Mantle Sepolia - skipping verification")
7+
const { deploy } = deployments;
8+
const { deployer } = await getNamedAccounts();
9+
10+
console.log(
11+
'Deploying RukhGovernanceToken and RukhGovernor to Arbitrum Sepolia...',
12+
);
13+
console.log('Deployer:', deployer);
14+
15+
const rukhToken = await deploy('RukhGovernanceToken', {
16+
from: deployer,
17+
args: [deployer],
18+
log: true,
19+
});
20+
21+
const rukhGovernor = await deploy('RukhGovernor', {
22+
from: deployer,
23+
args: [rukhToken.address],
24+
log: true,
25+
});
26+
27+
if (hre.network.name === 'arbitrum-sepolia') {
28+
try {
29+
console.log('RukhGovernanceToken deployed to:', msg(rukhToken.address));
30+
console.log('RukhGovernor deployed to:', msg(rukhGovernor.address));
31+
32+
console.log('\nArbitrum Explorer verification in progress...');
33+
34+
await new Promise((resolve) => setTimeout(resolve, 30 * 1000));
35+
36+
await hre.run('verify:verify', {
37+
address: rukhToken.address,
38+
constructorArguments: [deployer],
39+
});
40+
41+
await hre.run('verify:verify', {
42+
address: rukhGovernor.address,
43+
constructorArguments: [rukhToken.address],
44+
});
45+
46+
console.log('Arbitrum Explorer verification completed ✅');
47+
} catch (error) {
48+
console.error('Error during verification:', error);
5549
}
56-
}
50+
} else {
51+
console.log('Not on Arbitrum Sepolia - skipping verification');
52+
}
53+
};
5754

58-
export const tags = ["RukhGovernance"]
55+
export const tags = ['RukhGovernance'];

contracts/deployments/mantle-sepolia/.chainId

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)