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

Aderall #131

Closed
wants to merge 276 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
e30451e
goal
aleeusgr Apr 29, 2023
00b980d
create new test
aleeusgr Apr 29, 2023
5c96dd1
renaming
aleeusgr Apr 29, 2023
a9aad72
empty test
aleeusgr Apr 29, 2023
d67fd87
refactoring
aleeusgr Apr 29, 2023
d903f2d
gc
aleeusgr Apr 29, 2023
f6fb78d
clean
aleeusgr Apr 30, 2023
28c169a
seed
aleeusgr Apr 30, 2023
5039821
error object Object to BigInt
aleeusgr Apr 30, 2023
af4ea65
transaction building function
aleeusgr Apr 30, 2023
7610ef5
lucid.newTx.payToContract fails to complete
aleeusgr Apr 30, 2023
c6f32e8
clean up
aleeusgr Apr 30, 2023
732deb5
naming
aleeusgr Apr 30, 2023
1977803
doesnt make sense
aleeusgr May 1, 2023
cfb967e
dont need seed anymore
aleeusgr May 1, 2023
5d724a4
if I move mintTx out to Describe, get same error.
aleeusgr May 1, 2023
880fdc6
Merge branch 'refactor' into interact-with-plutus-script
aleeusgr May 1, 2023
62eebd2
pass
aleeusgr May 1, 2023
a9204ad
rename
aleeusgr May 1, 2023
b457c9c
look up import statement
aleeusgr May 1, 2023
5637853
pass
aleeusgr May 1, 2023
7410e23
disable passing test
aleeusgr May 1, 2023
86ae0ed
stuck
aleeusgr May 1, 2023
3f0db1e
lint
aleeusgr May 1, 2023
a5e4644
got cborHex from Helios
aleeusgr May 1, 2023
eec74e5
my utxo changes, now I need to withdraw from the contract
aleeusgr May 1, 2023
4a5284e
why my balance does not change?
aleeusgr May 1, 2023
14839bd
I am not sure what happens, but checks are passing
aleeusgr May 1, 2023
857cac2
naming
aleeusgr May 1, 2023
5875f60
naming, sanity check
aleeusgr May 1, 2023
5040e99
changelog
aleeusgr May 1, 2023
5c7981e
sanity check
aleeusgr May 2, 2023
dc03844
development will become main
aleeusgr May 2, 2023
9c9dd69
reflect
aleeusgr May 2, 2023
e5e074f
moved helios source to separate file
aleeusgr May 2, 2023
c04ffc9
removed print on passing tests
aleeusgr May 2, 2023
72d50e4
naming
aleeusgr May 2, 2023
ce9bf4b
need to look up stuff
aleeusgr May 2, 2023
b0ece42
pass
aleeusgr May 3, 2023
f313804
added redeemUtxo to integration test
aleeusgr May 3, 2023
33b40af
remove extra prints
aleeusgr May 3, 2023
ea5af2b
renaming and reflection
aleeusgr May 3, 2023
a6d681c
new test
aleeusgr May 4, 2023
25b5d80
look at vesting first
aleeusgr May 4, 2023
cac21cb
rfl
aleeusgr May 4, 2023
c11f8de
deprecate
aleeusgr May 4, 2023
11f3f98
matching keyhash
aleeusgr May 4, 2023
497b1ca
naming
aleeusgr May 4, 2023
3d8527d
testing tx
aleeusgr May 4, 2023
cf95cdb
matching keyhash pass
aleeusgr May 4, 2023
27477b8
rfl
aleeusgr May 4, 2023
d4fc662
take a look at the vesting example, can I make it work?
aleeusgr May 5, 2023
0956dcd
explore vesting contract
aleeusgr May 5, 2023
1e0f597
redeem, comment
aleeusgr May 5, 2023
3625e83
I dunno what Im doing
aleeusgr May 5, 2023
0a91d68
datum -> lockADA, redeemer -> redeemUTXO
aleeusgr May 5, 2023
f52175a
helios syntax highlighting, comments
aleeusgr May 5, 2023
6df30bb
comments -> Issue
aleeusgr May 5, 2023
852bfa6
test code, get error
aleeusgr May 9, 2023
88d955f
clean up
aleeusgr May 9, 2023
3e2f07e
run the emulator
aleeusgr May 9, 2023
ab86c1c
redeem matching keyhash
aleeusgr May 9, 2023
b89ed85
Merge branch 'redeem-vesting' into development
aleeusgr May 9, 2023
a1ad118
what is my high level story?
aleeusgr May 9, 2023
fbe3083
redundant
aleeusgr May 9, 2023
bcac31c
review repo
aleeusgr May 9, 2023
f557588
Merge branch 'helios-emulator' into development
aleeusgr May 9, 2023
53f1473
condition on emulator creation
aleeusgr May 9, 2023
358e7f6
fixed overt error
aleeusgr May 9, 2023
e836f10
rfl
aleeusgr May 13, 2023
7d1c7f7
add emulator unit test
aleeusgr May 13, 2023
4fd3a0c
typo
aleeusgr May 13, 2023
c10d2bf
naming
aleeusgr May 13, 2023
57a725f
naimng
aleeusgr May 13, 2023
8ed31ed
going in circles
aleeusgr May 13, 2023
5a79321
Address?
aleeusgr May 13, 2023
e60e6f6
sanity check
aleeusgr May 13, 2023
e58dc1a
what is Address?
aleeusgr May 13, 2023
824206a
sanity check pass
aleeusgr May 13, 2023
a6d5cb9
format
aleeusgr May 13, 2023
44fe91c
fair naming
aleeusgr May 13, 2023
a2b2d83
suggestions
aleeusgr May 16, 2023
7d6dc05
suggestions
aleeusgr May 16, 2023
d21317c
circles
aleeusgr May 16, 2023
0078dc9
highlights
aleeusgr May 16, 2023
c5c61bf
working code example
aleeusgr May 16, 2023
5bf1efb
better example
aleeusgr May 16, 2023
a15678b
adding my working code
aleeusgr May 16, 2023
a97a233
naming?
aleeusgr May 16, 2023
d17f330
add more
aleeusgr May 16, 2023
2f811a1
comments
aleeusgr May 16, 2023
669ee8d
redundancy
aleeusgr May 16, 2023
4a3f107
rlf
aleeusgr May 16, 2023
a8ad89a
reorg
aleeusgr May 17, 2023
b8f5d15
test template
aleeusgr May 17, 2023
a984107
docs
aleeusgr May 17, 2023
99163d3
fix: commented out code that broke github actions
aleeusgr May 17, 2023
23abafa
feat(helios): a function to provide contract endpoints to the emulator
aleeusgr May 17, 2023
6272217
feat(helios-program.test): copy suggested template and make test pass
aleeusgr May 17, 2023
20d3026
test(tests/helios-program): test properties on api method outputs
aleeusgr May 17, 2023
66fcfd7
style(tests/helios-program): describe it
aleeusgr May 17, 2023
371aa73
refactor(naming-tests): helios.Program, but why this association? in …
aleeusgr May 17, 2023
803e0a3
feat(helios-program-doc.test.ts): added beforeEach to the test
aleeusgr May 18, 2023
b01807c
refactor(/tests-/src): removed non-working code and disabled running …
aleeusgr May 18, 2023
dd9c6cf
feat(tests/helios-vesting): added emulator instantiation with a test …
aleeusgr May 18, 2023
3fcd06f
refactor: deleted old tests to simplify code review process
aleeusgr May 18, 2023
8e50fde
Merge branch 'development' into vesting
aleeusgr May 18, 2023
201fbc6
fix(helios-program-doc.test): changed matching keyhash to vesting to …
aleeusgr May 19, 2023
8f5cc42
Merge branch 'development' into vesting
aleeusgr May 19, 2023
59a5e2d
feat(helios-vesting.test): added Datum
aleeusgr May 19, 2023
1c6dcc8
feat(helios-vesting.test): building the transaction
aleeusgr May 19, 2023
8b5fa1e
feat(helios-vesting.test): completed the tx
aleeusgr May 19, 2023
ed7eee2
style(helios-vestin.test): comments and removing unused parts
aleeusgr May 19, 2023
a40fd00
docs(Changelog,-Readme): rfl
aleeusgr May 19, 2023
9d96bf2
style(devlog): created devlog
aleeusgr May 19, 2023
50c3744
docs(devlog): thinking about next step
aleeusgr May 19, 2023
e3d0f22
feat(tests): added test code to explore how test context work
aleeusgr May 19, 2023
35f1916
refactor(helios-vesting.test): added a declaration to vary the durati…
aleeusgr May 20, 2023
c947f0d
feat(lockADA-transaction): Moved transaction building to a separate m…
aleeusgr May 20, 2023
d590428
fix(src/lockAda-and-tests/helios-vesting): fixed the test
aleeusgr May 21, 2023
8caa145
refactor(tests): renamed a test
aleeusgr May 21, 2023
39a051f
feat(helios-vesting.test): added a template
aleeusgr May 21, 2023
d447bfc
feat(helios-vesting-cancel.test): added boilerplate
aleeusgr May 21, 2023
1b0b273
refactor(const-lockAda): changed input to validatorHash instead of va…
aleeusgr May 21, 2023
966c6af
fix(lockAda): broken test
aleeusgr May 21, 2023
0188b1d
feat(cancelVesting): submit lock tx
aleeusgr May 21, 2023
081c434
docs(devlog): rfl
aleeusgr May 21, 2023
bd9f95c
test(lockAda): added nft id
aleeusgr May 21, 2023
59741d1
feat(cancelVesting): added nft mph
aleeusgr May 21, 2023
a527392
feat(tests/helios-vesting-cancel.test): added some more code
aleeusgr May 21, 2023
e22bff4
docs(cancelVesting): rfl
aleeusgr May 22, 2023
4dd978d
feat(cancelVesting): added validFrom and validTo
aleeusgr May 22, 2023
77fea45
feat(cancelVesting): added signer,script and network parameters
aleeusgr May 22, 2023
1a9f2f5
feat(cancelVesting): finalize tx, error
aleeusgr May 22, 2023
bd982e9
fix(cancelVesting): added collateral
aleeusgr May 22, 2023
aa6de3b
test(cancelVesting): transaction contents to screen
aleeusgr May 22, 2023
21f33f0
refactor(tests/helios-vesting-cancel): comments and improve error output
aleeusgr May 22, 2023
0768c5a
fix(test/helios-vesting-cancel): try adding more ada to alice
aleeusgr May 22, 2023
d799586
test(test/helios-vesting-cancel): fixed init test and added a collate…
aleeusgr May 22, 2023
de5166c
refactor(helios-vesting-cancel): get alice utxos with wallet emulator…
aleeusgr May 24, 2023
f8b8d6f
fix(lockAda): tx consumes only one wallet utxo
aleeusgr May 24, 2023
af8f71d
feat(helios-vesting-cancel.test): finalized the transaction
aleeusgr May 24, 2023
ee83e60
feat(cancelVesting): submit tx and tick and query the wallet
aleeusgr May 24, 2023
96dd612
fix(cancelVesting): increased date validTo and more detailed error me…
aleeusgr May 24, 2023
20fb109
fix(cancelVesting): added validTo check
aleeusgr May 25, 2023
b661223
fix(cancelVesting): changed the way time validFrom and validTo calcul…
aleeusgr May 25, 2023
f71149f
test(helios-vesting-cancel-test): moved networkParam init to earlier …
aleeusgr May 26, 2023
98e008b
build(helios): bumped and npm install newer version
aleeusgr May 27, 2023
26725b1
fix(lockAda): added underscores in the main
aleeusgr May 27, 2023
f8b1955
fix(lockAda): fixed minting vesting key
aleeusgr May 27, 2023
3d5cb3c
fix(lockAda.ts): fixed minting vesting nft
aleeusgr May 27, 2023
805ef82
test(helios-vesting-lock.test): expected values changed
aleeusgr May 27, 2023
c68fdd1
merge dev into cancel-vesting
aleeusgr May 27, 2023
8792a16
fix(jelios-vesting-cancel): reproduce last error
aleeusgr May 27, 2023
60051d4
docs(vesting-cancel-test): comments
aleeusgr May 28, 2023
5af9447
docs(devlog): rfl
aleeusgr May 28, 2023
800901f
feat(helios-network-params.test): a test suite to experiment with net…
aleeusgr May 28, 2023
55cd811
feat(network-params.test): init emu
aleeusgr May 28, 2023
dfe7de3
feat(network-params-test): added initnp check
aleeusgr May 28, 2023
df84f43
feat(initNetworkParams): successfully reinit
aleeusgr May 29, 2023
3bfac82
feat(vesting-cancel): added networkParams initialization
aleeusgr May 29, 2023
1abd052
style(vesting-cancel.test): newnp
aleeusgr May 29, 2023
1abc64d
test(network-Params-doc.test): added test for time and slot values pa…
aleeusgr May 30, 2023
0d39da3
fix(cancelVesting): changed validity range calculation to zero slot
aleeusgr May 30, 2023
1fe271d
test(cancelVesting): added test oracle
aleeusgr May 30, 2023
41b4f37
Merge branch 'cancel-vesting' into development
aleeusgr May 30, 2023
147ede3
docs(devlog): rfl
aleeusgr May 30, 2023
6356e71
refactor(helios-vesting-cancel.test): clean up
aleeusgr Jun 1, 2023
bc41912
feat(cancelVesting.ts): add importable const
aleeusgr Jun 1, 2023
277b314
test(helios-vesting-cancel.test): add a test for the importable const
aleeusgr Jun 1, 2023
266db4a
feat(cancelVesting): write code
aleeusgr Jun 1, 2023
6b5bb80
refactor(tests): rename files
aleeusgr Jun 1, 2023
c5f7c26
feat(lockAda): change initial point for tx validity calculation
aleeusgr Jun 1, 2023
030c42b
docs(Readme): update readme
aleeusgr Jun 1, 2023
a54cde1
docs(CHANGELOG.md): write changelog, remove devlog
aleeusgr Jun 1, 2023
8d122ae
Update README.md
aleeusgr Jun 1, 2023
fed935b
Update CHANGELOG.md
aleeusgr Jun 2, 2023
b150fc2
Update CHANGELOG.md
aleeusgr Jun 2, 2023
651f234
Update README.md
aleeusgr Jun 2, 2023
6c52629
refactor: organize tests
aleeusgr Jun 3, 2023
391be68
refactor: remember to delete dupes
aleeusgr Jun 3, 2023
028a8f5
Create README.md
aleeusgr Jun 3, 2023
e85c833
refactor: review code to find missing parts
aleeusgr Jun 3, 2023
b4f7c01
Update README.md
aleeusgr Jun 3, 2023
7a9b7de
test: configure unit tests
aleeusgr Jun 4, 2023
3d8d7ad
Update README.md
aleeusgr Jun 6, 2023
3912315
refactor(src): rename for consistency
aleeusgr Jun 6, 2023
df6ab50
test: fix tests
aleeusgr Jun 6, 2023
51fb1fb
build: run npm audit fix
aleeusgr Jun 6, 2023
7307ee1
Update README.md
aleeusgr Jun 11, 2023
4452e34
Update README.md
aleeusgr Jun 11, 2023
86b947d
Update README.md
aleeusgr Jun 11, 2023
492ddd0
refactor(tests/vesting-cancel): refactor tx to be more readable
aleeusgr Jun 14, 2023
66a1029
refactor(lockAda): change input parameters for consistency
aleeusgr Jun 14, 2023
0e17dff
fix(tests/vesting-cancel): fix broken tests
aleeusgr Jun 14, 2023
548d822
test(t/vc): add checks for initial state
aleeusgr Jun 14, 2023
ad4fbb1
docs(changelog): write changelog
aleeusgr Jun 14, 2023
f6df066
refactor(onchain): change extension to hl
aleeusgr Jun 14, 2023
a855527
test(lockADA): clean up and comment
aleeusgr Jun 14, 2023
14157e7
test(lockADA): document hardcoded value
aleeusgr Jun 14, 2023
17ddf0f
feat(lockADA): find unexpected behavior
aleeusgr Jun 14, 2023
5331ab1
refactor(src/vesting-lock): refactor tx to be more readable
aleeusgr Jun 14, 2023
a2e901f
refactor(t/vc): refactor
aleeusgr Jun 14, 2023
b3652e9
Merge pull request #122 from aleeusgr/new
aleeusgr Jun 14, 2023
a7c54cc
docs(template): change test description
aleeusgr Jun 14, 2023
175c3c1
docs(t/cv): refactor
aleeusgr Jun 14, 2023
4eb846a
refactor(t/vc): sort things
aleeusgr Jun 14, 2023
b4e6024
style(t/cv): rm line
aleeusgr Jun 14, 2023
2073364
test(t/tp): add a check for validity interval
aleeusgr Jun 14, 2023
56d0c3b
feat(t/tp): add tests to catch the error
aleeusgr Jun 14, 2023
83a17e3
style(units): concat
aleeusgr Jun 14, 2023
ac4050a
feat(tests/fuzzy): document Helios method
aleeusgr Jun 14, 2023
5a9741a
feat: merge main into time
aleeusgr Jun 15, 2023
194c04d
fix: disable fuzzy unit test and fix contract name in time-props
aleeusgr Jun 15, 2023
ee4351a
test(unit/mintNft): add nft minting transaction
aleeusgr Jun 21, 2023
c74db3e
fix(mint-nft): fix token name and amt in script and test
aleeusgr Jun 22, 2023
6e470aa
test(mint-nft.test): change expected value in the test
aleeusgr Jun 22, 2023
0ce0de0
feat(mintNft): add name to the script
aleeusgr Jun 22, 2023
4faa03b
feat(mintNft): change amount of token minted
aleeusgr Jun 22, 2023
64bc1ff
feat(mintNFt): show that same error occurs with a different parameter
aleeusgr Jun 22, 2023
cc68372
fix(mintNft): add parameter into the script
aleeusgr Jun 22, 2023
fe327a4
feat(mintNft): add amt parameter and checks
aleeusgr Jun 22, 2023
ebfac19
Merge pull request #126 from aleeusgr/dev
aleeusgr Jun 22, 2023
1b0bff4
docs: hum
aleeusgr Jun 26, 2023
0ff6b14
test: fix mode
aleeusgr Jun 26, 2023
99ad52d
Update README.md
aleeusgr Jul 12, 2023
68fe89a
Update README.md
aleeusgr Jul 17, 2023
dfbfc1e
Update README.md
aleeusgr Jul 17, 2023
eb82fd1
Update README.md
aleeusgr Jul 21, 2023
5f90b51
Update README.md
aleeusgr Jul 21, 2023
d61b704
Update README.md
aleeusgr Jul 21, 2023
80a63d3
Update README.md
aleeusgr Nov 5, 2023
6ad1ad6
Update README.md
aleeusgr Nov 5, 2023
ccb0fc7
Update README.md
aleeusgr Nov 5, 2023
e2b0837
Update README.md
aleeusgr Nov 5, 2023
c4d650f
Update README.md
aleeusgr Nov 5, 2023
cec953c
Update README.md
aleeusgr Nov 5, 2023
5657c26
Update README.md
aleeusgr Nov 5, 2023
4a5b5fb
Update README.md
aleeusgr Nov 5, 2023
3664d80
Update README.md
aleeusgr Nov 5, 2023
9790168
Update README.md
aleeusgr Nov 5, 2023
e65f513
Update node.js.yml
aleeusgr Nov 7, 2023
1e841e1
Update README.md
aleeusgr Jan 29, 2024
fd53513
Create CONTRIBUTING.md
aleeusgr Jan 29, 2024
2086d55
Update README.md
aleeusgr Jan 29, 2024
ef1a4d3
Update README.md
aleeusgr Jan 29, 2024
be5041a
Update README.md
aleeusgr Jan 29, 2024
b29bbf1
Update README.md
aleeusgr Jan 29, 2024
1eb4931
Update CONTRIBUTING.md
aleeusgr Jan 29, 2024
7bd7935
Update README.md
aleeusgr Jan 29, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Node.js CI

on:
push:
branches: [ "main" ]
branches: [ "aderall" ]
pull_request:
branches: [ "main" ]
branches: [ "aderall" ]

jobs:
build:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
June 14, 2023

v0.1: a toolbox for test-driven development

June 1, 2023

https://adambard.com/blog/on-library-versioning/

v0.0: helios vesting testing template
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing

1. Test the project.
2. Update Helios version in package.json
3. Join Gimbalabs.com
4. join Helios.
5. Ask questions.
6. Submit a PR.
51 changes: 0 additions & 51 deletions Changelog.md

This file was deleted.

52 changes: 48 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# potential-robot
[source](https://github.com/koralabs/handles-personalization/tree/master/simple_example_wth_tests)
## version: Adderall

`npm install`
`npm test`
is used to architect a decentralzied application using eUTXO model and Helios, a domain specific language for writing smart contracts on Cardano blockchain.

## Why?
Tough onboarding is a well-known problem for Cardano: most developers with under 3 years of experience find it extremely difficult to develop a solution, and even upon completion of Plutus Pioneer Program most developer struggle. First challenge is the eUTXO model, which is transaction-based - a more secure but less intuitive that [the alternatives]([url](https://jcliff.medium.com/intro-to-blockchain-utxo-vs-account-based-89b9a01cd4f5)). The second challenge is the necessity to deal with Haskell.nix - a notoriously complex build system.
The is an alternative to [plutus-starter](https://github.com/input-output-hk/plutus-starter) to use alongside tutorials.
The project is target a wide audience (namely - JS developers) and its goal is to make democratize Cardano development. It is much less complex and does not suffer from the long build times that are inveitable when using plutus-starter.

## Quick Start
1. `npm install`
2. `npm test`

![image](https://github.com/aleeusgr/potential-robot/assets/36756030/fc378aff-6a9a-45c7-82ad-6b2050eda582)


## Usage
Simple dApp consists of a smart contract with the set of transactions that could be applied to it. Current example is vesting, which is discussed in the documentation below. Following the book in the links and tutorials on Test-Driven Development a programmer should be able to express buisness logic as functional requirements for the product and write tests to verify the requirements are satisfied.
For example for the vesting contract the functional requirements are like so:
- sponsor can deposit value
- claimant can claim the value after the deadline designated by the sponsor.
- claimant fails to claim the value before the deadline.
- sponsor can cancel the contract before the deadline
- sponsor fails to claim the value after the deadline.

FOr the first excercise the user may seek to implement NFT escrow - a contract that validates withdrawal depending not on time of the transation but if the transaction has a specific NFT. Take a look at the [code example](https://github.com/aleeusgr/sniffle).

## Contributing

- Test the project.
- Update Helios version in package.json
- Join Gimbalabs.com
- Join Helios Discord (link below)
- Ask questions.
- Submit a PR.

## Refs:
[Vitest](https://vitest.dev/)

[Helios](https://github.com/Hyperion-BT/helios)

[Helios vesting example](https://github.com/lley154/helios-examples/tree/main/vesting)

[Cardano Smart contract with Helios](https://github.com/lley154/helios-examples/blob/main/docs/Cardano%20Smart%20Contracts%20with%20Helios.pdf)

[Plutus: Writing reliable smart contracts](https://leanpub.com/plutus-smart-contracts)

Big Thanks to Helios team, James Dunseith Gimbalabs, Ben Hart MLabs, Romain Soulat IOG and Matthias Sieber EMURGO.
The project is inspired by Nine Inch Nails, SBF trial and the show Inside Job.
Loading
Loading