Compare commits

..

101 Commits

Author SHA1 Message Date
nolash
2ca865e946 Merge remote-tracking branch 'origin/master' into lash/bloxberg-seeding 2021-12-22 17:06:37 +00:00
nolash
6b3699471b Revert "Merge branch 'lash/verify-cache' into lash/bloxberg-seeding"
This reverts commit 99b0fb5aed, reversing
changes made to 58e766aa58.
2021-11-04 06:08:16 +01:00
nolash
99b0fb5aed Merge branch 'lash/verify-cache' into lash/bloxberg-seeding 2021-11-04 04:26:50 +01:00
nolash
29423449b7 Merge remote-tracking branch 'origin/master' into lash/verify-cache 2021-11-04 04:23:47 +01:00
nolash
58e766aa58 Remove explicit config in db migration 2021-11-04 04:18:27 +01:00
nolash
2ebcd3e3de Merge remote-tracking branch 'origin/master' into lash/bloxberg-seeding 2021-11-02 18:49:49 +01:00
nolash
c440b049cc Add config dirs 2021-11-02 16:35:44 +01:00
nolash
09034af5bc Bump cic-eth version 2021-11-02 16:03:29 +01:00
nolash
dc80bae673 Upgrade cic-eth in migrations 2021-11-02 15:31:00 +01:00
nolash
d88ae00b72 Add celery cli args with defaults from redis 2021-10-31 07:58:35 +01:00
nolash
7a366edb9d WIP rehabilitate cic-eth-inspect 2021-10-30 19:09:17 +02:00
nolash
0b912b99b6 Add role listing to cic-eth tag cli tool 2021-10-30 13:19:31 +02:00
nolash
cbd4aef004 Add action confirm on sweep script 2021-10-30 10:25:39 +02:00
nolash
6f7f91780b Add script to sweep gas from signer accounts 2021-10-30 09:02:04 +02:00
nolash
83ecdaf023 Connect token filter to tracker 2021-10-29 16:35:11 +02:00
nolash
e2ef9b43c8 Reactivate cic-eth-tasker dependency for bootstrap 2021-10-29 15:58:34 +02:00
nolash
6e58e4e4de Remove nasty residue from bootstrap 2021-10-29 14:40:06 +02:00
nolash
f46c9b0e7d Merge remote-tracking branch 'origin/master' into lash/bloxberg-seeding 2021-10-29 11:39:40 +02:00
nolash
6ca3fd55d7 Add gas cache oracle connection for erc20 2021-10-29 08:45:42 +02:00
nolash
258ed420b8 Merge branch 'lash/tmp-bloxberg-seeding' into lash/bloxberg-seeding 2021-10-29 07:35:08 +02:00
nolash
1c022e9853 Added changes to wrong branch 2021-10-29 07:33:38 +02:00
nolash
d35e144723 Register gas cache only for registered tokens 2021-10-29 07:00:25 +02:00
nolash
fb953d0318 Add gas cache backend, test, filter 2021-10-28 21:45:47 +02:00
nolash
858bbdb69a Merge remote-tracking branch 'origin/master' into lash/local-dev-improve 2021-10-28 14:36:45 +02:00
nolash
66e23e4e20 Test config cleanup 2021-10-28 14:11:11 +02:00
nolash
546256c86a Better gas gifting amounts and thresholds estimation, fix broken cic-eth imports 2021-10-28 13:34:39 +02:00
nolash
d9720bd0aa Merge remote-tracking branch 'origin/lash/local-dev-improve' into lash/bloxberg-seeding 2021-10-28 05:41:27 +02:00
nolash
e9e9f66d97 Correct wrong change for docker registries 2021-10-28 05:39:44 +02:00
nolash
0d640fab57 Merge remote-tracking branch 'origin/lash/local-dev-improve' into lash/bloxberg-seeding 2021-10-28 05:29:07 +02:00
nolash
4ce85bc824 Remove faulty default registry in dockerfiles 2021-10-28 05:27:13 +02:00
nolash
ce67f83457 Remove faulty default registry in docker compose 2021-10-28 05:24:11 +02:00
nolash
13f2e17931 Remove accidental 0 value override for syncer offset to trackers 2021-10-28 05:18:54 +02:00
nolash
f236234682 Merge remote-tracking branch 'origin/master' into lash/local-dev-improve 2021-10-27 16:58:38 +02:00
nolash
1f37632f0f WIP Replace env vars in data-seeding with well-known 2021-10-27 16:56:03 +02:00
nolash
03d7518f8c Merge branch 'lash/local-dev-improve' of gitlab.com:grassrootseconomics/cic-internal-integration into lash/local-dev-improve 2021-10-27 11:52:31 +02:00
nolash
67152d0df1 Replace KEYSTORE_PATH with WALLET_KEY_FILE in data seeding 2021-10-27 11:51:20 +02:00
9168322941 Revert base image changes. 2021-10-27 12:41:35 +03:00
2fbd338e24 Adds correct base image. 2021-10-27 11:44:23 +03:00
c7d7f2a64d Remove force reset. 2021-10-27 11:44:08 +03:00
16153df2f0 Resolve creation of phone dir when it already exists. 2021-10-27 11:43:35 +03:00
nolash
4391fa3aff Merge remote-tracking branch 'origin/master' into lash/local-dev-improve 2021-10-25 21:01:27 +02:00
nolash
7ce68021bd Merge remote-tracking branch 'origin/master' into lash/verify-cache 2021-10-25 20:20:40 +02:00
nolash
cd602dee49 Remove WIP docker compose file 2021-10-25 20:12:32 +02:00
nolash
a548ba6fce Chainlib upgrade to handle none receipts, rpc node debug output in bootstrap 2021-10-25 20:09:35 +02:00
nolash
a6de7e9fe0 Merge remote-tracking branch 'origin/master' into lash/local-dev-improve 2021-10-20 20:02:19 +02:00
nolash
e705a94873 Resolve notify/ussd dependency conflict 2021-10-20 10:07:19 +02:00
nolash
3923de0a81 Update pip args handling in notify 2021-10-19 23:01:55 +02:00
nolash
5c0250b5b9 Rehabilitate cic-cache db migration 2021-10-19 22:58:10 +02:00
nolash
3285d8dfe5 Implement asynchronous deploys in bootstrap 2021-10-19 22:08:17 +02:00
nolash
9d349f1579 Add debug level env var to bootstrap dev container 2021-10-19 19:54:59 +02:00
nolash
837a1770d1 Upgrade deps more chainlib in bootstrap 2021-10-19 10:10:39 +02:00
003febec9d Bumps contract migration deps. 2021-10-19 10:38:21 +03:00
f066a32ce8 Adds libffi-dev for local git-tea. 2021-10-19 10:38:08 +03:00
nolash
ad493705ad Upgrade deps 2021-10-18 17:16:28 +02:00
nolash
b765c4ab88 More wrestling with chainlib-eth deps 2021-10-18 17:06:31 +02:00
nolash
e4935d3b58 Merge branch 'lash/split-migration' of gitlab.com:grassrootseconomics/cic-internal-integration into lash/split-migration 2021-10-18 16:49:58 +02:00
nolash
f88f0e321b Upgrade chainlib-eth dep 2021-10-18 16:48:14 +02:00
31fa721397 Add cic-notify container 2021-10-18 17:17:53 +03:00
16481da193 Merge remote-tracking branch 'origin/lash/split-migration' into lash/split-migration 2021-10-18 16:54:23 +03:00
97a48cd8c6 Improves ussd deps. 2021-10-18 16:53:38 +03:00
nolash
7732412341 Merge branch 'lash/split-migration' of gitlab.com:grassrootseconomics/cic-internal-integration into lash/split-migration 2021-10-18 15:51:38 +02:00
nolash
649b124a61 Ugprade chainqueue dep 2021-10-18 15:50:45 +02:00
7601e3eeff Corrects breakages in cic-ussd 2021-10-18 15:19:32 +03:00
60a9efc88b Merge remote-tracking branch 'origin/lash/split-migration' into lash/split-migration 2021-10-18 15:18:33 +03:00
45011b58c4 Cleans up configs. 2021-10-18 15:11:31 +03:00
nolash
f1a0b4ee7c Merge branch 'lash/split-migration' of gitlab.com:grassrootseconomics/cic-internal-integration into lash/split-migration 2021-10-18 14:10:52 +02:00
nolash
c57abb7ad5 Upgrade deps in cic-eth, allow for new chain spec format 2021-10-18 14:08:39 +02:00
930a99c974 Bumps cic-types version. 2021-10-18 06:52:49 +03:00
b0935caab8 Fixes imports. 2021-10-18 06:52:28 +03:00
nolash
bdd5f6fcec Update readme in data seeding 2021-10-17 19:37:29 +02:00
nolash
a293c2460e Consolidate dir handling in data seeding scripts 2021-10-17 19:27:15 +02:00
nolash
0ee6400d7d WIP rehabilitate ussd builds 2021-10-17 18:32:08 +02:00
nolash
677fb346fd Add data seeding preparation step, rehabilitation of non-custodial seeding 2021-10-17 18:05:00 +02:00
nolash
ea3c75e755 Rehabilitate traffic script 2021-10-17 14:30:42 +02:00
nolash
0b2f22c416 Rehabilitate cic-user-server 2021-10-16 20:54:41 +02:00
nolash
24385ea27d Rehabilitate cic-cache 2021-10-16 14:03:05 +02:00
nolash
9a154a8046 WIP rehabilitate cic-cache 2021-10-16 08:23:32 +02:00
nolash
d3576c8ec7 Add eth retrier to new docker compose file 2021-10-16 07:08:44 +02:00
nolash
79ee2bf4ff Add eth tracker, dispatcher to new docker compose file 2021-10-16 07:04:19 +02:00
nolash
89ac70371a Remove single function worker in test 2021-10-16 00:18:08 +02:00
nolash
5ea0318b0b Fix default token symbol config setting for aux 2021-10-15 23:21:57 +02:00
nolash
5dfb96ec0c Add new cic-signer app 2021-10-15 23:11:00 +02:00
nolash
4634ac41df Merge remote-tracking branch 'origin/master' into lash/split-migration 2021-10-15 22:19:01 +02:00
nolash
97f4fe8ca7 refactor docker-compose cic-eth-tasker, bootstrap (aka contract migration) 2021-10-15 22:16:45 +02:00
nolash
b36529f7fa WIP local docker registry adaptations 2021-10-15 20:27:03 +02:00
nolash
a6675f2348 Add environment sourcing for cic-eth-tasker docker compose 2021-10-15 18:52:37 +02:00
nolash
e3116d74d6 No export 2021-10-15 12:54:16 +02:00
nolash
c0bbdc9bec Add missing file 2021-10-15 08:43:04 +02:00
nolash
396bd4f300 update preliminary readme 2021-10-15 08:38:01 +02:00
nolash
58547b4067 Bump cic-eth-registry 2021-10-15 07:44:50 +02:00
nolash
9009815d78 Add trust address to contract migration config, get cic-eth default token from registry 2021-10-14 21:31:04 +02:00
nolash
2da19f5819 Add basic connectivity config directives 2021-10-14 17:40:53 +02:00
nolash
3948d5aa40 Add custodial initialization 2021-10-14 17:18:49 +02:00
nolash
ed432abb23 WIP refactor custodial initialization 2021-10-14 14:37:48 +02:00
nolash
f251b8b729 Remove dead code 2021-10-14 11:35:08 +02:00
nolash
36e791e08a Split contract migration into three separate steps 2021-10-14 11:33:50 +02:00
nolash
71a7e3d3d5 Reinstate test config dir 2021-10-09 17:23:38 +02:00
nolash
335b7b30a4 Add okota dep 2021-10-09 16:40:28 +02:00
nolash
3b1f470ddf Add empty config dir 2021-10-09 16:33:40 +02:00
nolash
4c9f20aa7f Add explicit zero length tx lsit check for cic-cache verify 2021-10-08 11:26:09 +02:00
nolash
980191be4f Add verify check for cache, use chainlib cli for cic-cache 2021-10-08 11:19:21 +02:00
6 changed files with 42 additions and 104 deletions

View File

@@ -1,6 +1,4 @@
# Code of Conduct
By contributing toward this project you agree to the following code of conduct
# Contributor Covenant Code of Conduct
## Our Pledge
@@ -16,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
@@ -57,7 +55,7 @@ a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at info@grassecon.org . All
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -77,8 +75,9 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
...Try to keep in mind the immortal
words of Bill and Ted, "Be excellent to each other."
These documents are licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) https://creativecommons.org/licenses/by-sa/4.0/
And further any software Grassrotos Economics supports is under licenced under GNU GENERAL PUBLIC LICENSE Version 3 https://www.gnu.org/licenses/

View File

@@ -1,66 +1,16 @@
# Contribution Guidelines
Hello and welcome to the CIC Stack repository. Targeted for use with the ethereum virtual machine and a ussd capable telecom provider.
**Karibu sana!** Hello and welcome to the Grassroots Economics [project](https://gitlab.com/grassrootseconomics). This guide will help you understand the overall
organization of the CIC project to get you started with contributing to the project. You'll be able to pick up issues, write code to fix them, and get your work reviewed and merged.
__To request a change to the code please fork this repository and sumbit a merge request.__
## Table of Contents
__If there is a Grassroots Economics Kanban Issue please include that in our MR it will help us track contributions. Karibu sana!__
- [Prerequisites](#Prerequisites)
- [Scope of contributions](#Scope-of-contributions)
- [Issues](#Issues)
- [Bugs](#Bugs)
- [Good first issues](#Good-first-issues)
- [Git guidelines](#Git-guidelines)
- [Merge request processs](#Merge-request-processs)
- [Environment setup](#Environment-setup)
- [Code style](#Code-style)
- [Building-and-testing](#Building-and-testing)
__Visit the Development Kanban board here: https://gitlab.com/grassrootseconomics/cic-internal-integration/-/boards/2419764__
## Prerequisites
__Ask a question in our dev chat:__
Before contributing to the CIC Stack, ensure you have:
[Mattermost](https://chat.grassrootseconomics.net/cic/channels/dev)
- Read and accepted to abide by the Code of Conduct
<!-- TODO: Add link to CoC -->
- Read and accepted the Developers Certificate of Origin
<!-- TODO: Add link to DCO -->
[Discord](https://discord.gg/XWunwAsX)
## Scope of contributions
[Matrix, IRC soon?]
We generally welcome all sorts or contributions. No contribution is too small. We gladly accept contributions such as:
- Documentation improvements including inline documentation or even minor typos
- Answering questions in issue discussions and pull requests
- Fixing known bugs on our issue tracker
- Reporting unknown bugs
<!-- TODO: Add resposible disclosure guidelines -->
- Securty issues through responsible disclosure
## Issues
Use the existing issue template and issue tags to correctly catagorize and issue when creating issues. Make sure to search for duplicated before creating a new issue.
### Bugs
If a bug is encountered and you can reproduce it:
- Define its priority with an issue tag
- Describe the steps to reproduce it while providing the version of the bugged service/library and your environment setup
### Good first issues
These are pre-tagged issues which are friendly (low barrier to entry and clearly defined tasks) for new contributors to get aquinted to the project.
## Git guideleines
<!-- TODO: Review after finalzing branching or forking model -->
## Merge request process
<!-- TODO: Review after core_contrib -->
## Environment setup
## Code style
## Building and testing

View File

@@ -1,24 +1,19 @@
## Community Inclusion Currency Stack (CIC Stack)
# Community Inclusion Currency Stack (CIC Stack)
A custodial wallet and blockchain bidirectional interface engine for community inclusion currencies. Check the [CIC Stack summary](https://docs.grassecon.org/software) page for more information.
A custodial evm wallet for executing transactions via USSD
### Contributing
## Getting started
See our [contribution guidelines](https://docs.grassecon.org/community/contrib/) for more details on:
This repo uses docker-compose and docker buildkit. Set the following environment variables to get started:
- Environment setup
- Source Code Management (SCM) guidelines
- Filing issues
```
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
```
#### Code of Conduct
To get started see [./apps/contract-migration/README.md](./apps/contract-migration/README.md)
This project is released with a [Code of Conduct](https://docs.grassecon.org/community/conduct/). By participating in this project you agree to abide by its terms.
## Documentation
### Community
[https://docs.grassecon.org/cic_stack/](https://docs.grassecon.org/cic_stack/)
- [Mattermost](https://chat.grassrootseconomics.net/cic/channels/dev)
- [Discord](https://discord.gg/ud32KMgH76)
### License
Licensed under [GNU AGPLv3](https://gitlab.com/grassrootseconomics/cic-internal-integration/-/blob/master/LICENSE).

View File

@@ -515,7 +515,7 @@ class Api(ApiBase):
:param password: Password to encode the password with in the backend (careful, you will have to remember it)
:type password: str
:param register: Register the new account in accounts index backend
:type register: bool
:type password: bool
:returns: uuid of root task
:rtype: celery.Task
"""

View File

@@ -395,8 +395,6 @@ def cache_transfer_data(
sender_address = tx_normalize.wallet_address(tx['from'])
recipient_address = tx_normalize.wallet_address(tx_data[0])
token_value = tx_data[1]
source_token_address = tx_normalize.executable_address(tx['to'])
destination_token_address = source_token_address
session = SessionBase.create_session()
@@ -404,8 +402,8 @@ def cache_transfer_data(
'hash': tx_hash_hex,
'from': sender_address,
'to': recipient_address,
'source_token': source_token_address,
'destination_token': destination_token_address,
'source_token': tx['to'],
'destination_token': tx['to'],
'from_value': token_value,
'to_value': token_value,
}
@@ -437,16 +435,14 @@ def cache_transfer_from_data(
spender_address = tx_data[0]
recipient_address = tx_data[1]
token_value = tx_data[2]
source_token_address = tx_normalize.executable_address(tx['to'])
destination_token_address = source_token_address
session = SessionBase.create_session()
tx_dict = {
'hash': tx_hash_hex,
'from': tx['from'],
'to': recipient_address,
'source_token': source_token_address,
'destination_token': destination_token_address,
'source_token': tx['to'],
'destination_token': tx['to'],
'from_value': token_value,
'to_value': token_value,
}
@@ -478,16 +474,14 @@ def cache_approve_data(
sender_address = tx_normalize.wallet_address(tx['from'])
recipient_address = tx_normalize.wallet_address(tx_data[0])
token_value = tx_data[1]
source_token_address = tx_normalize.executable_address(tx['to'])
destination_token_address = source_token_address
session = SessionBase.create_session()
tx_dict = {
'hash': tx_hash_hex,
'from': sender_address,
'to': recipient_address,
'source_token': source_token_address,
'destination_token': destination_token_address,
'source_token': tx['to'],
'destination_token': tx['to'],
'from_value': token_value,
'to_value': token_value,
}

View File

@@ -72,7 +72,7 @@ def __balance_incoming_compatible(token_address, receiver_address):
status_compare = dead()
q = q.filter(Otx.status.op('&')(status_compare)==0)
# TODO: this can change the result for the recipient if tx is later obsoleted and resubmission is delayed.
#q = q.filter(Otx.status.op('&')(StatusBits.IN_NETWORK)==StatusBits.IN_NETWORK)
q = q.filter(Otx.status.op('&')(StatusBits.IN_NETWORK)==StatusBits.IN_NETWORK)
q = q.filter(TxCache.destination_token_address==token_address)
delta = 0
for r in q.all():