136 Commits

Author SHA1 Message Date
Brice Dobry
5002792022 feat: add block height to commit-block event
The event generated by a `commit-block` (on the L1) now includes the
block height for the block that is being committed, in the
`block-height` key of the event tuple. The target burnchain block height
now uses the key `target-burn-block-height`. This is useful for
debugging, making it easy to match the L1 transactions with the L2
blocks. Note that this field is not checked in the tests since it is
purely for convenience and could be left out of some implementations.
2023-04-19 16:39:15 -04:00
Jeff Bencin
d09d49e0ed test: Add integration test for refund from failed FT deposit 2023-04-10 18:32:28 -04:00
Jeff Bencin
522c331a45 Merge remote-tracking branch 'hiro/master' into fix/handle-failed-nft-deposits
Includes some additional changes to get integration tests working again after merge
2023-04-06 14:16:53 -04:00
Jeff Bencin
5c585b9b00 fix: Add integration test for refund of failed NFT deposit 2023-04-05 16:53:25 -04:00
Brice Dobry
75ce11ce89 doc: update tutorial for latest changes 2023-03-16 20:54:13 -04:00
Jeff Bencin
503844b8d0 chore: Remove unused import in subnet_test.ts 2023-03-15 14:51:56 -04:00
Jeff Bencin
409b9be060 style: Fix deno lint warnings 2023-03-10 10:54:05 -05:00
Jeff Bencin
5495eee7e0 test(subnet.clar): Split some failure test cases into separate tests 2023-03-10 10:42:20 -05:00
jbencin
e20e9af051 docs: Update core-contracts/README.md
Co-authored-by: Brice Dobry <brice@obycode.com>
2023-03-08 13:19:57 -05:00
Jeff Bencin
fff7776638 test(subnet.clar): Add check in FT contract transfer functions so that only token owner can transfer 2023-03-06 17:04:42 -05:00
Jeff Bencin
ba625f8884 test(subnet.clar): Test attempted integer overflow of fungible token balance 2023-03-06 16:59:34 -05:00
Jeff Bencin
67fba7e4ca test(subnet.clar): Add failing FT withdrawal tests 2023-03-03 18:18:38 -05:00
Jeff Bencin
ff13ebbfe8 test(subnet.clar): Add failing NFT withdrawal tests 2023-03-03 09:52:27 -05:00
Jeff Bencin
1e6638ce4a test(subnet.clar): Add some simple failing test cases 2023-03-02 12:18:06 -05:00
Jeff Bencin
f5caf7d2dc docs: Add README.md to ./core-contracts with instructions on how to run tests 2023-03-01 11:39:28 -05:00
Brice Dobry
c4b06ec3a6 fix: update clarity unit tests 2023-02-22 12:53:17 -05:00
Brice Dobry
60485d2870 fix: resolve issues in FT tests 2023-02-22 11:42:13 -05:00
Brice Dobry
9d1e200f97 feat: add events for ft/nft registrations
```
        (print {
            event: "register-contract",
            asset-type: "nft",
            l1-contract: (contract-of nft-contract),
            l2-contract: l2-contract
        })
```
2023-02-21 08:10:16 -05:00
Brice Dobry
4a629c539a feat: add admin address for registering contracts 2023-02-18 19:24:44 -05:00
Brice Dobry
7f19561df2 fix: fix bug in withdrawal logic 2023-02-18 18:54:11 -05:00
Brice Dobry
c97524500c fix: add missing files
These should have been included in the previous commits.
2023-02-18 18:54:11 -05:00
Brice Dobry
25442f504b test: update tests to match refactoring 2023-02-18 18:54:11 -05:00
Brice Dobry
6bb5dc55b7 feat: remove deposit function name
Use "deposit-from-burnchain" always, because it will be validated by a
trait.
2023-02-18 18:54:11 -05:00
Brice Dobry
10fb3eb80a chore: reformatting and minor refactors
- Change allowed-contracts map to hold the principal of the L2 contract
  instead of the name of the deposit function. This is thanks to the use
  of a trait for deposits instead, which simplifies things.
- Pass contract as first arg for deposit/withdrawal methods
- Reformat clarity contracts
- Update unit tests
- Reformat unit tests
2023-02-18 18:54:11 -05:00
Brice Dobry
4d42fbda13 refactor: secure process for setting miner 2023-02-18 18:54:11 -05:00
Brice Dobry
256b58a0af chore: add epoch to Clarinet.toml 2023-01-04 11:02:45 -05:00
Ludo Galabru
656127aa8d chore: update clarity lib, remove depends_on 2023-01-04 11:02:45 -05:00
Aaron Blankstein
d43684a84b use Clarinet develop for Clarity2 support in CI 2023-01-04 11:02:45 -05:00
Alie Slade
f02e0ca230 Removes the unused function is-principal-eq. 2023-01-04 10:49:14 -05:00
Alie Slade
38ab5e18ad Renamed hyperchains to subnets. 2023-01-03 16:01:29 -05:00
Greg
d451c92b88 remove withdraw-nft-asset-no-mint 2022-12-20 08:51:42 -05:00
Greg
814b69206d import the refactored hyperchains contract, and fix the tests 2022-12-19 18:09:07 -05:00
Greg
54c45f3c42 clean up the multi miner code 2022-12-19 13:23:35 -05:00
Ludo Galabru
e3807ad9f0 fix: tests 2022-12-16 15:03:22 -05:00
Greg
b5a5ad67b4 use clarinet 1.2.0 2022-12-16 11:16:57 -05:00
Greg
2c46c9dd08 re-add the cached version 2022-12-16 11:13:59 -05:00
Greg
3fb82e511b fix clarinet tests 2022-12-14 15:40:07 -05:00
Greg
5233aaab9a added the clarinet stuff 2022-12-14 15:03:13 -05:00
Aaron Blankstein
492bd738f3 address PR feedback 2022-08-23 14:56:06 -05:00
Aaron Blankstein
dc75304f18 cleanup rustdoc, debugging print statements 2022-08-08 15:12:48 -05:00
Aaron Blankstein
2535f946b2 update hyperchains contract to use to-consensus-buff serialization 2022-08-08 14:30:05 -05:00
Aaron Blankstein
c560853ff4 Merge remote-tracking branch 'origin/master' into feat/use-2.1 2022-08-08 13:01:50 -05:00
Aaron Blankstein
03be99cebb working test infrastructure with 2.1 changes (so far) 2022-08-05 14:53:06 -05:00
Aaron Blankstein
f7118ece61 Merge branch 'master' into feat/use-2.1 2022-08-04 12:41:49 -05:00
Greg Coppola
9ccde36828 Merge branch 'master' into feat/no-mint-nft 2022-08-03 19:17:24 -04:00
Pavitthra Pandurangan
d1b7827367 Merge branch 'feat/use-case-instructions' of https://github.com/hirosystems/stacks-hyperchains into feat/use-case-instructions 2022-07-25 17:32:38 +02:00
Pavitthra Pandurangan
166b2c5bdf Updated L2 nft contract, added package.json 2022-07-22 16:02:33 +02:00
Aaron Blankstein
bb989b94c3 Merge branch 'feat/proposal-rpc' into feat/use-2.1 2022-07-20 15:24:54 -05:00
Greg Coppola
ca9fa3e506 add set-hc-miner step 2022-07-20 13:36:18 -05:00
Greg Coppola
6f316f09a2 Merge branch 'master' into feat/no-mint-nft 2022-07-20 13:16:46 -05:00