Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Origins Sale #23

Open
wants to merge 88 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
7294e45
Contracts rearranged
remedcu Nov 1, 2021
991bd3a
Unique Wallets Counter also added
remedcu Nov 1, 2021
1d27e0c
Formatting changes done
remedcu Nov 1, 2021
b1d657b
User Stake Verification Developed
remedcu Nov 15, 2021
39ab265
Formatting Done
remedcu Nov 15, 2021
3bc4a46
Updated README
remedcu Nov 15, 2021
7cacfe5
Pool Based System Developed
remedcu Nov 15, 2021
17e9a83
Formatting Changes
remedcu Nov 15, 2021
6eb0f87
New Vesting Integration with Locked Fund Developed
remedcu Nov 22, 2021
d633371
Formatting Changes
remedcu Nov 22, 2021
826d715
Replaced TODOs, Added Events, Rectified Test
remedcu Nov 26, 2021
5ad3de2
Formatting Changes
remedcu Nov 26, 2021
d379822
Rectified Contract and Test for N based Transfer Types
remedcu Nov 26, 2021
64da4e5
Formatting Changes
remedcu Nov 26, 2021
696e5e4
Updated & Included Sovryn SC
remedcu Nov 26, 2021
69cd2b7
Formatting Changes
remedcu Nov 26, 2021
5169a87
Removed FeeSharing and Replaced with Governor Vault
remedcu Nov 28, 2021
32f901e
Updated the Origins Scripts
remedcu Nov 28, 2021
0796f57
Updated the Token Scripts
remedcu Nov 28, 2021
3899c02
Custom Scripts Added
remedcu Nov 28, 2021
3fe3e07
Formatting Changes
remedcu Nov 28, 2021
364f125
Automated Documentation and UML Updated
remedcu Nov 28, 2021
7f04fc4
Scripts Improved and Testnet Contracts Deployed
remedcu Nov 28, 2021
3be4896
Formatting Changes
remedcu Nov 28, 2021
5d0624a
Updated the OriginsBase for accounting Total Token Allocation Per Tier
remedcu Nov 30, 2021
e5c8022
Deploy Origins Script Improved
remedcu Nov 30, 2021
7ba4d4b
Origins Testnet Contracts Updated
remedcu Nov 30, 2021
3705a3b
Formatting Changes
remedcu Nov 30, 2021
6ad7c25
Updated the deployLockedFund script
remedcu Dec 3, 2021
3378dda
Added LICENSE
remedcu Dec 3, 2021
75d78d8
Added Code of Conduct
remedcu Dec 3, 2021
e8745c1
Added Contributing Instruction
remedcu Dec 3, 2021
55a6b14
Code of Conduct Updated
remedcu Dec 3, 2021
e5c213e
LockedFund Interface and Contract Updated with parameter specification
remedcu Dec 7, 2021
c8d1bb8
Vesting Creator addVesting extra check for creation type added
remedcu Dec 7, 2021
625f19c
Improved callgraph
remedcu Dec 7, 2021
0d58f08
Improved Inheritance image
remedcu Dec 7, 2021
cd54f65
Updated the slither analyzer in requirements
remedcu Dec 7, 2021
4a486b2
Updated the main README
remedcu Dec 7, 2021
454c193
MissingBalanceDeposited event updated
remedcu Dec 8, 2021
5242252
Updated setTierTokenAmount internal function
remedcu Dec 8, 2021
67c0507
Updated setTierTokenAmount internal function calculation
remedcu Dec 8, 2021
af5d6b5
Sale Allowed made as view function and closeSaleOf function introduced
remedcu Dec 8, 2021
a5d1e4f
checkStakesByTier updated
remedcu Dec 8, 2021
5d1b19a
Natspec of _updateWalletCount Updated
remedcu Dec 8, 2021
0ccb7b7
_claimPooled check increased
remedcu Dec 8, 2021
c3c843a
VestingData struct usage improved
remedcu Dec 8, 2021
70d811e
_createVesting gas usage optimized
remedcu Dec 8, 2021
f045b1a
Vesting Exist Loop slightly optimized
remedcu Dec 8, 2021
9c7c4c2
Internal func to check user vesting introduced and optimized _deposit…
remedcu Dec 8, 2021
1e0cb03
Formatting Changes
remedcu Dec 8, 2021
41d4ef7
_checkVerification updated
remedcu Dec 8, 2021
d9c3e60
Natspec of _getVesting Updated
remedcu Dec 8, 2021
3a11023
vestingAddresses returned in _createVesting
remedcu Dec 8, 2021
fc5d98d
_depositMissingBalance calculation improved
remedcu Dec 8, 2021
c47466e
Added isContract checks for vesting and token addresses
remedcu Dec 8, 2021
2440089
Formatting changes
remedcu Dec 8, 2021
43c2bdd
Added return for checkStakesByTier
remedcu Dec 8, 2021
3546717
Governor Alpha NAME changed
remedcu Dec 10, 2021
4739c32
Governor Alpha NAME Updated
remedcu Dec 17, 2021
8fa3691
Custom Deployment script of OG updated
remedcu Dec 17, 2021
542bc33
Custom Deployment script values of OG Updated
remedcu Dec 17, 2021
9a40a24
Using SafeERC20 in LockedFund
remedcu Dec 17, 2021
0f1b7d8
Using SafeERC20 in OriginsBase
remedcu Dec 17, 2021
f7da297
Formatting Changes
remedcu Dec 17, 2021
a9581e6
IVestingLogic import removed from LockedFund
remedcu Dec 17, 2021
4b7db65
Origins Token Added
remedcu Dec 17, 2021
e5a3c67
ERC20 inheritance removed from Token
remedcu Dec 17, 2021
6fa1fa0
Formatting Changes
remedcu Dec 17, 2021
f7d60f4
Token and OriginsToken tests taken from OZ
remedcu Dec 20, 2021
6a61431
Formatting Changes
remedcu Dec 20, 2021
37ca4f8
Governance Tests Added from Sovryn
remedcu Dec 20, 2021
acac426
Formatting Changes
remedcu Dec 20, 2021
68571ef
Mockup Contracts from Sovryn Added
remedcu Dec 20, 2021
7898d3f
Added utility test files
remedcu Dec 20, 2021
d50b3fe
Origins Token Constructor Updated
remedcu Dec 20, 2021
c611ee6
Timelock tests added and governor vault test renamed
remedcu Dec 20, 2021
d8c199f
Development Fund Tests Added
remedcu Dec 20, 2021
bb9c308
Multisig Tests Added
remedcu Dec 20, 2021
f465af6
Proxy Tests Added
remedcu Dec 20, 2021
8668760
Staking Tests Added
remedcu Dec 20, 2021
f57bc7c
Staking Reward Tests Added
remedcu Dec 20, 2021
4e39380
TokenSender Tests Added
remedcu Dec 20, 2021
d563bbb
Vesting Tests Added
remedcu Dec 20, 2021
5c3718f
Mockup Contracts Added
remedcu Dec 20, 2021
6116487
Reentrancy Guard Removed
remedcu Dec 20, 2021
cd90a3c
Formatting Changes
remedcu Dec 20, 2021
84af5f2
solcover Updated
remedcu Dec 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
skipFiles: ["Sovryn", "Openzeppelin", "Interfaces"],
skipFiles: ["Sovryn/Helper", "Sovryn/Mockup", "Sovryn/RSK", "Interfaces"],
};
45 changes: 45 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributor Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

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

Examples of unacceptable behavior by participants include:

- 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 address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of 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 [email protected].

All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.

The project contributors are obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project.
78 changes: 78 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributing

Help is always welcome and there are plenty of options how you can contribute to Sovryn Origins.

In particular, we appreciate support in the following areas:

- Reporting issues.
- Fixing and responding to [Sovryn Origins's GitHub issues](https://github.com/Sovryn-Origins/origins/issues)
- Improving the documentation.
- Translating the documentation into more languages.

To get started, you can try to setup the repo locally. Run the tests. Check the scripts in `development` or other local blockchain, then even on testnets. Also, it may be useful to become well-versed at writing smart-contracts in Solidity.

Please note that this project is released with a [Contributor Code of Conduct](https://raw.githubusercontent.com/Sovryn-Origins/origins/CODE_OF_CONDUCT.md). By participating in this project - in the issues, pull requests, or chat channels - you agree to abide by its terms.

# How to Report Issues

To report an issue, please use the [GitHub issues tracker](https://github.com/Sovryn-Origins/origins/issues). When reporting issues, please mention the following details:

- Function Call.
- Steps to reproduce the issue.
- Actual vs. expected behaviour.

Reducing the source code that caused the issue to a bare minimum is always very helpful and sometimes even clarifies a misunderstanding.

# Workflow for Pull Requests

In order to contribute, please fork off of the `development` branch and make your changes there. Your commit messages should detail _why_ you made your change in addition to _what_ you did (unless it is a tiny change).

Additionally, if you are writing a new feature, please ensure you add appropriate test cases in [tests](tests) as mentioned below.

However, if you are making a larger change, please consult with the [Contributors of Sovryn Origins](https://discord.gg/gjkPdRT9kA).

Also, even though we do CI testing, please test your code and
ensure that it builds locally before submitting a pull request.

Thank you for your help!

# Running the Tests

## Prerequisites

First install all the npm packages:

```
npm ci
```

## Running the Tests

To run tests written in JS:

```
npm run test
```

## Writing Tests

Tests are mainly written in JS and run using `hardhat`.

Find the appropriate folder in test to write the tests for a particular test.

For a new smart contract, tests should cover different personas, like creator, owner/admin, user, state changes, event emitted, etc.

If there is a common custom function, write it in [utils.js](tests/utils.js), and import into the required tests.

If there are constants or variables, declare them in [constants.js](tests/constants.js) & [variable.js](tests/variable.js) respectively.

Code Coverage is good, complete functionality test (unit & integration) is better.

## English Language

Use English, with British English spelling preferred, unless using project or brand names. Try to reduce the usage of
local slang and references, making your language as clear to all readers as possible. Below are some references to help:

- [Simplified technical English](https://en.wikipedia.org/wiki/Simplified_Technical_English)
- [International English](https://en.wikipedia.org/wiki/International_English)
- [British English spelling](https://en.oxforddictionaries.com/spelling/british-and-spelling)
Loading