make cleos separated component

This commit is contained in:
Alex Ant
2025-03-26 18:19:52 +05:00
parent 804708076a
commit 5b38ce0b37
15 changed files with 48 additions and 10 deletions
+1 -3
View File
@@ -11,6 +11,4 @@ node_modules
temp
.env
blockchain-data/*
wallet-data/keosd.sock=
wallet-data/wallet.lock
wallet-data/production.wallet
wallet-data/*
+2
View File
@@ -0,0 +1,2 @@
eosio-wallet/wallet.lock
eosio-wallet/keosd.sock
+1
View File
@@ -0,0 +1 @@
PW5JGe4WsTPGrjnMzkGd4wfVdzoHCEySgbyq2WBWGAxSfevbXqAG4
+11
View File
@@ -0,0 +1,11 @@
{
"name": "@coopenomics/cleos",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
+7
View File
@@ -0,0 +1,7 @@
docker run --rm -it --name cleos \
--network dicoop \
--volume ./eosio-wallet:/root/eosio-wallet \
--volume ./scripts:/root/scripts \
-w /root/scripts \
dicoop/blockchain_v5.1.1:dev /bin/bash
+5
View File
@@ -0,0 +1,5 @@
ls
exit
ls
./cleos.sh
exit
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
cleos -u http://node:8888 "$@"
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
rm ../eosio-wallet/keosd.sock
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
cleos wallet unlock --name default < ../eosio-wallet/password
@@ -15,10 +15,10 @@ void capital::addauthor(name coopname, name application, checksum256 project_has
auto author_itr = project_author_index.find(combined_id);
authors.emplace(coopname, [&](auto& row) {
row.id = get_global_id_in_scope(_capital, coopname, "authors"_n);
row.project_hash = project_hash;
row.username = author;
row.shares = shares;
row.id = get_global_id_in_scope(_capital, coopname, "authors"_n);
row.project_hash = project_hash;
row.username = author;
row.shares = shares;
});
project_index projects(_capital, coopname.value);
+1 -2
View File
@@ -2,8 +2,7 @@ import dotenv from 'dotenv';
import { z } from 'zod';
import path from 'path';
dotenv.config({ path: path.join(__dirname, '../../../../.env') });
console.log('CONFIG PATH: ', path.join(__dirname, '../../../../.env'));
dotenv.config({ path: path.join(__dirname, '../../.env') });
const envVarsSchema = z.object({
NODE_ENV: z.enum(['production', 'development', 'test']),
+7
View File
@@ -1,5 +1,10 @@
version: '3'
networks:
dicoop:
name: dicoop
driver: bridge
services:
node:
image: dicoop/blockchain_v5.1.1:dev
@@ -16,6 +21,8 @@ services:
command: >
/bin/bash -c "/usr/local/bin/nodeos -d /mnt/dev/data --config-dir /mnt/dev/config --genesis-json /mnt/dev/config/genesis.json"
restart: unless-stopped
networks:
- dicoop
mongo:
image: mongo:latest