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

Standards/explicit module exports #54

Open
wants to merge 112 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a666fe9
Init mlab repo. Setup build tools
anton-k Apr 28, 2021
829df49
Lending create draft
anton-k Apr 28, 2021
e7ed7b8
Merge pull request #1 from mlabs-haskell/ak/init-endpoint
Benjmhart Apr 28, 2021
61759ab
Adds validator for create endpoint for Lending
anton-k Apr 28, 2021
7cc8065
Mv to stack. Finish Lendex.create endpoint stub
anton-k Apr 29, 2021
0720f49
Defines test case for create of pool
anton-k Apr 29, 2021
0295145
remove redundant imports
anton-k Apr 29, 2021
497edb9
Fix creation tests
anton-k Apr 30, 2021
77c1cf6
Adds comments. Minor refactoring
anton-k May 3, 2021
d3df66e
Removes redundant imports
anton-k May 3, 2021
92447db
Init state transition sketch
anton-k May 3, 2021
125cc88
Add Bch simulation
anton-k May 3, 2021
6149a2e
Merge pull request #2 from mlabs-haskell/ak/init-endpoint
Benjmhart May 3, 2021
679c61b
Implements deposit and borrow actions
anton-k May 4, 2021
35faaf5
Implements setUserAsCollateral
anton-k May 4, 2021
af51d7a
Refactoring
anton-k May 4, 2021
030ae99
Implements repay and withdraw
anton-k May 5, 2021
a09f02d
Emulator actions refactoring
anton-k May 5, 2021
098aa5a
Adds tests for prototype
anton-k May 6, 2021
1ee777c
Fix conflicts with master
anton-k May 6, 2021
093d436
Merge pull request #3 from mlabs-haskell/ak/aave-logic
anton-k May 6, 2021
d8a0ecc
Pltusify core types for aave
anton-k May 6, 2021
74c4e9a
Makes validation script compile to PlutusCore
anton-k May 7, 2021
1e06b7c
Update tests, refactoring
anton-k May 7, 2021
b2ec300
Merge pull request #4 from mlabs-haskell/ak/plutus-for-aave
anton-k May 7, 2021
cfb8aba
Implements template for forging adn adds simple unit tests
anton-k May 7, 2021
7479dad
Struggle with single thread behavior of StateMachine. Need more refin…
anton-k May 10, 2021
2b9d3ce
implements monetary policy validation
anton-k May 12, 2021
5f1baeb
Merge pull request #5 from mlabs-haskell/ak/forge-script
anton-k May 12, 2021
216967f
Rewrite two tests to plutus unit tests
anton-k May 12, 2021
4154ded
Completes unit tests for lendex in plutus setting
anton-k May 13, 2021
6ff43a0
Removes redundant files
anton-k May 13, 2021
2d41ec2
Merge pull request #6 from mlabs-haskell/ak/plutus-unit-tests
anton-k May 13, 2021
cc16b7d
Implements first draft of interest rates (aave solution)
anton-k May 14, 2021
8092c86
Improves and fixes tests
anton-k May 14, 2021
593f3bb
A bit of refactoring
anton-k May 14, 2021
f56290f
Implement validation check for timestamps
anton-k May 14, 2021
b16b446
Check weather input is valid
anton-k May 14, 2021
53fe964
Merge pull request #7 from mlabs-haskell/ak/interest-rate
anton-k May 14, 2021
ebd8bc2
Removes some remnats
anton-k May 14, 2021
7cd5024
Removes some remnats
anton-k May 14, 2021
f6cf3ab
update prices of the currencies
anton-k May 17, 2021
eae1b48
Merge pull request #8 from mlabs-haskell/ak/update-prices
anton-k May 17, 2021
005e6d5
Merge branch 'main' of https://github.com/mlabs-haskell/plutus-use-cases
anton-k May 17, 2021
8faed6c
Implements liquidation of the borrow
anton-k May 18, 2021
3e844b3
Adds unit test for logic of borrow liquidation call
anton-k May 18, 2021
0f46ecf
Liquiadation call unit test for Contract/Plutus
anton-k May 19, 2021
3a79dad
Merge pull request #9 from mlabs-haskell/ak/borrow-liquidation
anton-k May 19, 2021
ef20fd8
draft of NFT prototype
anton-k May 20, 2021
dd40db4
Factor out State code
anton-k May 20, 2021
1046544
Implements unit tests for NFT
anton-k May 21, 2021
1020f4d
Merge pull request #10 from mlabs-haskell/nft-init
anton-k May 21, 2021
46fd92b
broken demo not compiling
Benjmhart May 21, 2021
2d94a97
Adds bindings to plutus and unit tests
anton-k May 25, 2021
313cb78
Merge pull request #15 from mlabs-haskell/ak/nft-plutus
anton-k May 25, 2021
ed0e99f
Monetary policy for NFT
anton-k May 27, 2021
c30972c
Merge pull request #16 from mlabs-haskell/ak/nft-monetary-policy
anton-k May 27, 2021
763cf89
Fix check of user-ids in the input
anton-k May 28, 2021
32f6dce
Implement trusted oracles
anton-k May 28, 2021
f8d5397
Remove some redundant stuff
anton-k May 28, 2021
95f3bd0
Merge pull request #17 from mlabs-haskell/check-uids
anton-k May 28, 2021
26fb9b3
Adds unique identifier for Lendex
anton-k May 28, 2021
876103e
Merge pull request #18 from mlabs-haskell/lendex-id
anton-k May 28, 2021
598919c
Fix collateral lock for reserve
anton-k May 28, 2021
aefa62d
Merge pull request #19 from mlabs-haskell/fix-collateral
anton-k May 28, 2021
9277ebf
Add Ray math
anton-k May 31, 2021
7c0084d
Add Pretty logger for PAB
anton-k May 31, 2021
e42142a
Demo for NFT case
anton-k Jun 1, 2021
dfc6edc
Merge pull request #21 from mlabs-haskell/nft-demo
anton-k Jun 1, 2021
0d466e5
Init lendex demo stub
anton-k Jun 1, 2021
ee0b068
switch to Rays instead of Rationals for Lendex
anton-k Jun 1, 2021
6cf62ee
Introduce admin roles for Lendex and check for them
anton-k Jun 2, 2021
0791c5c
Merge branch 'main' of github.com:mlabs-haskell/plutus-use-cases
Benjmhart Jun 2, 2021
4e40f74
Implements demo for lendex
anton-k Jun 7, 2021
e74185e
Merge pull request #22 from mlabs-haskell/lendex-demo
anton-k Jun 7, 2021
0c687a3
Merge branch 'main' of github.com:mlabs-haskell/plutus-use-cases
Benjmhart Jun 7, 2021
3ac15cd
clarify logs
Benjmhart Jun 8, 2021
840afc3
Minimal Plutus Playground frontend codegen example
Jun 11, 2021
1e49bcb
Add currency generating contract for demos
nrutledge Jun 13, 2021
9031e53
Finalize minting/burning scripts and add tests
nrutledge Jun 14, 2021
715bf20
Add standards doc from Liqwid project
nrutledge Jun 21, 2021
9e4582b
Merge pull request #26 from mlabs-haskell/demo-currency-gen
Benjmhart Jun 21, 2021
72ca738
Merge pull request #27 from mlabs-haskell/standards-document
Benjmhart Jun 21, 2021
e765abc
Update intendation, support more shells.
jozanek Jun 21, 2021
145bae6
Merge pull request #28 from mlabs-haskell/support_more_shells
Benjmhart Jun 21, 2021
b234601
Fix typo
Jun 22, 2021
2667bd9
Update intendation, support more shells.
jozanek Jun 21, 2021
5f60c00
update: added README TOC generation to makefile
cstml Jun 23, 2021
0bef02b
init: created README with initial structure
cstml Jun 23, 2021
95de4f8
update: added description to
cstml Jun 23, 2021
c59726a
Update STANDARDS doc with latest changes from Koz
nrutledge Jun 23, 2021
96227ca
Merge pull request #43 from mlabs-haskell/standards-update
nrutledge Jun 23, 2021
817d7bb
install process work
stackBlock Jun 23, 2021
6f833c3
Run HLS from nix-shell.
jozanek Jun 23, 2021
5a2b769
update: added TODO: tag + small changes
cstml Jun 24, 2021
75f029c
update: add links to specifications
cstml Jun 24, 2021
64ab8c0
update: remove typo
cstml Jun 24, 2021
bfbfa5a
Merge pull request #44 from mlabs-haskell/jozef/introduce_hls_inside_nix
Benjmhart Jun 24, 2021
cbe73e8
Merge branch 'main' into documentation
cstml Jun 24, 2021
dfc82b5
update: added tests coverage
cstml Jun 24, 2021
ee04101
update: added descriptions + reformatted a few bash entries.
cstml Jun 25, 2021
83918d1
update: added lendex-demo repl command
cstml Jun 25, 2021
7fb27c9
update: wrote down the APIs, descriptions left to do
cstml Jun 25, 2021
7369201
update: API description added
cstml Jun 28, 2021
9e89fe3
update: clean-up
cstml Jun 28, 2021
113b79d
Merge branch 'main' into documentation.
cstml Jun 28, 2021
192445c
Merge pull request #34 from mlabs-haskell/documentation
cstml Jun 29, 2021
9c0e56f
Add a simple deposit property-based test
Jun 29, 2021
e756ee2
resolving conflicts
Benjmhart Jun 30, 2021
cfb51df
resolving conflicts
Benjmhart Jun 30, 2021
7a42870
Merge pull request #56 from mlabs-haskell/prutz/qctests
Benjmhart Jun 30, 2021
c9ab207
explictly export modules in files without current exports
Jul 2, 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
1,027 changes: 1,027 additions & 0 deletions STANDARDS.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions mlabs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist-newstyle/
.stack-work/
demo-frontend/.spago
demo-frontend/output
demo-frontend/node_modules
demo-frontend/.cache
demo-frontend/dist
stack.yaml.lock
5 changes: 5 additions & 0 deletions mlabs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Revision history for mlabs

## 0.1.0.0 -- YYYY-mm-dd

* First version. Released on an unsuspecting world.
201 changes: 201 additions & 0 deletions mlabs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. 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.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor 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, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You 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 the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You 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 such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
28 changes: 28 additions & 0 deletions mlabs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

hoogle: requires_nix_shell
hoogle server --local --port 8008

build:
stack build --ghc-options="-Wall"

repl:
stack ghci

test:
stack test all

watch:
stack build --file-watch --ghc-options="-Wall"

test-watch:
stack test --file-watch

# Target to use as dependency to fail if not inside nix-shell
requires_nix_shell:
@ [ "($IN_NIX_SHELL)" ] || echo "The $(MAKECMDGOALS) target must be run from inside nix-shell"
@ [ "($IN_NIX_SHELL)" ] || (echo " run 'nix-shell --pure' first" && false)

# Generate TOC for README.md
# It has to be manually inserted into the README.md for now.
readme_contents:
nix-shell -p nodePackages.npm --command "npx markdown-toc ./README.md --no-firsth1"
Loading