Skip to content

Commit 88b3ce2

Browse files
sophia1chiljabvh
andauthored
Cross-Contract (#40)
* refactor: Remove truffle dependencies and change testing suite to hardhat Signed-off-by: Ilja von Hoessle <ilja@perun.network> * chore: Add tsconfig.json, update ci.yml Signed-off-by: Ilja von Hoessle <ilja@perun.network> * add (WIP): Extend State and Params structs to support cross-chain Payment Channels Signed-off-by: Ilja von Hoessle <ilja@perun.network> * feat: Multiple channelIDs per state. Signed-off-by: Sophia Koehler <sophia@perun.network> * refactor: Remove logs, refactor to conform with mixedCase. Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: update solidity and abiencoder feat(adjudicator, assetholder): optimize gas usage feat: remove safemath usage, over- and underflows are checked automatically since solidity 0.8.0 fix(test): remove pubkey from participant Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: Add maintainers file Signed-off-by: Sophia Koehler <sophia@perun.network> * fix(workflow): Add dependencies to package.json and install python Signed-off-by: Sophia Koehler <sophia@perun.network> * fix(workflow): fix python version to prevent error with pysha3 Signed-off-by: Sophia Koehler <sophia@perun.network> * fix(workflow): fix python version to prevent error with pysha3 Signed-off-by: Sophia Koehler <sophia@perun.network> * fix(workflow): update slither-analyzer Signed-off-by: Sophia Koehler <sophia@perun.network> * fix: change owner & adjudicator address to immutable Signed-off-by: Sophia Koehler <sophia@perun.network> * Remove channel id array (#1) * feat(.sol): Change channelID array to singular channelID and remove unnecessary functions Signed-off-by: Sophia Koehler <sophia@perun.network> * fix(Assetholder): Remove immutable flag fix(ci.yaml): Add immutable-state to slither exclusion Signed-off-by: Sophia Koehler <sophia@perun.network> --------- Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: Update license fields Signed-off-by: Sophia Koehler <sophia@perun.network> * fix: update scripts to use hardhat and update README Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: added changelog, updated notice and readme Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: rewrite changelog Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: rewrite changelog Signed-off-by: Sophia Koehler <sophia@perun.network> * chore: update license Signed-off-by: Sophia Koehler <sophia@perun.network> --------- Signed-off-by: Ilja von Hoessle <ilja@perun.network> Signed-off-by: Sophia Koehler <sophia@perun.network> Co-authored-by: Ilja von Hoessle <ilja@perun.network>
1 parent eb96e7f commit 88b3ce2

37 files changed

+5615
-6314
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,24 @@ jobs:
2828
- name: Install npm
2929
uses: actions/setup-node@v2
3030
with:
31-
node-version: '16'
31+
node-version: '18'
3232

3333
- name: Install dependencies
3434
run: yarn
3535

3636
- name: Lint
3737
run: npx solhint 'contracts/**/*.sol'
3838

39-
- name: Build
40-
run: yarn build
39+
- name: Compile
40+
run: npx hardhat compile
4141

4242
- name: Static analysis
4343
run: |
44-
pip3 install slither-analyzer==0.8.3
45-
slither --exclude solc-version,timestamp,boolean-equality,unimplemented-functions,locked-ether --filter-paths vendor/ .
44+
pip3 install slither-analyzer==0.10.4
45+
slither --exclude solc-version,timestamp,boolean-equality,unimplemented-functions,locked-ether,immutable-states --filter-paths vendor/ .
4646
# Alternatively, one can use Docker:
4747
# WORKDIR=/share docker run --rm -v $(pwd):$WORKDIR -w $WORKDIR --entrypoint slither trailofbits/eth-security-toolbox [insert slither parameters here]
4848
4949
- name: Test
50-
run: yarn test
50+
run: npx hardhat test
5151

52-
- name: Test coverage
53-
run: npx truffle run coverage
54-
55-
- name: Upload coverage
56-
uses: codecov/codecov-action@v1
57-
with:
58-
fail_ci_if_error: true # optional (default = false)
59-
verbose: true # optional (default = false)

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
## [1.0.0] Rubicon - 2025-04-01 [:boom:]
5+
### Added
6+
7+
* Multi-ledger functionality to support multiple EVM chains [#29]
8+
9+
* Support for non-EVM cross-chain channels [#40]
10+
11+
* Optimization (change channelID array to singular channelID) [#41]
12+
13+
[#29]:(https://github.com/hyperledger-labs/perun-eth-contracts/pull/29)
14+
[#40]:(https://github.com/hyperledger-labs/perun-eth-contracts/pull/40)
15+
[#41]:(https://github.com/hyperledger-labs/perun-eth-contracts/pull/41)
16+
17+
## Legend
18+
- <span id="breaking">:boom:</span> This is a breaking change, e.g., it changes the external API.
19+
20+
[:boom:]: #breaking

MAINTAINERS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Maintainers
2+
3+
## Active Maintainers
4+
| Name | Github | [Discord][_chat_url] |
5+
|-------------------|----------------------------------------------------|----------------|
6+
| Hendrik Amler | [@tinnendo](https://github.com/tinnendo) | hendrik#5345 |
7+
| Jan Bormet | [@janbormet](https://github.com/janbormet) | _.pants |
8+
| Ilja von Hoessle | [@iljabvh](https://github.com/iljabvh) | iljabvh |
9+
| Sophia Koehler | [@sophia1ch](https://github.com/sophia1ch) | sophia#3072 |
10+
| Philipp-Florens Lehwalder | [@cryptphil](https://github.com/cryptphil) | cryptphil |
11+
| Steffen Rattay | [@rmbrt](https://github.com/rmbrt) | rmbrt |
12+
| Minh Huy Tran | [@NhoxxKienn](https://github.com/NhoxxKienn) | NhoxxKienn |
13+
| Jens Winkle | [@DragonDev1906](https://github.com/DragonDev1906) | jens#4601 |
14+
15+
## Emeritus Maintainers
16+
17+
| Name | GitHub | [Discord][_chat_url] |
18+
|-------------------|-----------|----------------------|
19+
| Matthias Geihs | [@matthiasgeihs](https://github.com/matthiasgeihs) | mpn#9737 |
20+
| Sebastian Stammler | [@sebastianst](https://github.com/sebastianst) | |
21+
| Oliver Tale-Yazdi | [@ggwpez](https://github.com/ggwpez) | |
22+
23+
24+
[_chat_url]: https://discord.com/channels/817445017680609340/834052993258225715

NOTICE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,20 @@
2222
# Please keep the list in alphabetical order.
2323

2424
Chair of Applied Cryptography, Technische Universität Darmstadt, Germany
25+
Jan Bormet <jan.bormet@bormet.info>
2526
Matthias Geihs <matthias@perun.network>
2627
Philipp-Florens Lehwalder <philipp@perun.network>
2728
Sebastian Stammler <seb@perun.network>
2829
Oliver Tale-Yazdi <oliver@perun.network>
2930
Marius van der Wijden <marius@perun.network>
31+
32+
PolyCrypt GmbH
33+
Jan Bormet <jan.bormet@bormet.info>
34+
Matthias Geihs <matthias@perun.network>
35+
Ilja von Hoessle <ilja@perun.network>
36+
Sophia Koehler <sophia@perun.network>
37+
Philipp-Florens Lehwalder <philipp@perun.network>
38+
Sebastian Stammler <seb@perun.network>
39+
Oliver Tale-Yazdi <oliver@perun.network>
40+
Marius van der Wijden <marius@perun.network>
41+
Jens Winkle <jens@perun.network>

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</p>
1212

1313
This repository contains the Ethereum smart contracts for [go-perun](https://github.com/hyperledger-labs/go-perun)'s Ethereum backend.
14+
Additionally, it allows cross-chain swaps with the Stellar blockchain. It supports our [Soroban Contract](https://github.com/perun-network/perun-soroban-contract), utilizing EVM-compatible cryptography and encoding. Channel participants can have multiple addresses in the channel.
1415

1516
## Security Disclaimer
1617
The smart contracts presented in this directory are under active development and are not ready for production use.
@@ -49,7 +50,7 @@ It is assumed to revert if any app-specific check fails.
4950

5051
## Testing
5152
The repository must be cloned recursively including [submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
52-
[Yarn](https://yarnpkg.com) is expected to be installed globally.
53+
[Yarn](https://yarnpkg.com) and [Hardhat](https://hardhat.org/hardhat-runner/docs/getting-started) are expected to be installed globally.
5354
To run the tests, run
5455
```sh
5556
$ yarn
@@ -58,7 +59,7 @@ $ yarn test
5859
```
5960

6061
## Copyright
61-
Copyright 2021 - See [NOTICE](NOTICE) file for copyright holders.
62+
Copyright 2025 - See [NOTICE](NOTICE) file for copyright holders.
6263
Use of the source code is governed by the Apache 2.0 license that can be found in the [LICENSE file](LICENSE).
6364

6465
Contact us at [info@perun.network](mailto:info@perun.network).

0 commit comments

Comments
 (0)