web3gbit-cli 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +296 -40
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,72 +1,328 @@
1
- ## Foundry
1
+ <p align="center">
2
+ <img width="324" height="324" alt="image" src="https://github.com/user-attachments/assets/10649ace-2263-4aa1-b79a-0581a3fb638a" />
3
+ </p>
2
4
 
3
- **Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
5
+ <p align="center">
4
6
 
5
- Foundry consists of:
7
+ <a href="https://opensource.org/licenses/MIT">
8
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" />
9
+ </a>
6
10
 
7
- - **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8
- - **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9
- - **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10
- - **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11
+ <a href="https://nextjs.org/">
12
+ <img src="https://img.shields.io/badge/Next.js-16.1.6-black?logo=next.js" />
13
+ </a>
11
14
 
12
- ## Documentation
15
+ <a href="https://github.com/Gislaine-programadora/projeto-web3-cli-deploy">
16
+ <img src="https://img.shields.io/badge/Web3GBIT--CLI-comandos%20dos%2010-blue?logo=express" />
17
+ </a>
13
18
 
14
- https://book.getfoundry.sh/
19
+ <a href="https://soliditylang.org/">
20
+ <img src="https://img.shields.io/badge/Smart--Contract-Solidity-363636?logo=solidity" />
21
+ </a>
15
22
 
16
- ## Usage
23
+ <a href="https://book.getfoundry.sh/">
24
+ <img src="https://img.shields.io/badge/Built%20with-Foundry-FFDE00?logo=foundry" />
25
+ </a>
17
26
 
18
- ### Build
27
+ <a href="https://book.getfoundry.sh/forge/">
28
+ <img src="https://img.shields.io/badge/Forge-Testing-red" />
29
+ </a>
19
30
 
20
- ```shell
21
- $ forge build
31
+ <a href="https://pnpm.io/">
32
+ <img src="https://img.shields.io/badge/pnpm-8.15.0-orange?logo=pnpm" />
33
+ </a>
34
+
35
+ <a href="https://www.npmjs.com/">
36
+ <img src="https://img.shields.io/badge/npm-v1.0.0-cb3837?logo=npm" />
37
+ </a>
38
+
39
+ </p>
40
+
41
+
42
+ ## 💎 Sobre o Projeto: O CLI Web3 GBIT E Um Framework Fullstack para Smart-Contract com froundry:
43
+
44
+ O **Web3 Gbit** é uma ferramenta de linha de comando (CLI) projetada para automatizar o ciclo de vida de projetos blockchain. Desde a criação da estrutura inicial (**Forge**) até a gestão ativa de liquidez e volume (**Market Bot**).
45
+
46
+ > "O web3gbit on Foundry para a nova era da Web3."
47
+
48
+ ---
49
+ ## 📦 Link Oficial
50
+ Você pode encontrar este pacote no registro oficial do NPM:
51
+ [https://www.npmjs.com/package/web3gbit-cli](https://www.npmjs.com/package/web3gbit-cli)
52
+
53
+
54
+ [![npm version](https://img.shields.io/npm/v/web3gbit-cli.svg?style=flat-square)](https://www.npmjs.com/package/web3gbit-cli)
55
+
56
+
57
+ ## 🛠️ Instalação ## ⚡ Quick Start
58
+
59
+ ### 🎯 Criar Novo Projeto com Foundry + Forge
60
+
61
+ Crie um projeto Web3 completo com estrutura Foundry otimizada em segundos:
62
+
63
+ ```bash
64
+ pnpm create web3-forge my-project
22
65
  ```
23
66
 
24
- ### Test
67
+ Ou com npm:
25
68
 
26
- ```shell
27
- $ forge test
69
+ ```bash
70
+ npm create web3-forge my-project
28
71
  ```
29
72
 
30
- ### Format
73
+ Ou com yarn:
31
74
 
32
- ```shell
33
- $ forge fmt
75
+ ```bash
76
+ yarn create web3-forge my-project
34
77
  ```
35
78
 
36
- ### Gas Snapshots
37
79
 
38
- ```shell
39
- $ forge snapshot
80
+ <img width="461" height="200" alt="image" src="https://github.com/user-attachments/assets/e4ea95b8-f932-4a43-bfd2-d88a530dd251" />
81
+
82
+
83
+
84
+ ``
85
+ ## COMANDOS PARA INTERAGIR COM O SMART CONTRACT:
86
+
87
+ ```bash
88
+ pnpm install -g web3gbit
40
89
  ```
90
+
91
+ ```bash
92
+ web3gbit status
93
+ ```
94
+
95
+ # 🚀 WEB3 GBIT - CLI Admin Tool
96
+
97
+ ![WEB3 GBIT Logo](https://img.shields.io/badge/WEB3-GBIT-00D9FF?style=for-the-badge&logo=ethereum&logoColor=white)
98
+ ![Node.js](https://img.shields.io/badge/Node.js-v18+-339933?style=for-the-badge&logo=node.js&logoColor=white)
99
+ ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
100
+
101
+ CLI profissional para gerenciamento de tokens GBIT na blockchain Ethereum (Sepolia/Mainnet).
102
+
103
+ ---
104
+
105
+ ## 📋 Tabela de Comandos
41
106
 
42
- ### Anvil
107
+ | Comando | Descrição | Parâmetros |
108
+ |---------|-----------|------------|
109
+ | `status` | Exibe preço, liquidez e supply total | - |
110
+ | `balance-of` | Consulta saldo ETH de uma carteira | `<endereço>` |
111
+ | `balance-eth` | Ver saldo de ETH (Combustível) | `<endereço>` |
112
+ | `balance-token` | Ver saldo de tokens GBIT | `<endereço>` |
113
+ | `deposito` | Comprar GBIT enviando ETH | `<valor_em_eth>` |
114
+ | `sell` | Vender GBIT e receber ETH | `<quantidade_gbit>` |
115
+ | `transfer` | Enviar tokens para outra carteira | `<endereço> <quantidade>` |
116
+ | `mint` | Criar novos tokens (owner only) | `<endereço> <quantidade>` |
117
+ | `burn` | Queimar tokens | `<quantidade>` |
118
+ | `pump` / `dump` | Ajustar preço (Rate) do token | `<novo_rate>` |
119
+ | `gas` | Ver preço atual do gás na rede | - |
120
+ | `withdraw` | Resgatar reserva ETH do contrato | - |
121
+ | `price` | Ver cotação atual GBIT/ETH | - |
122
+ | `profit` | Ver lucro acumulado do bot | - |
123
+ | `market-bot` | Ativa robô trader automático | - |
124
+ | `help` | Exibe menu de ajuda completo | - |
43
125
 
44
- ```shell
45
- $ anvil
126
+ ---
127
+
128
+ ## 🎯 Exemplos de Uso
129
+
130
+ ### 📊 Consultar Status do Sistema
131
+ ```bash
132
+ web3gbit status
133
+ ```
134
+
135
+ ### 💰 Ver Saldo ETH
136
+ ```bash
137
+ web3gbit balance-of 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
138
+ ```
139
+
140
+ ### 💎 Ver Saldo de Tokens GBIT
141
+ ```bash
142
+ web3gbit balance-token 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
143
+ ```
144
+
145
+ ### ⛽ Ver Saldo de ETH (Combustível)
146
+ ```bash
147
+ web3gbit balance-eth 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
148
+ ```
149
+
150
+ ### 💸 Comprar GBIT (Depositar ETH)
151
+ ```bash
152
+ web3gbit deposito 0.1
46
153
  ```
47
154
 
48
- ### Deploy
155
+ ### 🔄 Vender GBIT (Sacar ETH)
156
+ ```bash
157
+ web3gbit sell 100
158
+ ```
159
+
160
+ ### 📤 Transferir Tokens
161
+ ```bash
162
+ web3gbit transfer 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb 50
163
+ ```
164
+
165
+ ### 🪙 Criar Novos Tokens (Mint)
166
+ ```bash
167
+ web3gbit mint 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb 1000
168
+ ```
49
169
 
50
- ```shell
51
- $ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
170
+ ### 🔥 Queimar Tokens (Burn)
171
+ ```bash
172
+ web3gbit burn 100
52
173
  ```
53
174
 
54
- ### Cast
175
+ ### 📈 Aumentar Preço (Pump)
176
+ ```bash
177
+ web3gbit pump 1500
178
+ ```
55
179
 
56
- ```shell
57
- $ cast <subcommand>
180
+ ### 📉 Diminuir Preço (Dump)
181
+ ```bash
182
+ web3gbit dump 800
58
183
  ```
59
184
 
60
- ### Help
185
+ ### ⛽ Ver Preço do Gás
186
+ ```bash
187
+ web3gbit gas
188
+ ```
61
189
 
62
- ```shell
63
- $ forge --help
64
- $ anvil --help
65
- $ cast --help
190
+ ### 💵 Resgatar ETH do Contrato
191
+ ```bash
192
+ web3gbit withdraw
66
193
  ```
67
194
 
68
- # GBIT PRO - Plataforma de Trading
195
+ ### 💎 Ver Cotação Atual
196
+ ```bash
197
+ web3gbit price
198
+ ```
199
+
200
+ ### 📊 Ver Lucro do Bot
201
+ ```bash
202
+ web3gbit profit
203
+ ```
204
+
205
+ ### 🤖 Ativar Market Maker Bot
206
+ ```bash
207
+ web3gbit market-bot
208
+ ```
209
+
210
+ ### ❓ Menu de Ajuda
211
+ ```bash
212
+ web3gbit help
213
+ ```
214
+
215
+ ---
216
+
217
+ ## ⚙️ Instalação
218
+
219
+ ### 1. Clone o Repositório
220
+ ```bash
221
+ git clone https://github.com/seu-usuario/web3gbit-cli.git
222
+ cd web3gbit-cli
223
+ ```
224
+
225
+ ### 2. Instale as Dependências
226
+ ```bash
227
+ pnpm install
228
+ ```
229
+
230
+ ### 3. Configure o Arquivo `.env`
231
+ ```env
232
+ PRIVATE_KEY=0xSUA_CHAVE_PRIVADA_AQUI
233
+ RPC_URL=https://sepolia.infura.io/v3/SEU_PROJECT_ID
234
+ GBIT_ADDRESS=0xSEU_CONTRATO_GBIT
235
+ wallet_address=ox_seu_address_da_private-key
236
+ ```
237
+
238
+ ### 4. Comando deploy rapido, nao precisa compilir
239
+ ```bash
240
+ forge create --rpc-url https://sepolia.infura.io/v3/sua-api \
241
+ --private-key 0xxxxxx \
242
+ src/GbitToken.sol:GbitToken --broadcast
243
+ ```
244
+ ### 5. Comando verify contrato no etherscan
245
+ ```bash
246
+ forge verify-contract 0xF13A043e72eE36471F26f58665B3F833c1B693E1 src/GbitToken.sol:GbitToken \
247
+ --chain-id 11155111 \
248
+ --etherscan-api-key sua-api-key \
249
+ --watch
250
+ ```
251
+
252
+ ### 6. tambem deposito usando o cast
253
+ ```bash
254
+ cast send 0x692dFB8d2330E62578F0a58F29F637CD7fD518cA "deposit()" \
255
+ --value 0.002ether \
256
+ --rpc-url https://sepolia.infura.io/v3/sua-api-key \
257
+ --private-key 0x23456986475789999
258
+ ```
259
+ ### 7. para teste Anvil deploy token
260
+ ```bash
261
+ forge create src/GbitToken.sol:GbitToken \
262
+ --rpc-url http://127.0.0.1:8545 \
263
+ --private-key 0x2a871d0798f97d79848a013d4936a73bf4cc9543333 \
264
+ --broadcast
265
+ ```
266
+ ## para funcionar deixe rodando o Anvil aberto
267
+ (_) | |
268
+ __ _ _ __ __ __ _ | |
269
+ / _` | | '_ \ \ \ / / | | | |
270
+ | (_| | | | | | \ V / | | | |
271
+ \__,_| |_| |_| \_/ |_| |_|
272
+
273
+
274
+ ## 🛡️ Segurança
275
+
276
+ ⚠️ **NUNCA** compartilhe sua `PRIVATE_KEY`
277
+ ⚠️ Use carteiras separadas para testes em Sepolia
278
+ ⚠️ Adicione `.env` ao `.gitignore`
279
+
280
+ ---
281
+
282
+ ## 📦 Dependências Principais
283
+
284
+ - **viem** - Cliente Ethereum moderno
285
+ - **typescript** - Tipagem estática
286
+ - **dotenv** - Gerenciamento de variáveis de ambiente
287
+ - **ts-node** - Execução TypeScript direta
288
+
289
+ ---
290
+
291
+ ## 🤝 Contribuindo
292
+
293
+ 1. Fork o projeto
294
+ 2. Crie uma branch: `git checkout -b feature/nova-funcionalidade`
295
+ 3. Commit suas mudanças: `git commit -m 'Adiciona nova feature'`
296
+ 4. Push para a branch: `git push origin feature/nova-funcionalidade`
297
+ 5. Abra um Pull Request
298
+
299
+ ---
300
+
301
+ ## 📝 Licença
302
+
303
+ MIT License - veja o arquivo [LICENSE](LICENSE) para mais detalhes.
304
+
305
+ ---
306
+
307
+ ## 👩‍💻 Desenvolvido por
308
+
309
+ **Gislaine** - [GitHub](https://github.com/gislaine)
310
+
311
+ ---
312
+
313
+ ## 🌐 Links Úteis
314
+
315
+ - [Documentação Viem](https://viem.sh)
316
+ - [Sepolia Testnet Faucet](https://sepoliafaucet.com)
317
+ - [Etherscan Sepolia](https://sepolia.etherscan.io)
318
+
319
+ ---
320
+
321
+ </div>
322
+ <div align="center">
323
+
324
+ ### 💙 Feito com TypeScript, Viem e muito ☕
325
+
326
+ **WEB3 GBIT** © 2025
69
327
 
70
- ![GBIT PRO](https://img.shields.io/badge/GBIT-PRO-blue?style=for-the-badge)
71
- ![Ethereum](https://img.shields.io/badge/Ethereum-Mainnet-purple?style=for-the-badge)
72
- ![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)
328
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web3gbit-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI para gerenciar tokens GBIT",
5
5
  "type": "module",
6
6
  "bin": {