Skip to content

Commit

Permalink
feature: protocol release
Browse files Browse the repository at this point in the history
semver: v0.1.0+alpha
relay swap protocol
licensed under Mozilla Public License 2.0
  • Loading branch information
sam committed Aug 9, 2020
1 parent de0587e commit 19db691
Show file tree
Hide file tree
Showing 316 changed files with 315,304 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
git-legal:
enabled: true
config:
# eg. Affero GPL
allow_affero_copyleft: false
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
};
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig http://EditorConfig.org

# top-most EditorConfig file
root = true

# All files
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.sol]
indent_size = 4
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ETHERSCAN_API_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
INFURA_API_KEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
MNEMONIC=here is where your twelve words mnemonic should be put my friend
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# folders
artifacts/
build/
cache/
coverage/
dist/
lib/
node_modules/
typechain/

# files
.solcover.js
coverage.json
21 changes: 21 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- prettier/@typescript-eslint
parser: "@typescript-eslint/parser"
parserOptions:
project: tsconfig.json
plugins:
- "@typescript-eslint"
root: true
rules:
"@typescript-eslint/no-floating-promises":
- error
- ignoreIIFE: true
ignoreVoid: true
"@typescript-eslint/no-inferrable-types": "off"
"@typescript-eslint/no-unused-vars":
- error
- argsIgnorePattern: _
varsIgnorePattern: _
124 changes: 124 additions & 0 deletions .github/CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Freight Trust CLA

> By signing this contributor license agreement, I understand and agree that
> this project and contributions to it are public and that a record of the
> contribution (including all personal information I submit with it, including
> my full name and email address) is maintained indefinitely and may be
> redistributed consistent with this project, compliance with the open source
> license(s) involved, and maintenance of authorship attribution.
The information you provide below, along with your IP address and a timestamp,
will be maintained in accordance with Freight Trust's privacy policy.

You agree that the following terms apply to all of your past, present and future
Contributions. Except for the licenses granted in this Agreement, you retain all
of your right, title and interest in and to your Contributions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by
the copyright owner that is making this Agreement with Freight Trust. For legal
entities, the entity making a Contribution and all other entities that control,
are controlled by, or are under common control with that entity are considered
to be a single Contributor. For the purposes of this definition, "control" means

- (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or
- (ii) ownership of fifty percent (50%) or more of the outstanding shares, or
- (iii) beneficial ownership of such entity.

"Contribution" shall mean any original work of authorship, including any
modifications or additions to an existing work, that is intentionally submitted
by You to Freight Trust for inclusion in, or documentation of, any of the
products owned or managed by Freight Trust (the "Work"). For the purposes of
this definition, "submitted" means any form of electronic, verbal, or written
communication sent to Freight Trust or its representatives, including but not
limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of,
Freight Trust for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise designated in
writing by You as "Not a Contribution."

**Grant of Copyright License**. Subject to the terms and conditions of this
Agreement, You hereby grant to Freight Trust and to recipients of software
distributed by Freight Trust a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare derivative
works of, publicly display, publicly perform, sublicense, and distribute Your
Contributions and such derivative works.

**Grant of Patent License**. Subject to the terms and conditions of this
Agreement, You hereby grant to Freight Trust and to recipients of software
distributed by Freight Trust a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent license to
make, have made, use, offer to sell, sell, import, and otherwise transfer the
Work, where such license applies only to those patent claims licensable by You
that are necessarily infringed by Your Contribution(s) alone or by combination
of Your Contribution(s) with the Work to which such Contribution(s) was
submitted. If any entity institutes patent litigation against You or any other
entity (including a cross-claim or counterclaim in a lawsuit) alleging that your
Contribution, or the Work to which you have contributed, constitutes direct or
contributory patent infringement, then any patent licenses granted to that
entity under this Agreement for that Contribution or Work shall terminate as of
the date such litigation is filed. You represent that you are legally entitled
to grant the above license.

**Moral Rights.** To the fullest extent permitted under applicable law, you
hereby waive, and agree not to assert, all of your "moral rights" in or relating
to your Contributions for the benefit of Freight Trust, its assigns, and their
respective direct and indirect sublicensees.

**Third Party Content/Rights.** If your Contribution includes or is based on any
source code, object code, bug fixes, configuration changes, tools,
specifications, documentation, data, materials, feedback, information or other
works of authorship that were not authored by you ("Third Party Content") or if
you are aware of any third party intellectual property or proprietary rights
associated with your Contribution ("Third Party Rights"), then you agree to
include with the submission of your Contribution full details respecting such
Third Party Content and Third Party Rights, including, without limitation,
identification of which aspects of your Contribution contain Third Party Content
or are associated with Third Party Rights, the owner/author of the Third Party
Content and Third Party Rights, where you obtained the Third Party Content, and
any applicable third party license terms or restrictions respecting the Third
Party Content and Third Party Rights. For greater certainty, the foregoing
obligations respecting the identification of Third Party Content and Third Party
Rights do not apply to any portion of a Project that is incorporated into your
Contribution to that same Project.

**Representations.** You represent that, other than the Third Party Content and
Third Party Rights identified by you in accordance with this Agreement, you are
the sole author of your Contributions and are legally entitled to grant the
foregoing licenses and waivers in respect of your Contributions. If your
Contributions were created in the course of your employment with your past or
present employer(s), you represent that such employer(s) has authorized you to
make your Contributions on behalf of such employer(s) or such employer (s) has
waived all of their right, title or interest in or to your Contributions. If
your employer(s) has rights to intellectual property that you create that
includes your Contributions, you represent that you have received permission to
make Contributions on behalf of that employer, that your employer has waived
such rights for your Contributions to Freight Trust, or that your employer has
executed a separate Corporate CLA with Freight Trust.

**Disclaimer.** To the fullest extent permitted under applicable law, your
Contributions are provided on an "as is" basis, without any warranties or
conditions, express or implied, including, without limitation, any implied
warranties or conditions of non-infringement, merchantability or fitness for a
particular purpose. You are not required to provide support for your
Contributions, except to the extent you desire to provide support.

**No Obligation.** You acknowledge that Freight Trust is under no obligation to
use or incorporate your Contributions into any of the Projects. The decision to
use or incorporate your Contributions into any of the Projects will be made at
the sole discretion of Freight Trust or its authorized delegates ..

**Disputes.** This Agreement shall be governed by and construed in accordance
with the laws of the State of Delaware, United States of America, without giving
effect to its principles or rules regarding conflicts of laws, other than such
principles directing application of Delaware law. The parties hereby submit to
venue in, and jurisdiction of the courts located in Delaware, Delaware for
purposes relating to this Agreement. In the event that any of the provisions of
this Agreement shall be held by a court or other tribunal of competent
jurisdiction to be unenforceable, the remaining portions hereof shall remain in
full force and effect.

**Assignment.** You agree that Freight Trust may assign this Agreement, and all
of its rights, obligations and licenses hereunder

You agree to notify Freight Trust of any facts or circumstances of which you
become aware that would make these representations inaccurate in any respect.
37 changes: 37 additions & 0 deletions .github/COMMUNITY_GUIDELINES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Freight Trust Open Source Community Guidelines

We encourage respectful behavior, this includes:

- Being considerate, constructive, and helpful.
- Not engaging in discriminatory, harassing, hateful, sexualized, or physically
threatening behavior, speech, and imagery.
- Not engaging in unwanted physical contact.

## Resolve peacefully

We do not believe that all conflict is necessarily bad; healthy debate and
disagreement often yields positive results.

If you see someone behaving disrespectfully, you are encouraged to address the
behavior directly with those involved. Many issues can be resolved quickly and
easily, and this gives people more control over the outcome of their dispute. If
you are unable to resolve the matter for any reason, or if the behavior is
threatening or harassing, report it.

## Reporting problems

Some Freight Trust open source projects may adopt a project-specific code of
conduct. In those cases, a Freight Trust employee will be identified as the
Project Steward, who will receive and handle reports of code of conduct
violations. In the event that a project hasn’t identified a Project Steward, you
can report problems by emailing [email protected].

We may or mat not investigate every complaint, and you may not receive a direct
response. We will use our discretion in determining when and how to follow up on
reported incidents, which may range from not taking action to permanent
expulsion from the project and project-sponsored spaces. We will notify the
accused of the report and provide them an opportunity to discuss it before any
action is taken. The identity of the reporter will be omitted from the details
of the report supplied to the accused. In potentially harmful situations, such
as ongoing harassment or threats to anyone's safety, we may take action without
notice.
94 changes: 94 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<!-- SPD-License-Identifer: ${#LICENSE} -->
<!-- COPYRIGHT 2020 - FREIGHTTRUST AND CLEARING CORPORATION, ALL RIGHTS RESERVED -->

# Contributing

> This document is inspired by
> [elasticsearch/CONTRIBUTING.md](https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md)
Adding a `CONTRIBUTING.md` to a Github repository enables a link to that file in
the pull request or create an issue page. This document should guide potential
contributors toward making a successful and meaningful impact on the project,
and can save maintainers time and hassle caused by improper pull requests and
issues. You can learn more about the features that are enabled by Github when
this file is present
[here](https://help.github.com/articles/setting-guidelines-for-repository-contributors/).

## How to contribute

There are many ways to contribute, from writing tutorials or blog posts,
improving the documentation,
[submitting Github issues](https://help.github.com/articles/creating-an-issue/),
bug reports, feature requests and writing code.

## License

Please [SEE LICENSE](#LICENSE)

## Bug reports

If you think you've found a bug in the software, first make sure you're testing
against the _latest_ version of the software -- your issue may have been fixed
already. If it's not, please check out the issues list on Github and search for
similar issues that have already been opened. If there are no issues then please
[submit a Github issue](https://help.github.com/articles/creating-an-issue/).

If you can provide a small test case it would greatly help the reproduction of a
bug, as well as a a screenshot, and any other information you can provide.

## Feature Requests

If there are features that do not exist yet, we are definitely open to feature
requests and detailed proposals.
[Open an issue](https://help.github.com/articles/creating-an-issue/) on our
Github which describes the feature or proposal in detail, answer questions like
why? how?

## Contributing Code and Documentation Changes

Bug fixes, patches and new features are welcome. Please find or open an issue
about it first. Talk about what exactly want to do, someone may already be
working on it, or there might be some issues that you need to be aware of before
implementing the fix.

There are many ways to fix a problem and it is important to find the best
approach before writing a ton of code.

##### Documentation Changes

For small documentation changes and fixes, these can be done quickly following
this video guide on
[how to contribute to Open Source in 1 minute on Github](https://www.youtube.com/watch?v=kRYk1-yKwWs).

### Forking the repository

[How to fork a repository](https://help.github.com/articles/fork-a-repo/).

### Submitting changes

1. Review & Test changes
- If the code changed, then test it. If documentation changed, then preview
the rendered Markdown.
2. Commiting
- Follow the [Conventional Commits](CONVENTIONAL_COMMITS.md) guidelines to
create a commit message.
3. Sign the CLA
- Make sure you've signed the repository's Contributor License Agreement. We
are not asking you to assign copyright to us, but to give us the right to
distribute your code without restriction. We ask this of all contributors
in order to assure our users of the origin and continuing existence of the
code. You only need to sign the CLA once.
4. Submit a pull request
- Push local changes to your forked repository and make a pull request.
Follow the [Convention Commits](CONVENTIONAL_COMMITS.md) guidelines for
naming Github pull requests and what to put in the body.

## Building

Follow the build process is outlined in [BUILDING.md](BUILDING.md) to create a
build.

## Releasing

Follow the release process is outlined in [RELEASING.md](RELEASING.md) to create
a release.
Empty file.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce** Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior** A clear and concise description of what you expected to
happen.

**Screenshots** If applicable, add screenshots to help explain your problem.

**Additional context** Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.** A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like** A clear and concise description of what you
want to happen.

**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.

**Additional context** Add any other context or screenshots about the feature
request here.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Closes #

{{short description}}

#### Changelog

**New**

- {{new thing}}

**Changed**

- {{change thing}}

**Removed**

- {{removed thing}}
Loading

0 comments on commit 19db691

Please sign in to comment.