{"id":24551932,"url":"https://github.com/mlabs-haskell/seabug-contracts","last_synced_at":"2026-01-04T04:03:27.103Z","repository":{"id":47647133,"uuid":"487778708","full_name":"mlabs-haskell/seabug-contracts","owner":"mlabs-haskell","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-13T18:37:09.000Z","size":1021,"stargazers_count":3,"open_issues_count":20,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-23T09:51:40.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlabs-haskell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-02T08:59:29.000Z","updated_at":"2023-03-24T06:27:52.000Z","dependencies_parsed_at":"2023-01-28T14:16:01.052Z","dependency_job_id":null,"html_url":"https://github.com/mlabs-haskell/seabug-contracts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlabs-haskell/seabug-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fseabug-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fseabug-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fseabug-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fseabug-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlabs-haskell","download_url":"https://codeload.github.com/mlabs-haskell/seabug-contracts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fseabug-contracts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28197453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-04T02:00:06.065Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-23T01:19:28.075Z","updated_at":"2026-01-04T04:03:27.075Z","avatar_url":"https://github.com/mlabs-haskell.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# seabug-contracts\n\nA library for interacting with Seabug smart contracts via the Cardano Transaction Lib (CTL).\n\n## Tests\n\nUse `spago test` to run the tests. Something like `nix build .#checks.\u003csystem\u003e.seabug-contracts-unit-test` can also be used, where `\u003csystem\u003e` is something like `x86_64-linux`.\n\n### Plutip Tests\n\nThese 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.\u003csystem\u003e.seabug-contracts-plutip-test` can also be used.\n\n## Minting\n\nThe minting process currently requires some manual steps. To mint a new NFT:\n\n- Upload a new image to nft.storage (e.g. using `seabug/scripts/mint-nft.sh`). [Pixabay](https://pixabay.com/photos/) is a good source of photos.\n- Uncomment [this line](https://github.com/mlabs-haskell/seabug-contracts/blob/cda88824f87e0b961b738c66a428b7ade77454be/index.js#L39)\n- Update the image info [here](https://github.com/mlabs-haskell/seabug-contracts/blob/cda88824f87e0b961b738c66a428b7ade77454be/src/Seabug/Seabug.purs#L34)\n  - Make sure you're using the base36 encoded CID (`mint-nft.sh` prints this out)\n- Run `make run-dev` and open the link from the console in chrome; this will trigger the minting\n  - If Nami/Gero are giving you trouble, this snippet can be used to use a key wallet instead:\n    ```\n    privateKey \u003c- liftM (error \"Failed to parse private key\") $\n      privateKeyFromBytes\n          =\u003c\u003c hexToRawBytes \"\u003csecret key\u003e\"\n    privateStakeKey \u003c- liftM (error \"Failed to parse private stake key\")\n      $ privateKeyFromBytes\n      =\u003c\u003c hexToRawBytes \"\u003csecret stake key\u003e\"\n    let wallet = Just $ mkKeyWallet (wrap privateKey) (Just $ wrap privateStakeKey)\n    ```\n  - The secret key can be obtained through e.g. `seabug/scripts/prepare-wallet.sh` (make sure to add ada to that wallet)\n    - Note you may have to remove the \"5820\" from the start of the \"cborHex\" in the skey file\n  - The stake key will also be necessary for minting, the command `cardano-cli stake-address key-gen --signing-key-file stake.skey --verification-key-file stake.vkey` can be used to get a stake key\n- Add the wallet that you minted with as an artist to the\n  `nft-marketplace-server` database with `admin/create_artist`\n\n## Listing (aka selling)\n\nTo put a collection NFT from your wallet on the marketplace:\n\n- Uncomment [this line](https://github.com/mlabs-haskell/seabug-contracts/blob/df982074de50d79f18dab20f5fc55d0cf406ba67/index.js#L56) to run the sell contract on page load\n- Update [the sell function](https://github.com/mlabs-haskell/seabug-contracts/blob/df982074de50d79f18dab20f5fc55d0cf406ba67/src/Seabug/Seabug.purs#L32-L37) with details of the collection NFT in the wallet\n  - The currency symbol and token name will be logged to the console when the NFT is bought, and they can be copied here\n- Rebuild with `make run-build` and reload the local running Seabug website, this will trigger the listing transaction\n  - Alternatively, use `make run-dev` in the same way as with minting\n- Reloading the page again should now show the NFT in the marketplace\n- Re-comment the above line to stop running the sell contract on page load\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabs-haskell%2Fseabug-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlabs-haskell%2Fseabug-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabs-haskell%2Fseabug-contracts/lists"}