├── test
├── invariant
│ └── .gitkeep
├── fuzz
│ └── MockAgEUR.t.sol
└── unit
│ └── MockAgEUR.t.sol
├── contracts
├── external
│ └── .gitkeep
└── example
│ ├── MockAgEUR.sol
│ └── MockAgEURUpgradeable.sol
├── .prettierignore
├── remappings.txt
├── .vscode
├── settings.json
└── tasks.json
├── .solhintignore
├── .prettierrc
├── slither.config.json
├── .gitmodules
├── .env.example
├── CONTRIBUTING.md
├── .gitignore
├── scripts
├── Utils.s.sol
├── DeployMockAgEUR.s.sol
├── BasicScript.s.sol
├── DeployMockAgEURUpgradeable.s.sol
└── Simulate.s.sol
├── .solhint.json
├── .github
├── assets
│ └── logo.svg
└── workflows
│ ├── ci-deep.yml
│ └── ci.yml
├── helpers
└── fork.sh
├── foundry.toml
├── package.json
├── README.md
├── CODE_OF_CONDUCT.md
├── yarn.lock
└── LICENSE
/test/invariant/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/contracts/external/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | lib
2 | cache
3 | out
--------------------------------------------------------------------------------
/remappings.txt:
--------------------------------------------------------------------------------
1 | ds-test/=lib/forge-std/lib/ds-test/src/
2 | forge-std/=lib/forge-std/src/
3 | oz/=lib/openzeppelin-contracts/contracts/
4 | oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "solidity.compileUsingRemoteVersion": "0.8.20",
3 | "[solidity]": {
4 | "editor.defaultFormatter": "JuanBlanco.solidity",
5 | "editor.formatOnSave": true
6 | },
7 | }
8 |
--------------------------------------------------------------------------------
/.solhintignore:
--------------------------------------------------------------------------------
1 | # Doesn't need to lint dev files
2 | lib
3 | scripts
4 | test
5 |
6 | # Doesn't need to lint build files
7 | node_modules
8 | cache-forge
9 | out
10 |
11 | # Doesn't need to lint utils
12 | external
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "overrides": [
3 | {
4 | "files": "*.sol",
5 | "options": {
6 | "printWidth": 120,
7 | "singleQuote": false,
8 | "bracketSpacing": true
9 | }
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/slither.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "detectors_to_exclude": "naming-convention,solc-version",
3 | "filter_paths": "(lib|test|external|scripts)",
4 | "solc_remaps": [
5 | "ds-test/=lib/ds-test/src/",
6 | "forge-std/=lib/forge-std/src/",
7 | "oz/=lib/openzeppelin-contracts/contracts/",
8 | "oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "Generate Header",
6 | "type": "shell",
7 | "command": "headers ${input:header}",
8 | "presentation": {
9 | "reveal": "never"
10 | }
11 | }
12 | ],
13 | "inputs": [
14 | {
15 | "id": "header",
16 | "description": "Header",
17 | "type": "promptString"
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/forge-std"]
2 | path = lib/forge-std
3 | url = https://github.com/foundry-rs/forge-std
4 | [submodule "lib/openzeppelin-contracts"]
5 | path = lib/openzeppelin-contracts
6 | url = https://github.com/OpenZeppelin/openzeppelin-contracts
7 | [submodule "lib/openzeppelin-contracts-upgradeable"]
8 | path = lib/openzeppelin-contracts-upgradeable
9 | url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
10 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | ## Add URI and BIP39 mnemonic, and etherscan API key for every network that you plan to use
2 | ## These are used in `foundry.toml` (see `nodeUrl` and `accounts` calls in network definitions)
3 |
4 | #ETH_NODE_URI_MAINNET=""
5 | #MNEMONIC_MAINNET=""
6 | #MAINNET_ETHERSCAN_API_KEY=""
7 |
8 | #ETH_NODE_URI_POLYGON=""
9 | #MNEMONIC_POLYGON=""
10 | #POLYGON_ETHERSCAN_API_KEY=""
11 |
12 | #ETH_NODE_URI_FORK=http://localhost:8545
13 | #MNEMONIC_FORK=""
14 |
15 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Submit a change or a new feature
2 |
3 | First of all thank you for your interest in this repository!
4 |
5 | This is only the beginning of the Angle protocol and codebase, and anyone is welcome to improve it.
6 |
7 | To submit some code, please work in a fork, reach out to explain what you've done and open a Pull Request from your fork.
8 |
9 | Feel free to reach out in the [#developers channel](https://discord.gg/HcRB8QMeKU) of our Discord Server if you need a hand!
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Defaults
2 | __pycache__
3 | .idea
4 | .DS_Store
5 | .deps
6 | .docs
7 | .env
8 | node_modules
9 | venv
10 |
11 | # Build output
12 | slither-audit.txt
13 | slither
14 |
15 | # Test output
16 | coverage
17 | coverage.json
18 | lcov.info
19 |
20 | # Running output
21 | gas-report.txt
22 | gasReporterOutput.json
23 | addresses.json
24 | blockchain_db
25 | yarn-error.log
26 | broadcast
27 |
28 | # deployments
29 | deployments/localhost
30 | deployments/mainnetForkRemote
31 |
32 | # bin
33 | bin
34 |
35 |
36 | # foundry
37 | /out
38 | /cache
39 |
--------------------------------------------------------------------------------
/contracts/example/MockAgEUR.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-3.0
2 |
3 | pragma solidity ^0.8.20;
4 |
5 | import "oz/token/ERC20/ERC20.sol";
6 | import "oz/access/Ownable.sol";
7 |
8 | contract MockAgEUR is ERC20, Ownable {
9 | constructor() ERC20("Mock Token", "MTK") Ownable(msg.sender) {}
10 |
11 | // ================================= FUNCTIONS =================================
12 |
13 | function mint(address _to, uint256 _amount) external onlyOwner {
14 | _mint(_to, _amount);
15 | }
16 |
17 | function burn(address _from, uint256 _amount) external onlyOwner {
18 | _burn(_from, _amount);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/scripts/Utils.s.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.20;
3 |
4 | import "forge-std/Script.sol";
5 | import "../contracts/example/MockAgEUR.sol";
6 | import "oz/proxy/transparent/ProxyAdmin.sol";
7 | import "oz/proxy/transparent/TransparentUpgradeableProxy.sol";
8 |
9 | import { console } from "forge-std/console.sol";
10 |
11 | contract Utils is Script {
12 | //Update this address based on needs
13 | address public constant PROXY_ADMIN = 0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b;
14 |
15 | function deployUpgradeable(address implementation, bytes memory data) public returns (address) {
16 | return address(new TransparentUpgradeableProxy(implementation, PROXY_ADMIN, data));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/scripts/DeployMockAgEUR.s.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-3.0
2 | pragma solidity ^0.8.20;
3 |
4 | import "forge-std/Script.sol";
5 | import { console } from "forge-std/console.sol";
6 | import "../contracts/example/MockAgEUR.sol";
7 |
8 | contract DeployMockAgEUR is Script {
9 | MockAgEUR public token;
10 |
11 | function run() external {
12 | uint256 deployerPrivateKey = vm.deriveKey(vm.envString("MNEMONIC_GOERLI"), 0);
13 | address deployer = vm.rememberKey(deployerPrivateKey);
14 |
15 | console.log("Deploying with ", deployer);
16 |
17 | vm.startBroadcast(deployer);
18 |
19 | token = new MockAgEUR();
20 | console.log("Successfully deployed contract at the address: ", address(token));
21 |
22 | vm.stopBroadcast();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/scripts/BasicScript.s.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.20;
3 |
4 | import "forge-std/Script.sol";
5 | import "../contracts/example/MockAgEUR.sol";
6 | import { console } from "forge-std/console.sol";
7 |
8 | contract MyScript is Script {
9 | function test() external {
10 | vm.startBroadcast();
11 |
12 | MockAgEUR token = new MockAgEUR();
13 | address _sender = address(uint160(uint256(keccak256(abi.encodePacked("sender")))));
14 | address _receiver = address(uint160(uint256(keccak256(abi.encodePacked("receiver")))));
15 |
16 | console.log(address(token));
17 |
18 | // deal(address(token), _sender, 1 ether);
19 | // vm.prank(_sender);
20 | // token.transfer(_receiver, 1 ether);
21 |
22 | vm.stopBroadcast();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "solhint:recommended",
3 | "plugins": ["prettier"],
4 | "rules": {
5 | "max-line-length": ["error", 120],
6 | "avoid-call-value": "warn",
7 | "avoid-low-level-calls": "off",
8 | "avoid-tx-origin": "warn",
9 | "const-name-snakecase": "warn",
10 | "contract-name-camelcase": "warn",
11 | "imports-on-top": "warn",
12 | "prettier/prettier": "error",
13 | "ordering": "off",
14 | "max-states-count": "off",
15 | "mark-callable-contracts": "off",
16 | "no-empty-blocks": "off",
17 | "no-global-import": "off",
18 | "not-rely-on-time": "off",
19 | "compiler-version": "off",
20 | "private-vars-leading-underscore": "warn",
21 | "reentrancy": "warn",
22 | "no-inline-assembly": "off",
23 | "no-complex-fallback": "off",
24 | "reason-string": "off",
25 | "func-visibility": ["warn", { "ignoreConstructors": true }],
26 | "explicit-types": ["error","explicit"]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/contracts/example/MockAgEURUpgradeable.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-3.0
2 |
3 | pragma solidity ^0.8.20;
4 |
5 | import "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol";
6 | import "oz-upgradeable/access/OwnableUpgradeable.sol";
7 | import "oz-upgradeable/proxy/utils/Initializable.sol";
8 |
9 | contract MockAgEURUpgradeable is Initializable, ERC20Upgradeable, OwnableUpgradeable {
10 | constructor() initializer {}
11 |
12 | function initialize(string memory _name, string memory _symbol) external initializer {
13 | __ERC20_init_unchained(_name, _symbol);
14 | __Ownable_init_unchained(msg.sender);
15 | }
16 |
17 | // ================================= FUNCTIONS =================================
18 |
19 | function mint(address _to, uint256 _amount) external onlyOwner {
20 | _mint(_to, _amount);
21 | }
22 |
23 | function burn(address _from, uint256 _amount) external onlyOwner {
24 | _burn(_from, _amount);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/scripts/DeployMockAgEURUpgradeable.s.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-3.0
2 | pragma solidity ^0.8.20;
3 |
4 | import { console } from "forge-std/console.sol";
5 |
6 | import "../contracts/example/MockAgEURUpgradeable.sol";
7 |
8 | import "./Utils.s.sol";
9 |
10 | contract DeployMockAgEURUpgradeable is Utils {
11 | MockAgEURUpgradeable public token;
12 |
13 | function run() external {
14 | uint256 deployerPrivateKey = vm.deriveKey(vm.envString("MNEMONIC_GOERLI"), 0);
15 | address deployer = vm.rememberKey(deployerPrivateKey);
16 |
17 | console.log("Deploying with ", deployer);
18 |
19 | vm.startBroadcast(deployer);
20 |
21 | MockAgEURUpgradeable implementation = new MockAgEURUpgradeable();
22 | token = MockAgEURUpgradeable(
23 | deployUpgradeable(
24 | address(implementation),
25 | abi.encodeWithSelector(token.initialize.selector, "Angle Euro", "agEUR")
26 | )
27 | );
28 |
29 | console.log("Successfully deployed contract at the address: ", address(token));
30 |
31 | vm.stopBroadcast();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/.github/assets/logo.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/test/fuzz/MockAgEUR.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | import { Test } from "forge-std/Test.sol";
5 | import { console } from "forge-std/console.sol";
6 | import "../../contracts/example/MockAgEUR.sol";
7 |
8 | contract MockAgEURFuzzTest is Test {
9 | address payable public alice;
10 | address payable public bob;
11 | MockAgEUR public token;
12 |
13 | function setUp() public {
14 | /** Create users */
15 | alice = payable(address(uint160(uint256(keccak256(abi.encodePacked("alice"))))));
16 | bob = payable(address(uint160(uint256(keccak256(abi.encodePacked("bob"))))));
17 | vm.deal(alice, 10 ether);
18 | vm.deal(bob, 10 ether);
19 | /** Add labels to users */
20 | vm.label(alice, "Alice");
21 | vm.label(bob, "Bob");
22 | /** Deploy mock token */
23 | token = new MockAgEUR();
24 | }
25 |
26 | function testMintTransfer(uint256 _amount, uint256 _toTransfer) public {
27 | _amount = bound(_amount, 0, 1000000);
28 | _toTransfer = bound(_toTransfer, 0, _amount);
29 |
30 | token.mint(alice, _amount);
31 | assertEq(token.balanceOf(alice), _amount);
32 | assertEq(token.balanceOf((bob)), 0);
33 | vm.prank(alice);
34 | token.approve(address(this), 1000000);
35 | token.transferFrom(alice, bob, _toTransfer);
36 | assertEq(token.balanceOf(alice), _amount - _toTransfer);
37 | assertEq(token.balanceOf((bob)), _toTransfer);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/helpers/fork.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 |
3 | function option_to_uri {
4 | option=$1
5 |
6 | case $option in
7 | "1")
8 | echo $ETH_NODE_URI_MAINNET
9 | ;;
10 | "2")
11 | echo $ETH_NODE_URI_ARBITRUM
12 | ;;
13 | "3")
14 | echo $ETH_NODE_URI_POLYGON
15 | ;;
16 | "4")
17 | echo $ETH_NODE_URI_GNOSIS
18 | ;;
19 | "5")
20 | echo $ETH_NODE_URI_AVALANCHE
21 | ;;
22 | "6")
23 | echo $ETH_NODE_URI_BASE
24 | ;;
25 | "7")
26 | echo $ETH_NODE_URI_BSC
27 | ;;
28 | "8")
29 | echo $ETH_NODE_URI_CELO
30 | ;;
31 | "9")
32 | echo $ETH_NODE_URI_POLYGON_ZKEVM
33 | ;;
34 | "10")
35 | echo $ETH_NODE_URI_OPTIMISM
36 | ;;
37 | *)
38 | ;;
39 | esac
40 | }
41 |
42 | function main {
43 | if [ ! -f .env ]; then
44 | echo ".env not found!"
45 | exit 1
46 | fi
47 | source .env
48 |
49 | echo "Which chain would you like to fork ?"
50 | echo "- 1: Ethereum Mainnet"
51 | echo "- 2: Arbitrum"
52 | echo "- 3: Polygon"
53 | echo "- 4: Gnosis"
54 | echo "- 5: Avalanche"
55 | echo "- 6: Base"
56 | echo "- 7: Binance Smart Chain"
57 | echo "- 8: Celo"
58 | echo "- 9: Polygon ZkEvm"
59 | echo "- 10: Optimism"
60 |
61 | read option
62 |
63 | uri=$(option_to_uri $option)
64 | if [ -z "$uri" ]; then
65 | echo "Unknown network"
66 | exit 1
67 | fi
68 |
69 | echo "Forking $uri"
70 | anvil --fork-url $uri
71 | }
72 |
73 | main
74 |
--------------------------------------------------------------------------------
/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | src = "contracts"
3 | out = "out"
4 | test = "test"
5 | libs = ["lib"]
6 | script = "scripts"
7 | cache_path = "cache"
8 | gas_reports = ["*"]
9 | via_ir = true
10 | sizes = true
11 | optimizer = true
12 | optimizer_runs = 1000
13 | solc_version = "0.8.20"
14 | ffi = true
15 |
16 | [fuzz]
17 | runs = 10000
18 |
19 | [invariant]
20 | runs = 1000
21 | depth = 30
22 |
23 | [rpc_endpoints]
24 | arbitrum = "${ETH_NODE_URI_ARBITRUM}"
25 | gnosis = "${ETH_NODE_URI_GNOSIS}"
26 | mainnet = "${ETH_NODE_URI_MAINNET}"
27 | optimism = "${ETH_NODE_URI_OPTIMISM}"
28 | polygon = "${ETH_NODE_URI_POLYGON}"
29 | fork = "${ETH_NODE_URI_FORK}"
30 | avalanche = "${ETH_NODE_URI_AVALANCHE}"
31 | celo = "${ETH_NODE_URI_CELO}"
32 | polygonzkevm = "${ETH_NODE_URI_POLYGONZKEVM}"
33 | bsc = "${ETH_NODE_URI_BSC}"
34 | base = "${ETH_NODE_URI_BASE}"
35 |
36 | [etherscan]
37 | arbitrum = { key = "${ARBITRUM_ETHERSCAN_API_KEY}" }
38 | gnosis = { key = "${GNOSIS_ETHERSCAN_API_KEY}" , url = "https://api.gnosisscan.io/api"}
39 | mainnet = { key = "${MAINNET_ETHERSCAN_API_KEY}" }
40 | optimism = { key = "${OPTIMISM_ETHERSCAN_API_KEY}" }
41 | polygon = { key = "${POLYGON_ETHERSCAN_API_KEY}" }
42 | avalanche = { key = "${AVALANCHE_ETHERSCAN_API_KEY}" }
43 | celo = { key = "${CELO_ETHERSCAN_API_KEY}", url = "https://api.celoscan.io/api" }
44 | base = { key = "${BASE_ETHERSCAN_API_KEY}", url = "https://api.basescan.org/api" }
45 | polygonzkevm = { key = "${POLYGONZKEVM_ETHERSCAN_API_KEY}", url = "https://api-zkevm.polygonscan.com/api" }
46 | bsc = { key = "${BSC_ETHERSCAN_API_KEY}"}
47 |
48 | [profile.dev]
49 | optimizer = true
50 | via_ir = false
51 | src = "test"
52 | gas_reports = ["*"]
53 |
54 | [profile.dev.fuzz]
55 | runs = 2000
56 |
57 | [profile.dev.invariant]
58 | runs = 10
59 | depth = 1
60 | fail_on_revert = false
61 |
62 | [profile.ci]
63 | src = "test"
64 | via_ir = false
65 | gas_reports = ["*"]
66 |
67 | [profile.ci.fuzz]
68 | runs = 100
69 |
70 | [profile.ci.invariant]
71 | runs = 10
72 | depth = 30
73 | fail_on_revert = false
74 |
--------------------------------------------------------------------------------
/scripts/Simulate.s.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.20;
3 |
4 | import "forge-std/Script.sol";
5 | import "../contracts/example/MockAgEUR.sol";
6 | import { console } from "forge-std/console.sol";
7 |
8 | contract Simulate is Script {
9 | error WrongCall();
10 |
11 | function run() external {
12 | // TODO replace with your inputs
13 | address sender = address(0x0274a704a6D9129F90A62dDC6f6024b33EcDad36);
14 | address contractAddress = address(0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae);
15 | // remove the 0x
16 | bytes
17 | memory data = hex"71ee95c0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000274a704a6d9129f90a62ddc6f6024b33ecdad3600000000000000000000000000000000000000000000000000000000000000010000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f984000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000427abf85e5d121ac000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000811e1782af6373843046497b3be2c5b25f13037b02c218c5a1a5be24666434d169ca949b7c3d8c763a566075f024a19b4565aba390e00f197fff97adb2f9ef8b0eee43dfe473f564bbd71b106e37928d4f052afe2abf8a42e5f07aded57af2766943bc7bedecf531200d4ca454185d135e6933aa3cff5c53a55f45033135d3a01aae71a2ff3d1e34342bdb86d6348a9da5c8384085f743bb2451aa846b5f667690ccb7b7b1fe363d3e286addaaff93de4a258308fae35fb008580bc25873284f63b37592378acc9f27d211017550c57ae97d0e9cc944d3f90bf54147a69fedeed81940d2088ad7b84767ae8569a9202e23aa0f8204a30b365916d5cefb60c1dfe";
18 |
19 | vm.prank(sender);
20 | (bool success, ) = contractAddress.call(data);
21 | if (!success) revert WrongCall();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angle-boilerplate",
3 | "version": "1.0.0",
4 | "description": "",
5 | "scripts": {
6 | "ci:coverage": "forge coverage --report lcov && yarn lcov:clean",
7 | "coverage": "FOUNDRY_PROFILE=dev forge coverage --report lcov && yarn lcov:clean && yarn lcov:generate-html",
8 | "compile": "forge build",
9 | "compile:dev": "FOUNDRY_PROFILE=dev forge build",
10 | "deploy": "forge script --skip test --broadcast --verify --slow -vvvv --rpc-url mainnet scripts/DeployMockAgEUR.s.sol",
11 | "deploy:fork": "source .env && forge script --skip test --slow --fork-url fork --broadcast scripts/DeployMockAgEUR.s.sol -vvvv",
12 | "gas": "yarn test --gas-report",
13 | "fork": "bash helpers/fork.sh",
14 | "run": "docker run -it --rm -v $(pwd):/app -w /app ghcr.io/foundry-rs/foundry sh",
15 | "script:fork": "source .env && forge script --skip test --fork-url fork --broadcast -vvvv",
16 | "test:unit": "forge test -vvv --gas-report --match-path \"test/unit/**/*.sol\"",
17 | "test:invariant": "forge test -vvv --gas-report --match-path \"test/invariant/**/*.sol\"",
18 | "test:fuzz": "forge test -vvv --gas-report --match-path \"test/fuzz/**/*.sol\"",
19 | "test": "FOUNDRY_PROFILE=dev forge test -vvv",
20 | "slither": "slither .",
21 | "lcov:clean": "lcov --remove lcov.info -o lcov.info 'test/**' 'scripts/**' 'contracts/transmuter/configs/**' 'contracts/utils/**'",
22 | "lcov:generate-html": "genhtml lcov.info --output=coverage",
23 | "size": "forge build --skip test --sizes",
24 | "size:dev": "FOUNDRY_PROFILE=dev forge build --skip test --sizes",
25 | "prettier": "prettier --write '**/*.sol'",
26 | "lint": "yarn lint:check --fix",
27 | "lint:check": "solhint --max-warnings 20 \"**/*.sol\""
28 | },
29 | "keywords": [],
30 | "author": "Angle Core Team",
31 | "license": "GPL-3.0",
32 | "bugs": {
33 | "url": "https://github.com/AngleProtocol/boilerplate/issues"
34 | },
35 | "devDependencies": {
36 | "prettier": "^2.0.0",
37 | "prettier-plugin-solidity": "^1.1.3",
38 | "solhint": "^3.5.1",
39 | "solhint-plugin-prettier": "^0.0.5"
40 | },
41 | "dependencies": {}
42 | }
43 |
--------------------------------------------------------------------------------
/test/unit/MockAgEUR.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | import { Test } from "forge-std/Test.sol";
5 | import { console } from "forge-std/console.sol";
6 | import "../../contracts/example/MockAgEUR.sol";
7 |
8 | contract MockAgEURTest is Test {
9 | address payable public alice;
10 | address payable public bob;
11 | MockAgEUR public token;
12 |
13 | function setUp() public {
14 | /** Create users */
15 | alice = payable(address(uint160(uint256(keccak256(abi.encodePacked("alice"))))));
16 | bob = payable(address(uint160(uint256(keccak256(abi.encodePacked("bob"))))));
17 | vm.deal(alice, 10 ether);
18 | vm.deal(bob, 10 ether);
19 | /** Add labels to users */
20 | vm.label(alice, "Alice");
21 | vm.label(bob, "Bob");
22 | /** Deploy mock token */
23 | token = new MockAgEUR();
24 | }
25 |
26 | function testDeployment() public payable {
27 | assertEq(token.owner(), address(this));
28 | assertEq(token.name(), "Mock Token");
29 | assertEq(token.symbol(), "MTK");
30 | }
31 |
32 | function testUsersBalance() public payable {
33 | assertEq(alice.balance, 10 ether);
34 | assertEq(bob.balance, 10 ether);
35 | }
36 |
37 | function testMint1() public {
38 | token.mint(alice, 100);
39 | assertEq(token.balanceOf(alice), 100);
40 | assertEq(token.balanceOf((bob)), 0);
41 | }
42 |
43 | function testMintTransfer(uint256 _amount, uint256 _toTransfer) public {
44 | vm.assume(_amount <= 1000000);
45 | vm.assume(_toTransfer <= _amount);
46 | token.mint(alice, _amount);
47 | assertEq(token.balanceOf(alice), _amount);
48 | assertEq(token.balanceOf((bob)), 0);
49 | vm.prank(alice);
50 | token.approve(address(this), 1000000);
51 | token.transferFrom(alice, bob, _toTransfer);
52 | assertEq(token.balanceOf(alice), _amount - _toTransfer);
53 | assertEq(token.balanceOf((bob)), _toTransfer);
54 | }
55 |
56 | // ================================ TEST IN FORK ===============================
57 |
58 | function testMainnetBalance() public {
59 | uint256 mainnetForkId = vm.createFork("mainnet", 15_638_436);
60 | vm.selectFork(mainnetForkId);
61 | assertEq(address(0).balance, 11476070351253859226921);
62 | }
63 |
64 | function testPolygonBalance() public {
65 | uint256 polygonForkId = vm.createFork("polygon", 33_710_302);
66 | vm.selectFork(polygonForkId);
67 | assertEq(address(0).balance, 58583241519411840754757);
68 | }
69 |
70 | function testBalance() public {
71 | assertEq(address(0).balance, 0);
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Angle Project Boilerplate
2 |
3 | [](https://github.com/AngleProtocol/boilerplate/actions)
4 | [](https://codecov.io/gh/AngleProtocol/boilerplate)
5 |
6 | This repository proposes a template that is based on foundry frameworks. It also provides templates for EVM compatible smart contracts (in `./contracts/example`), tests and deployment scripts.
7 |
8 | ## Starting
9 |
10 | ### Install packages
11 |
12 | You can install all dependencies by running
13 |
14 | ```bash
15 | yarn
16 | forge i
17 | ```
18 |
19 | ### Create `.env` file
20 |
21 | In order to interact with non local networks, you must create an `.env` that has:
22 |
23 | - `PRIVATE_KEY`
24 | - `MNEMONIC`
25 | - network key (eg. `ALCHEMY_NETWORK_KEY`)
26 | - `ETHERSCAN_API_KEY`
27 |
28 | For additional keys, you can check the `.env.example` file.
29 |
30 | Warning: always keep your confidential information safe.
31 |
32 | ## Headers
33 |
34 | To automatically create headers, follow:
35 |
36 | ## Hardhat Command line completion
37 |
38 | Follow these instructions to have hardhat command line arguments completion:
39 |
40 | ## Foundry Installation
41 |
42 | ```bash
43 | curl -L https://foundry.paradigm.xyz | bash
44 |
45 | source /root/.zshrc
46 | # or, if you're under bash: source /root/.bashrc
47 |
48 | foundryup
49 | ```
50 |
51 | To install the standard library:
52 |
53 | ```bash
54 | forge install foundry-rs/forge-std
55 | ```
56 |
57 | To update libraries:
58 |
59 | ```bash
60 | forge update
61 | ```
62 |
63 | ### Foundry on Docker 🐳
64 |
65 | **If you don’t want to install Rust and Foundry on your computer, you can use Docker**
66 | Image is available here [ghcr.io/foundry-rs/foundry](http://ghcr.io/foundry-rs/foundry).
67 |
68 | ```bash
69 | docker pull ghcr.io/foundry-rs/foundry
70 | docker tag ghcr.io/foundry-rs/foundry:latest foundry:latest
71 | ```
72 |
73 | To run the container:
74 |
75 | ```bash
76 | docker run -it --rm -v $(pwd):/app -w /app foundry sh
77 | ```
78 |
79 | Then you are inside the container and can run Foundry’s commands.
80 |
81 | ### Tests
82 |
83 | You can run tests as follows:
84 |
85 | ```bash
86 | forge test -vvvv --watch
87 | forge test -vvvv --match-path contracts/forge-tests/KeeperMulticall.t.sol
88 | forge test -vvvv --match-test "testAbc*"
89 | forge test -vvvv --fork-url https://eth-mainnet.alchemyapi.io/v2/Lc7oIGYeL_QvInzI0Wiu_pOZZDEKBrdf
90 | ```
91 |
92 | You can also list tests:
93 |
94 | ```bash
95 | forge test --list
96 | forge test --list --json --match-test "testXXX*"
97 | ```
98 |
99 | ### Deploying
100 |
101 | There is an example script in the `scripts/foundry` folder. Then you can run:
102 |
103 | ```bash
104 | yarn foundry:deploy --rpc-url
105 | ```
106 |
107 | Example:
108 |
109 | ```bash
110 | yarn foundry:deploy scripts/foundry/DeployMockAgEUR.s.sol --rpc-url goerli
111 | ```
112 |
113 | ### Coverage
114 |
115 | We recommend the use of this [vscode extension](ryanluker.vscode-coverage-gutters).
116 |
117 | ```bash
118 | yarn hardhat:coverage
119 | yarn foundry:coverage
120 | ```
121 |
122 | ### Simulate
123 |
124 | You can simulate your transaction live or in fork mode. For both option you need to
125 | complete the `scripts/foundry/Simulate.s.sol` with your values: address sending the tx,
126 | address caled and the data to give to this address call.
127 |
128 | For live simulation
129 |
130 | ```bash
131 | yarn foundry:simulate
132 | ```
133 |
134 | For fork simulation
135 |
136 | ```bash
137 | yarn foundry:fork
138 | yarn foundry:simulate:fork
139 | ```
140 |
141 | For fork simulation at a given block
142 |
143 | ```bash
144 | yarn foundry:fork:block ${XXXX}
145 | yarn foundry:simulate:fork
146 | ```
147 |
148 | ### Gas report
149 |
150 | ```bash
151 | yarn foundry:gas
152 | ```
153 |
154 | ## Slither
155 |
156 | ```bash
157 | pip3 install slither-analyzer
158 | pip3 install solc-select
159 | solc-select install 0.8.11
160 | solc-select use 0.8.11
161 | slither .
162 | ```
163 |
164 | ## Media
165 |
166 | Don't hesitate to reach out on [Twitter](https://twitter.com/AngleProtocol) 🐦
167 |
--------------------------------------------------------------------------------
/.github/workflows/ci-deep.yml:
--------------------------------------------------------------------------------
1 | name: "CI Deep"
2 |
3 | env:
4 | FOUNDRY_PROFILE: "ci"
5 |
6 | on:
7 | schedule:
8 | - cron: "0 3 * * 0" # at 3:00am UTC every Sunday
9 | workflow_dispatch:
10 | inputs:
11 | fuzzRuns:
12 | default: "10000"
13 | description: "Unit: number of fuzz runs."
14 | required: false
15 | invariantRuns:
16 | default: "300"
17 | description: "Unit: number of invariant runs."
18 | required: false
19 | invariantDepth:
20 | default: "50"
21 | description: "Unit: invariant depth."
22 | required: false
23 |
24 | jobs:
25 | lint:
26 | runs-on: ubuntu-latest
27 | steps:
28 | - uses: actions/checkout@v3
29 |
30 | - uses: actions/setup-node@v3
31 | with:
32 | node-version: 18
33 | cache: "yarn"
34 |
35 | - name: Install dependencies
36 | run: yarn install
37 |
38 | - name: Run solhint
39 | run: yarn lint:check
40 |
41 | - name: "Add lint summary"
42 | run: |
43 | echo "## Lint result" >> $GITHUB_STEP_SUMMARY
44 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
45 |
46 | build:
47 | runs-on: ubuntu-latest
48 | steps:
49 | - uses: actions/checkout@v3
50 | with:
51 | submodules: "recursive"
52 |
53 | - name: Install Foundry
54 | uses: foundry-rs/foundry-toolchain@v1
55 | with:
56 | version: nightly
57 |
58 | - name: Compile foundry
59 | run: yarn compile --sizes
60 |
61 | - name: "Cache the build so that it can be re-used by the other jobs"
62 | uses: "actions/cache/save@v3"
63 | with:
64 | key: "build-${{ github.sha }}"
65 | path: |
66 | cache-forge
67 | out
68 |
69 | - name: "Add build summary"
70 | run: |
71 | echo "## Build result" >> $GITHUB_STEP_SUMMARY
72 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
73 |
74 | test-unit:
75 | needs: ["build", "lint"]
76 | runs-on: ubuntu-latest
77 | steps:
78 | - uses: actions/checkout@v3
79 | with:
80 | submodules: "recursive"
81 |
82 | - uses: actions/cache/restore@v3
83 | with:
84 | fail-on-cache-miss: true
85 | path: |
86 | cache-forge
87 | out
88 | key: "build-${{ github.sha }}"
89 |
90 | - name: Install Foundry
91 | uses: foundry-rs/foundry-toolchain@v1
92 | with:
93 | version: nightly
94 |
95 | - name: Run Foundry tests
96 | run: yarn test:unit
97 | env:
98 | ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
99 | ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
100 | ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
101 | ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
102 |
103 | - name: "Add Unit Test Summary"
104 | run: |
105 | echo "## Unit test result" >> $GITHUB_STEP_SUMMARY
106 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
107 |
108 | test-invariant:
109 | needs: ["build", "lint"]
110 | runs-on: ubuntu-latest
111 | steps:
112 | - uses: actions/checkout@v3
113 | with:
114 | submodules: "recursive"
115 |
116 | - uses: actions/cache/restore@v3
117 | with:
118 | fail-on-cache-miss: true
119 | path: |
120 | cache-forge
121 | out
122 | key: "build-${{ github.sha }}"
123 |
124 | - name: Install Foundry
125 | uses: foundry-rs/foundry-toolchain@v1
126 | with:
127 | version: nightly
128 |
129 | - name: Run Foundry tests
130 | run: yarn test:invariant
131 | env:
132 | FOUNDRY_INVARIANT_RUNS: ${{ inputs.invariantRuns || '300' }}
133 | FOUNDRY_INVARIANT_DEPTH: ${{ inputs.invariantDepth || '50' }}
134 | ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
135 | ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
136 | ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
137 | ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
138 |
139 | - name: "Add Invariant Test Summary"
140 | run: |
141 | echo "## Invariant test result" >> $GITHUB_STEP_SUMMARY
142 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
143 |
144 | test-fuzz:
145 | needs: ["build", "lint"]
146 | runs-on: ubuntu-latest
147 | steps:
148 | - uses: actions/checkout@v3
149 | with:
150 | submodules: "recursive"
151 |
152 | - uses: actions/cache/restore@v3
153 | with:
154 | fail-on-cache-miss: true
155 | path: |
156 | cache-forge
157 | out
158 | key: "build-${{ github.sha }}"
159 |
160 | - name: Install Foundry
161 | uses: foundry-rs/foundry-toolchain@v1
162 | with:
163 | version: nightly
164 |
165 | - name: Run Foundry tests
166 | run: yarn test:fuzz
167 | env:
168 | FOUNDRY_FUZZ_RUNS: ${{ inputs.fuzzRuns || '10000' }}
169 | ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
170 | ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
171 | ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
172 | ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
173 |
174 | - name: "Add Fuzz Test Summary"
175 | run: |
176 | echo "## Fuzz test result" >> $GITHUB_STEP_SUMMARY
177 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | - Demonstrating empathy and kindness toward other people
21 | - Being respectful of differing opinions, viewpoints, and experiences
22 | - Giving and gracefully accepting constructive feedback
23 | - Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | - Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | - The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | - Trolling, insulting or derogatory comments, and personal or political attacks
33 | - Public or private harassment
34 | - Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | - Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | contact@angle.money.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: "CI"
2 |
3 | env:
4 | FOUNDRY_PROFILE: "ci"
5 |
6 | on:
7 | workflow_dispatch:
8 | pull_request:
9 | push:
10 | branches:
11 | - "main"
12 |
13 | jobs:
14 | lint:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v3
18 |
19 | - uses: actions/setup-node@v3
20 | with:
21 | node-version: 18
22 | cache: "yarn"
23 |
24 | - name: Install dependencies
25 | run: yarn install
26 |
27 | - name: Run solhint
28 | run: yarn lint:check
29 |
30 | - name: "Add lint summary"
31 | run: |
32 | echo "## Lint result" >> $GITHUB_STEP_SUMMARY
33 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
34 |
35 | build:
36 | runs-on: ubuntu-latest
37 | steps:
38 | - uses: actions/checkout@v3
39 | with:
40 | submodules: "recursive"
41 |
42 | - name: Install Foundry
43 | uses: foundry-rs/foundry-toolchain@v1
44 | with:
45 | version: nightly
46 |
47 | - name: Compile foundry
48 | run: yarn compile --sizes
49 |
50 | - name: "Cache the build so that it can be re-used by the other jobs"
51 | uses: "actions/cache/save@v3"
52 | with:
53 | key: "build-${{ github.sha }}"
54 | path: |
55 | cache-forge
56 | out
57 |
58 | - name: "Add build summary"
59 | run: |
60 | echo "## Build result" >> $GITHUB_STEP_SUMMARY
61 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
62 |
63 | test-unit:
64 | needs: ["build", "lint"]
65 | runs-on: ubuntu-latest
66 | steps:
67 | - uses: actions/checkout@v3
68 | with:
69 | submodules: "recursive"
70 |
71 | - uses: actions/cache/restore@v3
72 | with:
73 | fail-on-cache-miss: true
74 | path: |
75 | cache-forge
76 | out
77 | key: "build-${{ github.sha }}"
78 |
79 | - name: Install Foundry
80 | uses: foundry-rs/foundry-toolchain@v1
81 | with:
82 | version: nightly
83 |
84 | - name: Run Foundry tests
85 | run: yarn test:unit
86 | env:
87 | ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
88 | ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
89 | ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
90 | ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
91 |
92 | - name: "Add Unit Test Summary"
93 | run: |
94 | echo "## Unit test result" >> $GITHUB_STEP_SUMMARY
95 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
96 |
97 | test-invariant:
98 | needs: ["build", "lint"]
99 | runs-on: ubuntu-latest
100 | steps:
101 | - uses: actions/checkout@v3
102 | with:
103 | submodules: "recursive"
104 |
105 | - uses: actions/cache/restore@v3
106 | with:
107 | fail-on-cache-miss: true
108 | path: |
109 | cache-forge
110 | out
111 | key: "build-${{ github.sha }}"
112 |
113 | - name: Install Foundry
114 | uses: foundry-rs/foundry-toolchain@v1
115 | with:
116 | version: nightly
117 |
118 | - name: Run Foundry tests
119 | run: yarn test:invariant
120 | env:
121 | FOUNDRY_INVARIANT_RUNS: "8"
122 | FOUNDRY_INVARIANT_DEPTH: "256"
123 | ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
124 | ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
125 | ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
126 | ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
127 |
128 | - name: "Add Invariant Test Summary"
129 | run: |
130 | echo "## Invariant test result" >> $GITHUB_STEP_SUMMARY
131 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
132 |
133 | test-fuzz:
134 | needs: ["build", "lint"]
135 | runs-on: ubuntu-latest
136 | steps:
137 | - uses: actions/checkout@v3
138 | with:
139 | submodules: "recursive"
140 |
141 | - uses: actions/cache/restore@v3
142 | with:
143 | fail-on-cache-miss: true
144 | path: |
145 | cache-forge
146 | out
147 | key: "build-${{ github.sha }}"
148 |
149 | - name: Install Foundry
150 | uses: foundry-rs/foundry-toolchain@v1
151 | with:
152 | version: nightly
153 |
154 | - name: Run Foundry tests
155 | run: npm run test:fuzz
156 | env:
157 | FOUNDRY_FUZZ_RUNS: "5000"
158 | ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
159 | ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
160 | ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
161 | ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
162 |
163 | - name: "Add Fuzz Test Summary"
164 | run: |
165 | echo "## Fuzz test result" >> $GITHUB_STEP_SUMMARY
166 | echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
167 |
168 | coverage:
169 | needs: ["build", "lint"]
170 | runs-on: "ubuntu-latest"
171 | steps:
172 | - uses: actions/checkout@v3
173 | with:
174 | submodules: "recursive"
175 |
176 | - name: "Install Foundry"
177 | uses: "foundry-rs/foundry-toolchain@v1"
178 |
179 | - name: "Install lcov"
180 | run: "sudo apt-get install lcov"
181 |
182 | - name: "Generate the coverage report using the unit and the integration tests"
183 | run: "yarn ci:coverage"
184 |
185 | - name: "Upload coverage report to Codecov"
186 | uses: "codecov/codecov-action@v3"
187 | with:
188 | files: "./lcov.info"
189 | token: ${{ secrets.CODECOV_TOKEN }}
190 |
191 | - name: "Add coverage summary"
192 | run: |
193 | echo "## Coverage result" >> $GITHUB_STEP_SUMMARY
194 | echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY
195 |
196 | slither-analyze:
197 | needs: ["build", "lint"]
198 | runs-on: "ubuntu-latest"
199 | permissions:
200 | actions: "read"
201 | contents: "read"
202 | security-events: "write"
203 | steps:
204 | - uses: actions/checkout@v3
205 | with:
206 | submodules: "recursive"
207 |
208 | - name: Install Foundry
209 | uses: foundry-rs/foundry-toolchain@v1
210 | with:
211 | version: nightly
212 |
213 | - name: Compile foundry
214 | run: forge build --build-info --force
215 |
216 | - name: "Run Slither analysis"
217 | uses: "crytic/slither-action@v0.3.0"
218 | id: slither
219 | with:
220 | fail-on: "none"
221 | sarif: "results.sarif"
222 | ignore-compile: true
223 |
224 | - name: "Upload SARIF file to GitHub code scanning"
225 | uses: "github/codeql-action/upload-sarif@v2"
226 | with:
227 | sarif_file: ${{ steps.slither.outputs.sarif }}
228 |
229 | - name: "Add Slither summary"
230 | run: |
231 | echo "## Slither result" >> $GITHUB_STEP_SUMMARY
232 | echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@babel/code-frame@^7.0.0":
6 | version "7.22.13"
7 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
8 | integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==
9 | dependencies:
10 | "@babel/highlight" "^7.22.13"
11 | chalk "^2.4.2"
12 |
13 | "@babel/helper-validator-identifier@^7.22.20":
14 | version "7.22.20"
15 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
16 | integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
17 |
18 | "@babel/highlight@^7.22.13":
19 | version "7.22.20"
20 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54"
21 | integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==
22 | dependencies:
23 | "@babel/helper-validator-identifier" "^7.22.20"
24 | chalk "^2.4.2"
25 | js-tokens "^4.0.0"
26 |
27 | "@solidity-parser/parser@^0.16.0":
28 | version "0.16.1"
29 | resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.1.tgz#f7c8a686974e1536da0105466c4db6727311253c"
30 | integrity sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==
31 | dependencies:
32 | antlr4ts "^0.5.0-alpha.4"
33 |
34 | ajv@^6.12.6:
35 | version "6.12.6"
36 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
37 | integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
38 | dependencies:
39 | fast-deep-equal "^3.1.1"
40 | fast-json-stable-stringify "^2.0.0"
41 | json-schema-traverse "^0.4.1"
42 | uri-js "^4.2.2"
43 |
44 | ajv@^8.0.1:
45 | version "8.12.0"
46 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1"
47 | integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
48 | dependencies:
49 | fast-deep-equal "^3.1.1"
50 | json-schema-traverse "^1.0.0"
51 | require-from-string "^2.0.2"
52 | uri-js "^4.2.2"
53 |
54 | ansi-regex@^5.0.1:
55 | version "5.0.1"
56 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
57 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
58 |
59 | ansi-styles@^3.2.1:
60 | version "3.2.1"
61 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
62 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
63 | dependencies:
64 | color-convert "^1.9.0"
65 |
66 | ansi-styles@^4.0.0, ansi-styles@^4.1.0:
67 | version "4.3.0"
68 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
69 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
70 | dependencies:
71 | color-convert "^2.0.1"
72 |
73 | antlr4@^4.11.0:
74 | version "4.13.1"
75 | resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1.tgz#1e0a1830a08faeb86217cb2e6c34716004e4253d"
76 | integrity sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==
77 |
78 | antlr4ts@^0.5.0-alpha.4:
79 | version "0.5.0-alpha.4"
80 | resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a"
81 | integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==
82 |
83 | argparse@^2.0.1:
84 | version "2.0.1"
85 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
86 | integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
87 |
88 | ast-parents@^0.0.1:
89 | version "0.0.1"
90 | resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3"
91 | integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==
92 |
93 | astral-regex@^2.0.0:
94 | version "2.0.0"
95 | resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
96 | integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
97 |
98 | balanced-match@^1.0.0:
99 | version "1.0.2"
100 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
101 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
102 |
103 | brace-expansion@^2.0.1:
104 | version "2.0.1"
105 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
106 | integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
107 | dependencies:
108 | balanced-match "^1.0.0"
109 |
110 | callsites@^3.0.0:
111 | version "3.1.0"
112 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
113 | integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
114 |
115 | chalk@^2.4.2:
116 | version "2.4.2"
117 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
118 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
119 | dependencies:
120 | ansi-styles "^3.2.1"
121 | escape-string-regexp "^1.0.5"
122 | supports-color "^5.3.0"
123 |
124 | chalk@^4.1.2:
125 | version "4.1.2"
126 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
127 | integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
128 | dependencies:
129 | ansi-styles "^4.1.0"
130 | supports-color "^7.1.0"
131 |
132 | color-convert@^1.9.0:
133 | version "1.9.3"
134 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
135 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
136 | dependencies:
137 | color-name "1.1.3"
138 |
139 | color-convert@^2.0.1:
140 | version "2.0.1"
141 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
142 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
143 | dependencies:
144 | color-name "~1.1.4"
145 |
146 | color-name@1.1.3:
147 | version "1.1.3"
148 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
149 | integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
150 |
151 | color-name@~1.1.4:
152 | version "1.1.4"
153 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
154 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
155 |
156 | commander@^10.0.0:
157 | version "10.0.1"
158 | resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
159 | integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
160 |
161 | cosmiconfig@^8.0.0:
162 | version "8.3.6"
163 | resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3"
164 | integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==
165 | dependencies:
166 | import-fresh "^3.3.0"
167 | js-yaml "^4.1.0"
168 | parse-json "^5.2.0"
169 | path-type "^4.0.0"
170 |
171 | emoji-regex@^8.0.0:
172 | version "8.0.0"
173 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
174 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
175 |
176 | error-ex@^1.3.1:
177 | version "1.3.2"
178 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
179 | integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
180 | dependencies:
181 | is-arrayish "^0.2.1"
182 |
183 | escape-string-regexp@^1.0.5:
184 | version "1.0.5"
185 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
186 | integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
187 |
188 | fast-deep-equal@^3.1.1:
189 | version "3.1.3"
190 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
191 | integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
192 |
193 | fast-diff@^1.1.2, fast-diff@^1.2.0:
194 | version "1.3.0"
195 | resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0"
196 | integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==
197 |
198 | fast-json-stable-stringify@^2.0.0:
199 | version "2.1.0"
200 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
201 | integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
202 |
203 | fs.realpath@^1.0.0:
204 | version "1.0.0"
205 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
206 | integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
207 |
208 | glob@^8.0.3:
209 | version "8.1.0"
210 | resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e"
211 | integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==
212 | dependencies:
213 | fs.realpath "^1.0.0"
214 | inflight "^1.0.4"
215 | inherits "2"
216 | minimatch "^5.0.1"
217 | once "^1.3.0"
218 |
219 | has-flag@^3.0.0:
220 | version "3.0.0"
221 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
222 | integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
223 |
224 | has-flag@^4.0.0:
225 | version "4.0.0"
226 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
227 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
228 |
229 | ignore@^5.2.4:
230 | version "5.2.4"
231 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
232 | integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
233 |
234 | import-fresh@^3.3.0:
235 | version "3.3.0"
236 | resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
237 | integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
238 | dependencies:
239 | parent-module "^1.0.0"
240 | resolve-from "^4.0.0"
241 |
242 | inflight@^1.0.4:
243 | version "1.0.6"
244 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
245 | integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
246 | dependencies:
247 | once "^1.3.0"
248 | wrappy "1"
249 |
250 | inherits@2:
251 | version "2.0.4"
252 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
253 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
254 |
255 | is-arrayish@^0.2.1:
256 | version "0.2.1"
257 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
258 | integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==
259 |
260 | is-fullwidth-code-point@^3.0.0:
261 | version "3.0.0"
262 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
263 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
264 |
265 | js-tokens@^4.0.0:
266 | version "4.0.0"
267 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
268 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
269 |
270 | js-yaml@^4.1.0:
271 | version "4.1.0"
272 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
273 | integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
274 | dependencies:
275 | argparse "^2.0.1"
276 |
277 | json-parse-even-better-errors@^2.3.0:
278 | version "2.3.1"
279 | resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
280 | integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
281 |
282 | json-schema-traverse@^0.4.1:
283 | version "0.4.1"
284 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
285 | integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
286 |
287 | json-schema-traverse@^1.0.0:
288 | version "1.0.0"
289 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
290 | integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
291 |
292 | lines-and-columns@^1.1.6:
293 | version "1.2.4"
294 | resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
295 | integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
296 |
297 | lodash.truncate@^4.4.2:
298 | version "4.4.2"
299 | resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
300 | integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==
301 |
302 | lodash@^4.17.21:
303 | version "4.17.21"
304 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
305 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
306 |
307 | lru-cache@^6.0.0:
308 | version "6.0.0"
309 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
310 | integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
311 | dependencies:
312 | yallist "^4.0.0"
313 |
314 | minimatch@^5.0.1:
315 | version "5.1.6"
316 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
317 | integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
318 | dependencies:
319 | brace-expansion "^2.0.1"
320 |
321 | once@^1.3.0:
322 | version "1.4.0"
323 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
324 | integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
325 | dependencies:
326 | wrappy "1"
327 |
328 | parent-module@^1.0.0:
329 | version "1.0.1"
330 | resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
331 | integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
332 | dependencies:
333 | callsites "^3.0.0"
334 |
335 | parse-json@^5.2.0:
336 | version "5.2.0"
337 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
338 | integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
339 | dependencies:
340 | "@babel/code-frame" "^7.0.0"
341 | error-ex "^1.3.1"
342 | json-parse-even-better-errors "^2.3.0"
343 | lines-and-columns "^1.1.6"
344 |
345 | path-type@^4.0.0:
346 | version "4.0.0"
347 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
348 | integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
349 |
350 | pluralize@^8.0.0:
351 | version "8.0.0"
352 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
353 | integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==
354 |
355 | prettier-linter-helpers@^1.0.0:
356 | version "1.0.0"
357 | resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
358 | integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
359 | dependencies:
360 | fast-diff "^1.1.2"
361 |
362 | prettier-plugin-solidity@^1.1.3:
363 | version "1.1.3"
364 | resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz#9a35124f578404caf617634a8cab80862d726cba"
365 | integrity sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==
366 | dependencies:
367 | "@solidity-parser/parser" "^0.16.0"
368 | semver "^7.3.8"
369 | solidity-comments-extractor "^0.0.7"
370 |
371 | prettier@^2.0.0, prettier@^2.8.3:
372 | version "2.8.8"
373 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
374 | integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
375 |
376 | punycode@^2.1.0:
377 | version "2.3.1"
378 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
379 | integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
380 |
381 | require-from-string@^2.0.2:
382 | version "2.0.2"
383 | resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
384 | integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
385 |
386 | resolve-from@^4.0.0:
387 | version "4.0.0"
388 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
389 | integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
390 |
391 | semver@^7.3.8, semver@^7.5.2:
392 | version "7.5.4"
393 | resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
394 | integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
395 | dependencies:
396 | lru-cache "^6.0.0"
397 |
398 | slice-ansi@^4.0.0:
399 | version "4.0.0"
400 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
401 | integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
402 | dependencies:
403 | ansi-styles "^4.0.0"
404 | astral-regex "^2.0.0"
405 | is-fullwidth-code-point "^3.0.0"
406 |
407 | solhint-plugin-prettier@^0.0.5:
408 | version "0.0.5"
409 | resolved "https://registry.yarnpkg.com/solhint-plugin-prettier/-/solhint-plugin-prettier-0.0.5.tgz#e3b22800ba435cd640a9eca805a7f8bc3e3e6a6b"
410 | integrity sha512-7jmWcnVshIrO2FFinIvDQmhQpfpS2rRRn3RejiYgnjIE68xO2bvrYvjqVNfrio4xH9ghOqn83tKuTzLjEbmGIA==
411 | dependencies:
412 | prettier-linter-helpers "^1.0.0"
413 |
414 | solhint@^3.5.1:
415 | version "3.6.2"
416 | resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.6.2.tgz#2b2acbec8fdc37b2c68206a71ba89c7f519943fe"
417 | integrity sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==
418 | dependencies:
419 | "@solidity-parser/parser" "^0.16.0"
420 | ajv "^6.12.6"
421 | antlr4 "^4.11.0"
422 | ast-parents "^0.0.1"
423 | chalk "^4.1.2"
424 | commander "^10.0.0"
425 | cosmiconfig "^8.0.0"
426 | fast-diff "^1.2.0"
427 | glob "^8.0.3"
428 | ignore "^5.2.4"
429 | js-yaml "^4.1.0"
430 | lodash "^4.17.21"
431 | pluralize "^8.0.0"
432 | semver "^7.5.2"
433 | strip-ansi "^6.0.1"
434 | table "^6.8.1"
435 | text-table "^0.2.0"
436 | optionalDependencies:
437 | prettier "^2.8.3"
438 |
439 | solidity-comments-extractor@^0.0.7:
440 | version "0.0.7"
441 | resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19"
442 | integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==
443 |
444 | string-width@^4.2.3:
445 | version "4.2.3"
446 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
447 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
448 | dependencies:
449 | emoji-regex "^8.0.0"
450 | is-fullwidth-code-point "^3.0.0"
451 | strip-ansi "^6.0.1"
452 |
453 | strip-ansi@^6.0.1:
454 | version "6.0.1"
455 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
456 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
457 | dependencies:
458 | ansi-regex "^5.0.1"
459 |
460 | supports-color@^5.3.0:
461 | version "5.5.0"
462 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
463 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
464 | dependencies:
465 | has-flag "^3.0.0"
466 |
467 | supports-color@^7.1.0:
468 | version "7.2.0"
469 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
470 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
471 | dependencies:
472 | has-flag "^4.0.0"
473 |
474 | table@^6.8.1:
475 | version "6.8.1"
476 | resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf"
477 | integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==
478 | dependencies:
479 | ajv "^8.0.1"
480 | lodash.truncate "^4.4.2"
481 | slice-ansi "^4.0.0"
482 | string-width "^4.2.3"
483 | strip-ansi "^6.0.1"
484 |
485 | text-table@^0.2.0:
486 | version "0.2.0"
487 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
488 | integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
489 |
490 | uri-js@^4.2.2:
491 | version "4.4.1"
492 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
493 | integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
494 | dependencies:
495 | punycode "^2.1.0"
496 |
497 | wrappy@1:
498 | version "1.0.2"
499 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
500 | integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
501 |
502 | yallist@^4.0.0:
503 | version "4.0.0"
504 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
505 | integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
506 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------