Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ca3c261
CTL Plutip integration nix setup
rynoV Jul 29, 2022
7c34645
Plutip test (with erroring contract)
rynoV Jul 29, 2022
bc77516
Merge branch 'calum/ctl-breaking-changes' of https://github.com/mlabs…
rynoV Aug 2, 2022
85f763f
[WIP] Trying to get minting running in plutip
rynoV Aug 2, 2022
08f8965
[WIP][Broken] Testing CTL+plutip stake keys
rynoV Aug 3, 2022
53c93c6
Update CTL version for plutip staking keys
rynoV Aug 12, 2022
b499a3c
[Broken] Minting plutip test and minor refactoring
rynoV Aug 12, 2022
7d22ce5
Add plutip tests to CI
rynoV Aug 12, 2022
fe5967c
Add buy plutip test
rynoV Aug 13, 2022
065dcbc
Updates to buy plutip test
rynoV Aug 13, 2022
44580c8
Merge 'master' into calum/tests and update tests
rynoV Aug 16, 2022
f62d33e
More tests for buy contract
rynoV Aug 16, 2022
4fcdaf8
Update token policy and buy contract so buyer must pay full price
rynoV Aug 17, 2022
386c847
Update tests
rynoV Aug 17, 2022
f042c97
Revert "Update token policy and buy contract so buyer must pay full p…
rynoV Aug 18, 2022
6da45e1
Update tests to account for case of buyer not paying full price
rynoV Aug 19, 2022
0c2ef45
Add more buy test variations
rynoV Aug 19, 2022
4584566
Add price too low test
rynoV Aug 19, 2022
d4260ea
Update CTL rev
rynoV Aug 19, 2022
82cae2d
Merge branch 'master' of https://github.com/mlabs-haskell/seabug-cont…
rynoV Aug 19, 2022
ed8f1d7
Specify rounding behaviour for shares
rynoV Aug 22, 2022
dfe32d1
Require exact lovelace changes
rynoV Aug 22, 2022
9c3f7cc
Minor changes
rynoV Aug 22, 2022
f2cf532
Add tests for datums and metadata
rynoV Aug 23, 2022
81a1914
Fix payment datums tests and check for correct payments
rynoV Aug 23, 2022
6122b48
Add test for buy tx metadata
rynoV Aug 24, 2022
e52cbc0
Documentation
rynoV Aug 24, 2022
dfd9de2
Update CTL server to develop
rynoV Aug 30, 2022
e1da1dd
Merge branch 'calum/tests' of https://github.com/mlabs-haskell/seabug…
rynoV Sep 1, 2022
2ed6687
Minor refactor
rynoV Sep 1, 2022
781097e
Tests for incorrect mint txs
rynoV Sep 1, 2022
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ A library for interacting with Seabug smart contracts via the Cardano Transactio

## Tests

Use `spago test` to run the tests. Something like `nix build .#checks.<system>.seabug-contracts` can also be used, where `<system>` is something like `x86_64-linux`.
Use `spago test` to run the tests. Something like `nix build .#checks.<system>.seabug-contracts-unit-test` can also be used, where `<system>` is something like `x86_64-linux`.

### Plutip Tests

These need a special environment and so are separated into their own suite. Use `spago test --main Test.Plutip` to the plutip tests. Something like `nix build .#checks.<system>.seabug-contracts-plutip-test` can also be used.

## Minting

Expand Down
116 changes: 58 additions & 58 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 22 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# should be same rev as in packages.dhall
# To update, do `spago2nix generate`
# `develop` branch
rev = "6c018d43ddfef771bfd586e885ecb0cc7ebd8421";
rev = "09540ea3915be20e5095b3b6f2418ddd712eb58e";
};
nixpkgs.follows = "cardano-transaction-lib/nixpkgs";
};
Expand All @@ -24,7 +24,11 @@
perSystem = nixpkgs.lib.genAttrs defaultSystems;
nixpkgsFor = system: import nixpkgs {
inherit system;
overlays = [ cardano-transaction-lib.overlay ];
overlays = [
cardano-transaction-lib.overlays.purescript
cardano-transaction-lib.overlays.ctl-server
cardano-transaction-lib.overlays.runtime
];
};
psProjectFor = system:
let
Expand All @@ -35,9 +39,14 @@
inherit pkgs src;
projectName = "seabug-contracts";
shell = {
packages = [
pkgs.easy-ps.purs-tidy
pkgs.fd
packages = with pkgs; [
easy-ps.purs-tidy
fd
plutip-server
ctl-server
ogmios
ogmios-datum-cache
postgresql
];
};
};
Expand All @@ -62,9 +71,15 @@
project = psProjectFor system;
in
{
seabug-contracts = project.runPursTest {
seabug-contracts-unit-test = project.runPursTest {
sources = [ "exe" "test" "src" ];
};
seabug-contracts-plutip-test = project.runPlutipTest {
name = "seabug-contracts-plutip-test";
testMain = "Test.Plutip";
withCtlServer = true;
env = {};
};
formatting-check = pkgs.runCommand "formatting-check"
{
nativeBuildInputs = [
Expand All @@ -84,7 +99,7 @@
packages = {inherit (self.packages) x86_64-linux;};
devShells = {inherit (self.devShell) x86_64-linux;};
};

check = perSystem (system:
(nixpkgsFor system).runCommand "combined-test"
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dependencies": {
"@emurgo/cardano-serialization-lib-browser": "11.0.0",
"@emurgo/cardano-serialization-lib-nodejs": "11.0.0",
"base64-js": "^1.5.1",
"big-integer": "1.6.51",
"blake2b-wasm": "2.4.0",
"bufferutil": "4.0.5",
Expand Down
Loading