0.43.0 • Published 2 years ago
@alt-research/alt-contracts v0.43.0
Commands
Command | Description |
---|---|
forge build | npx hardhat compile | Compiles contracts. |
forge test | npx hardhat test | Runs contract tests. |
npm run lint | Runs Solhint and ESLint. |
slither . | Runs Slither, a Solidity static analysis framework. |
npm run fmt | Formats files. |
Hardhat Tasks
accounts
Usage: hardhat [GLOBAL OPTIONS] accounts --n <STRING>
OPTIONS:
--n number of accounts
--output-path output path
accounts: Generates accounts
e.g.
npx hardhat accounts --n 10 --output-path ./foo.json
init-bytecode
Usage: hardhat [GLOBAL OPTIONS] init-bytecode --args <STRING> --name <STRING> --output-path <STRING>
OPTIONS:
--args array of constructor arguments in JSON string
--name contract name
--output-path output path
init-bytecode: Returns initialization bytecode
e.g.
npx hardhat init-bytecode --name ERC20PresetMinterPauser --args '["TEST", "T"]' --output-path ./foo.json
deploy-proxy
Usage: hardhat [GLOBAL OPTIONS] deploy-proxy --args <STRING> --implementation <STRING> --opts <STRING>
OPTIONS:
--args arguments for the initializer function in JSON string
--implementation implmentation contract name
--opts an object with the following options: initializer: string | false, unsafeAllow: ValidationError[], constructorArgs: unknown[], timeout: number, pollingInterval: number, redeployImplementation: 'always' | 'never' | 'onchange', kind: 'uups' | 'transparent', usePlatformDeploy: boolean
deploy-proxy: Deploys a proxy contract
e.g.
npx hardhat --network 11155111 deploy-proxy --implementation TokenFaucet --args '[]' --opts '{}'
npx hardhat --network 11155111 deploy-proxy --implementation RateLimitedCounter --args '[]' --opts '{"constructorArgs":["10","5","10","1"]}'
upgrade-proxy
Usage: hardhat [GLOBAL OPTIONS] upgrade-proxy --implementation <STRING> --proxy <STRING>
OPTIONS:
--implementation implementation contract name
--proxy proxy contract address
upgrade-proxy: Upgrade a proxy contract
e.g.
npx hardhat --network 11155111 upgrade-proxy --implementation BoxV2 --proxy 0x772CEf59A311D10C245fEE54A87c573Cf8119326
verify-contract
Usage: hardhat [GLOBAL OPTIONS] verify-contract --address <STRING> --args <STRING> [--contract <STRING>]
OPTIONS:
--address contract address
--args constructor arguments in JSON string
--contract contract path
verify-contract: Verifies the source code for your Solidity contracts on Etherscan
e.g.
npx hardhat --network 11155111 verify-contract --address 0x2de8a1FDE04276a7022AA2143198CF5a12c70063 --args '[]'
npx hardhat --network 11155111 verify-contract --address 0xBc3e225a3915996A736B90EaDCcbb402BCCfee54 --args '["TEST","T"]' --contract @openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol:ERC20PresetMinterPauser
state-changes
Usage: hardhat [GLOBAL OPTIONS] state-changes --nonce <STRING> --output-path <STRING> --token-address <STRING>
OPTIONS:
--nonce nonce
--output-path output path
--token-address token address
state-changes: get state changes by nonce
e.g.
npx hardhat --network 11155111 state-changes --output-path ./foo.json --token-address 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 --nonce 0
merkleize
Usage: hardhat [GLOBAL OPTIONS] merkleize --chunk-size <STRING> --input-path <STRING> --output-path <STRING>
OPTIONS:
--chunk-size chunk size
--input-path input path
--output-path output path
merkleize: construct merkle tree
e.g.
npx hardhat merkleize --output-path ./l2-merkle-tree.json --chunk-size 100 --input-path ./l2-state-changes.json
execute-finalization
Usage: hardhat [GLOBAL OPTIONS] execute-finalization --finalizer <STRING> --input-path <STRING> --nonce <STRING> --private-key <STRING> --target <STRING>
OPTIONS:
--finalizer finalizer
--input-path input path
--nonce nonce
--private-key private key
--target target
execute-finalization: execute finalization
e.g.
npx hardhat --network 11155111 execute-finalization --input-path ./l2-merkle-tree.json --finalizer 0xEf23e67E3EA3dCBd0ce477510ED2Ff727dc3fb74 --target 0x8558aa7784162D51730Ae51ef5BEBDC9cc383AB6 --nonce 0 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Environment Variables
See .env.example
and create .env
file.
Core Development Principles and Strategies
- security in depth
- simple and modular code
- comprehensive unit testing
- pre-and-post-condition sanity checks
- clarity-driven naming conventions
- code consistency
- regular audits
License
This project is open source software.
0.42.0
2 years ago
0.43.0
2 years ago
0.40.0
2 years ago
0.41.0
2 years ago
0.40.1
2 years ago
0.39.0
2 years ago
0.38.1
2 years ago
0.37.2
2 years ago
0.38.0
2 years ago
0.37.1
2 years ago
0.37.0
2 years ago
0.36.1
2 years ago
0.36.0
2 years ago
0.35.0
2 years ago
0.34.0
2 years ago
0.33.0
2 years ago
0.32.0
2 years ago
0.31.0
2 years ago
0.30.0
2 years ago
0.29.4
2 years ago
0.29.3
2 years ago
0.29.2
2 years ago
0.29.1
2 years ago
0.29.0
2 years ago
0.28.0
2 years ago
0.27.0
2 years ago
0.26.0
2 years ago
0.25.1
2 years ago
0.25.0
2 years ago
0.24.1
2 years ago
0.24.0
2 years ago
0.23.1
2 years ago
0.23.0
2 years ago
0.22.1
2 years ago
0.22.0
2 years ago
0.21.4
2 years ago