Compare commits
101 Commits
sohail/con
...
lash/bloxb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ca865e946 | ||
|
|
6b3699471b | ||
|
|
99b0fb5aed | ||
|
|
29423449b7 | ||
|
|
58e766aa58
|
||
|
|
2ebcd3e3de | ||
|
|
c440b049cc
|
||
|
|
09034af5bc
|
||
|
|
dc80bae673
|
||
|
|
d88ae00b72
|
||
|
|
7a366edb9d
|
||
|
|
0b912b99b6
|
||
|
|
cbd4aef004
|
||
|
|
6f7f91780b
|
||
|
|
83ecdaf023
|
||
|
|
e2ef9b43c8
|
||
|
|
6e58e4e4de
|
||
|
|
f46c9b0e7d | ||
|
|
6ca3fd55d7
|
||
|
|
258ed420b8 | ||
|
|
1c022e9853
|
||
|
|
d35e144723
|
||
|
|
fb953d0318
|
||
|
|
858bbdb69a | ||
|
|
66e23e4e20
|
||
|
|
546256c86a
|
||
|
|
d9720bd0aa | ||
|
|
e9e9f66d97
|
||
|
|
0d640fab57 | ||
|
|
4ce85bc824
|
||
|
|
ce67f83457
|
||
|
|
13f2e17931
|
||
|
|
f236234682 | ||
|
|
1f37632f0f
|
||
|
|
03d7518f8c | ||
|
|
67152d0df1
|
||
|
9168322941
|
|||
|
2fbd338e24
|
|||
|
c7d7f2a64d
|
|||
|
16153df2f0
|
|||
|
|
4391fa3aff | ||
|
|
7ce68021bd | ||
|
|
cd602dee49
|
||
|
|
a548ba6fce
|
||
|
|
a6de7e9fe0 | ||
|
|
e705a94873
|
||
|
|
3923de0a81
|
||
|
|
5c0250b5b9
|
||
|
|
3285d8dfe5
|
||
|
|
9d349f1579
|
||
|
|
837a1770d1
|
||
|
003febec9d
|
|||
|
f066a32ce8
|
|||
|
|
ad493705ad
|
||
|
|
b765c4ab88
|
||
|
|
e4935d3b58 | ||
|
|
f88f0e321b
|
||
|
31fa721397
|
|||
|
16481da193
|
|||
|
97a48cd8c6
|
|||
|
|
7732412341 | ||
|
|
649b124a61
|
||
|
7601e3eeff
|
|||
|
60a9efc88b
|
|||
|
45011b58c4
|
|||
|
|
f1a0b4ee7c | ||
|
|
c57abb7ad5
|
||
|
930a99c974
|
|||
|
b0935caab8
|
|||
|
|
bdd5f6fcec
|
||
|
|
a293c2460e
|
||
|
|
0ee6400d7d
|
||
|
|
677fb346fd
|
||
|
|
ea3c75e755
|
||
|
|
0b2f22c416
|
||
|
|
24385ea27d
|
||
|
|
9a154a8046
|
||
|
|
d3576c8ec7
|
||
|
|
79ee2bf4ff
|
||
|
|
89ac70371a
|
||
|
|
5ea0318b0b
|
||
|
|
5dfb96ec0c
|
||
|
|
4634ac41df | ||
|
|
97f4fe8ca7
|
||
|
|
b36529f7fa
|
||
|
|
a6675f2348
|
||
|
|
e3116d74d6
|
||
|
|
c0bbdc9bec
|
||
|
|
396bd4f300
|
||
|
|
58547b4067
|
||
|
|
9009815d78
|
||
|
|
2da19f5819
|
||
|
|
3948d5aa40
|
||
|
|
ed432abb23
|
||
|
|
f251b8b729
|
||
|
|
36e791e08a
|
||
|
|
71a7e3d3d5
|
||
|
|
335b7b30a4
|
||
|
|
3b1f470ddf
|
||
|
|
4c9f20aa7f
|
||
|
|
980191be4f
|
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
27
README.md
27
README.md
@@ -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).
|
||||
|
||||
@@ -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
|
||||
"""
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user