2.5.6 • Published 8 days ago

@across-protocol/contracts-v2 v2.5.6

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
8 days ago

Across-logo

Contains smart contract suite to enable instant token transfers between any two networks. Relays are backstopped by liquidity held in a central HubPool on Ethereum, which also serves as the cross-chain administrator of all contracts in the system. SpokePool contracts are deployed to any network that wants to originate token deposits or be the final destination for token transfers, and they are all governed by the HubPool on Ethereum.

This contract set is the second iteration of the Across smart contracts which facilitate token transfers from any L2 to L1.

These contracts were audited by OpenZeppelin which is a great resource for understanding the contracts.

This video is also useful for understanding the technical architecture.

Deployed Contract Versions

The latest contract deployments on Production will always be under the deployed tag.

Build

yarn
yarn hardhat compile

Test

yarn test # Run unit tests without gas analysis
yarn test:gas-analytics # Run only tests that count gas costs
yarn test:report-gas # Run unit tests with hardhat-gas-reporter enabled

Lint

yarn lint
yarn lint-fix

Deploy and Verify

NODE_URL_1=https://mainnet.infura.com/xxx yarn hardhat deploy --tags HubPool --network mainnet
ETHERSCAN_API_KEY=XXX yarn hardhat etherscan-verify --network mainnet --license AGPL-3.0 --force-license --solc-input

Tasks

Finalize Scroll Claims from L2 -> L1 (Mainnet | Sepolia)
yarn hardhat finalize-scroll-claims --l2-address {operatorAddress}

Slither

Slither is a Solidity static analysis framework written in Python 3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses.

Spire-Contracts has been analyzed using Slither@0.9.2 and no major bugs was found. To rerun the analytics, run:

slither contracts/SpokePool.sol
\ --solc-remaps @=node_modules/@
\ --solc-args "--optimize --optimize-runs 1000000"
\ --filter-paths "node_modules"
\ --exclude naming-convention

You can replace SpokePool.sol with the specific contract you want to analyze.

ZK Sync Adapter

These are special instructions for compiling and deploying contracts on zksync. The compile command will create artifacts-zk and cache-zk directories.

Compile

This step requires Docker Desktop to be running, as the solc docker image is fetched as a prerequisite.

yarn compile-zksync

License

All code in this repository is licensed under BUSL-1.1 unless specified differently in the file. Individual exceptions to this license can be made by Risk Labs, which holds the rights to this software and design. If you are interested in using the code or designs in a derivative work, feel free to reach out to licensing@risklabs.foundation.

2.5.6

8 days ago

2.5.5

1 month ago

2.5.4

1 month ago

2.5.2

1 month ago

2.5.3

1 month ago

2.5.1

2 months ago

2.5.0-beta.9

2 months ago

2.5.0-beta.7

2 months ago

2.5.0-beta.6.1

3 months ago

2.5.0-beta.6

3 months ago

2.5.0-beta.5.1

3 months ago

2.5.0-beta.5.2

3 months ago

2.5.0-beta.5.3

3 months ago

2.5.0-beta.5.4

3 months ago

2.5.0-beta.4.1

3 months ago

2.5.0-beta.4.2

3 months ago

2.5.0-beta.4

3 months ago

2.5.0-beta.5

3 months ago

2.4.8

3 months ago

2.5.0-beta.3

3 months ago

2.5.0-beta.1

3 months ago

2.5.0-beta.2

3 months ago

2.5.0-beta.0

3 months ago

2.4.7

6 months ago

2.4.0

10 months ago

2.4.3

9 months ago

2.4.2

9 months ago

2.4.4

7 months ago

2.4.6

6 months ago

2.3.0

11 months ago

2.3.2

10 months ago

2.3.1

11 months ago

2.3.3

10 months ago

2.1.0-beta.18

1 year ago

2.1.0-beta.17

1 year ago

2.1.0-beta.16

1 year ago

2.1.0-beta.15

1 year ago

2.1.0-beta.13

1 year ago

2.1.0-beta.12

1 year ago

2.1.0-beta.10

1 year ago

2.2.1

12 months ago

2.2.0

1 year ago

2.2.3

12 months ago

2.2.2

12 months ago

2.1.0-beta.19

1 year ago

2.1.0-beta.22

1 year ago

2.1.0-beta.21

1 year ago

2.1.0-beta.20

1 year ago

2.2.1-beta.4

12 months ago

2.2.1-beta.3

12 months ago

2.2.1-beta.2

12 months ago

2.2.1-beta.1

1 year ago

2.1.0-beta.3

1 year ago

2.1.0-beta.2

1 year ago

2.1.0-beta.4

1 year ago

2.1.0-beta.7

1 year ago

2.1.0-beta.6

1 year ago

2.1.0-beta.8

1 year ago

2.1.0

1 year ago

2.1.0-beta.1

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.47

2 years ago

0.0.51

2 years ago

0.0.52

2 years ago

0.0.53

2 years ago

0.0.54

2 years ago

0.0.55

2 years ago

0.0.50

2 years ago

0.0.48

2 years ago

0.0.49

2 years ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.20

2 years ago

0.0.43

2 years ago

0.0.21

2 years ago

0.0.44

2 years ago

0.0.22

2 years ago

0.0.45

2 years ago

0.0.23

2 years ago

0.0.46

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.37

2 years ago

0.0.15

2 years ago

0.0.38

2 years ago

0.0.16

2 years ago

0.0.39

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.10

2 years ago

0.0.33

2 years ago

0.0.11

2 years ago

0.0.34

2 years ago

0.0.12

2 years ago

0.0.35

2 years ago

0.0.13

2 years ago

0.0.36

2 years ago

0.0.14

2 years ago

0.0.3

2 years ago

0.0.26

2 years ago

0.0.9

2 years ago

0.0.27

2 years ago

0.0.8

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago