mirror of
https://github.com/luxfi/sudoamm.git
synced 2026-07-25 16:17:09 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Make dependencies available
|
||||
export DAPP_REMAPPINGS=$(cat remappings.txt)
|
||||
|
||||
export DAPP_SOLC_VERSION=0.8.7
|
||||
export DAPP_BUILD_OPTIMIZE=1
|
||||
export DAPP_BUILD_OPTIMIZE_RUNS=1000000
|
||||
export DAPP_LINK_TEST_LIBRARIES=0
|
||||
export DAPP_TEST_VERBOSITY=1
|
||||
export DAPP_TEST_SMTTIMEOUT=500000
|
||||
|
||||
# set so that we can deploy to local node w/o hosted private keys
|
||||
export ETH_RPC_ACCOUNTS=true
|
||||
|
||||
if [ "$DEEP_FUZZ" == "true" ]
|
||||
then
|
||||
export DAPP_TEST_FUZZ_RUNS=50000 # Fuzz for a long time if DEEP_FUZZ is set to true.
|
||||
else
|
||||
export DAPP_TEST_FUZZ_RUNS=100 # Only fuzz briefly if DEEP_FUZZ is not set to true.
|
||||
fi
|
||||
@@ -0,0 +1,2 @@
|
||||
export ALCHEMY_API_KEY=YOUR_API_KEY
|
||||
export ETH_FROM=YOUR_DEFAULT_SENDER_ACCOUNT
|
||||
@@ -0,0 +1,2 @@
|
||||
.dapprc linguist-language=Shell
|
||||
*.sol linguist-language=Solidity
|
||||
@@ -0,0 +1,48 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
name: Tests
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: cachix/install-nix-action@v13
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: dapp
|
||||
|
||||
- name: Install dependencies
|
||||
run: nix-shell --run 'make'
|
||||
|
||||
- name: Run tests
|
||||
run: nix-shell --run 'make test'
|
||||
# Enable this if using forking tests
|
||||
# env:
|
||||
# ETH_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/${{ secrets.ALCHEMY_API_KEY }}
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: cachix/install-nix-action@v13
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: dapp
|
||||
|
||||
- name: Install dependencies
|
||||
run: nix-shell --run 'make'
|
||||
|
||||
- name: Build the contracts
|
||||
run: nix-shell --run 'make build'
|
||||
|
||||
- name: Deploy and run checks
|
||||
run: nix-shell --run './scripts/test-deploy.sh'
|
||||
@@ -0,0 +1,5 @@
|
||||
# Node
|
||||
node_modules
|
||||
|
||||
# Dapptools
|
||||
out/
|
||||
@@ -0,0 +1,7 @@
|
||||
[submodule "lib/ds-test"]
|
||||
path = lib/ds-test
|
||||
url = https://github.com/dapphub/ds-test
|
||||
[submodule "lib/openzeppelin-contracts"]
|
||||
path = lib/openzeppelin-contracts
|
||||
url = https://github.com/OpenZeppelin/openzeppelin-contracts
|
||||
ignore = dirty
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"solidity.packageDefaultDependenciesContractsDirectory": "src",
|
||||
"solidity.packageDefaultDependenciesDirectory": "lib",
|
||||
"files.associations": {
|
||||
".dapprc": "shellscript"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
@@ -0,0 +1,47 @@
|
||||
# include .env file and export its env vars
|
||||
# (-include to ignore error if it does not exist)
|
||||
-include .env
|
||||
|
||||
install: update npm solc
|
||||
|
||||
# dapp deps
|
||||
update:; dapp update
|
||||
|
||||
# npm deps for linting etc.
|
||||
npm:; yarn install
|
||||
|
||||
# install solc version
|
||||
# example to install other versions: `make solc 0_8_2`
|
||||
SOLC_VERSION := 0_8_7
|
||||
solc:; nix-env -f https://github.com/dapphub/dapptools/archive/master.tar.gz -iA solc-static-versions.solc_${SOLC_VERSION}
|
||||
|
||||
# Build & test
|
||||
build :; dapp build
|
||||
test :; dapp test # --ffi # enable if you need the `ffi` cheat code on HEVM
|
||||
clean :; dapp clean
|
||||
lint :; yarn run lint
|
||||
estimate :; ./scripts/estimate-gas.sh ${contract}
|
||||
size :; ./scripts/contract-size.sh ${contract}
|
||||
|
||||
# Deployment helpers
|
||||
deploy :; @./scripts/deploy.sh
|
||||
|
||||
# mainnet
|
||||
deploy-mainnet: export ETH_RPC_URL = $(call network,mainnet)
|
||||
deploy-mainnet: check-api-key deploy
|
||||
|
||||
# rinkeby
|
||||
deploy-rinkeby: export ETH_RPC_URL = $(call network,rinkeby)
|
||||
deploy-rinkeby: check-api-key deploy
|
||||
|
||||
check-api-key:
|
||||
ifndef ALCHEMY_API_KEY
|
||||
$(error ALCHEMY_API_KEY is undefined)
|
||||
endif
|
||||
|
||||
# Returns the URL to deploy to a hosted node.
|
||||
# Requires the ALCHEMY_API_KEY env var to be set.
|
||||
# The first argument determines the network (mainnet / rinkeby / ropsten / kovan / goerli)
|
||||
define network
|
||||
https://eth-$1.alchemyapi.io/v2/${ALCHEMY_API_KEY}
|
||||
endef
|
||||
@@ -0,0 +1,91 @@
|
||||
# <h1 align="center"> DappTools Template </h1>
|
||||
|
||||
**Template repository for getting started quickly with DappTools**
|
||||
|
||||

|
||||
|
||||
## Building and testing
|
||||
|
||||
```sh
|
||||
git clone https://github.com/gakonst/dapptools-template
|
||||
cd dapptools-template
|
||||
make
|
||||
make test
|
||||
```
|
||||
|
||||
## Deploying
|
||||
|
||||
Contracts can be deployed via the `make deploy` command. Addresses are automatically
|
||||
written in a name-address json file stored under `out/addresses.json`.
|
||||
|
||||
We recommend testing your deployments and provide an example under [`scripts/test-deploy.sh`](./scripts/test-deploy.sh)
|
||||
which will launch a local testnet, deploy the contracts, and do some sanity checks.
|
||||
|
||||
Environment variables under the `.env` file are automatically loaded (see [`.env.example`](./.env.example)).
|
||||
Be careful of the [precedence in which env vars are read](https://github.com/dapphub/dapptools/tree/2cf441052489625f8635bc69eb4842f0124f08e4/src/dapp#precedence).
|
||||
|
||||
We assume `ETH_FROM` is an address you own and is part of your keystore.
|
||||
If not, use `ethsign import` to import your private key.
|
||||
|
||||
See the [`Makefile`](./Makefile#25) for more context on how this works under the hood
|
||||
|
||||
We use Alchemy as a remote node provider for the Mainnet & Rinkeby network deployments.
|
||||
You must have set your API key as the `ALCHEMY_API_KEY` enviroment variable in order to
|
||||
deploy to these networks
|
||||
|
||||
### Mainnet
|
||||
|
||||
```
|
||||
ETH_FROM=0x3538b6eF447f244268BCb2A0E1796fEE7c45002D make deploy-mainnet
|
||||
```
|
||||
|
||||
### Rinkeby
|
||||
|
||||
```
|
||||
ETH_FROM=0x3538b6eF447f244268BCb2A0E1796fEE7c45002D make deploy-rinkeby
|
||||
```
|
||||
|
||||
### Custom Network
|
||||
|
||||
```
|
||||
ETH_RPC_URL=<your network> make deploy
|
||||
```
|
||||
|
||||
### Local Testnet
|
||||
|
||||
```
|
||||
# on one terminal
|
||||
dapp testnet
|
||||
# get the printed account address from the testnet, and set it as ETH_FROM. Then:
|
||||
make deploy
|
||||
```
|
||||
|
||||
## Installing the toolkit
|
||||
|
||||
If you do not have DappTools already installed, you'll need to run the below
|
||||
commands
|
||||
|
||||
### Install Nix
|
||||
|
||||
```sh
|
||||
# User must be in sudoers
|
||||
curl -L https://nixos.org/nix/install | sh
|
||||
|
||||
# Run this or login again to use Nix
|
||||
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||
```
|
||||
|
||||
### Install DappTools
|
||||
|
||||
```sh
|
||||
curl https://dapp.tools/install | sh
|
||||
```
|
||||
|
||||
## DappTools Resources
|
||||
|
||||
* [DappTools](https://dapp.tools)
|
||||
* [Hevm Docs](https://github.com/dapphub/dapptools/blob/master/src/hevm/README.md)
|
||||
* [Dapp Docs](https://github.com/dapphub/dapptools/tree/master/src/dapp/README.md)
|
||||
* [Seth Docs](https://github.com/dapphub/dapptools/tree/master/src/seth/README.md)
|
||||
* [DappTools Overview](https://www.youtube.com/watch?v=lPinWgaNceM)
|
||||
* [Awesome-DappTools](https://github.com/rajivpo/awesome-dapptools)
|
||||
Submodule
+1
Submodule lib/ds-test added at 0a5da56b0d
Submodule
+1
Submodule lib/openzeppelin-contracts added at aefcb3e8aa
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "dapptools-template",
|
||||
"author": "Georgios Konstantopoulos",
|
||||
"license": "Unlicense",
|
||||
"version": "1.0.0",
|
||||
"description": "A template for building dapptools projects",
|
||||
"files": [
|
||||
"*.sol"
|
||||
],
|
||||
"devDependencies": {
|
||||
"copyfiles": "^2.4.1",
|
||||
"prettier": "^2.3.1",
|
||||
"prettier-plugin-solidity": "^1.0.0-beta.13",
|
||||
"rimraf": "^3.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "copyfiles -u 1 \"./src/**/*.sol\" --exclude \"./src/test/**/*.sol\" ./",
|
||||
"postpublish": "rimraf ./*.sol",
|
||||
"prepack": "yarn prepublishOnly",
|
||||
"postpack": "yarn postpublish",
|
||||
"lint": "prettier --write src/**/*.sol"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
@openzeppelin/=lib/openzeppelin-contracts/
|
||||
ds-test/=lib/ds-test/src/
|
||||
@@ -0,0 +1,141 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# All contracts are output to `out/addresses.json` by default
|
||||
OUT_DIR=${OUT_DIR:-$PWD/out}
|
||||
ADDRESSES_FILE=${ADDRESSES_FILE:-$OUT_DIR/"addresses.json"}
|
||||
# default to localhost rpc
|
||||
ETH_RPC_URL=${ETH_RPC_URL:-http://localhost:8545}
|
||||
|
||||
# green log helper
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
log() {
|
||||
printf '%b\n' "${GREEN}${*}${NC}"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Coloured output helpers
|
||||
if command -v tput > /dev/null 2>&1; then
|
||||
if [ $(($(tput colors 2> /dev/null))) -ge 8 ]; then
|
||||
# Enable colors
|
||||
TPUT_RESET="$(tput sgr 0)"
|
||||
TPUT_YELLOW="$(tput setaf 3)"
|
||||
TPUT_RED="$(tput setaf 1)"
|
||||
TPUT_BLUE="$(tput setaf 4)"
|
||||
TPUT_GREEN="$(tput setaf 2)"
|
||||
TPUT_WHITE="$(tput setaf 7)"
|
||||
TPUT_BOLD="$(tput bold)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ensure ETH_FROM is set and give a meaningful error message
|
||||
if [[ -z ${ETH_FROM} ]]; then
|
||||
echo "ETH_FROM not found, please set it and re-run the last command."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Setup addresses file
|
||||
cat > "$ADDRESSES_FILE" <<EOF
|
||||
{
|
||||
"DEPLOYER": "$(seth --to-checksum-address "$ETH_FROM")"
|
||||
}
|
||||
EOF
|
||||
|
||||
# Call as `ETH_FROM=0x... ETH_RPC_URL=<url> deploy ContractName arg1 arg2 arg3`
|
||||
# (or omit the env vars if you have already set them)
|
||||
deploy() {
|
||||
NAME=$1
|
||||
ARGS=${@:2}
|
||||
# select the filename and the contract in it
|
||||
PATTERN=".contracts[\"src/$NAME.sol\"].$NAME"
|
||||
|
||||
# get the constructor's signature
|
||||
ABI=$(jq -r "$PATTERN.abi" out/dapp.sol.json)
|
||||
SIG=$(echo $ABI | seth --abi-constructor)
|
||||
|
||||
# get the bytecode from the compiled file
|
||||
BYTECODE=0x$(jq -r "$PATTERN.evm.bytecode.object" out/dapp.sol.json)
|
||||
|
||||
# estimate gas
|
||||
GAS=$(seth estimate --create $BYTECODE $SIG $ARGS --rpc-url $ETH_RPC_URL)
|
||||
|
||||
# deploy
|
||||
ADDRESS=$(dapp create $NAME $ARGS -- --gas $GAS --rpc-url $ETH_RPC_URL)
|
||||
|
||||
# save the addrs to the json
|
||||
# TODO: It'd be nice if we could evolve this into a minimal versioning system
|
||||
# e.g. via commit / chainid etc.
|
||||
saveContract $NAME $ADDRESS
|
||||
|
||||
echo $ADDRESS
|
||||
}
|
||||
|
||||
# Call as `saveContract ContractName 0xYourAddress` to store the contract name
|
||||
# & address to the addresses json file
|
||||
saveContract() {
|
||||
# create an empty json if it does not exist
|
||||
if [[ ! -e $ADDRESSES_FILE ]]; then
|
||||
echo "{}" > $ADDRESSES_FILE
|
||||
fi
|
||||
result=$(cat $ADDRESSES_FILE | jq -r ". + {\"$1\": \"$2\"}")
|
||||
printf %s "$result" > "$ADDRESSES_FILE"
|
||||
}
|
||||
|
||||
estimate_gas() {
|
||||
NAME=$1
|
||||
ARGS=${@:2}
|
||||
# select the filename and the contract in it
|
||||
PATTERN=".contracts[\"src/$NAME.sol\"].$NAME"
|
||||
|
||||
# get the constructor's signature
|
||||
ABI=$(jq -r "$PATTERN.abi" out/dapp.sol.json)
|
||||
SIG=$(echo $ABI | seth --abi-constructor)
|
||||
|
||||
# get the bytecode from the compiled file
|
||||
BYTECODE=0x$(jq -r "$PATTERN.evm.bytecode.object" out/dapp.sol.json)
|
||||
# estimate gas
|
||||
GAS=$(seth estimate --create $BYTECODE $SIG $ARGS --rpc-url $ETH_RPC_URL)
|
||||
|
||||
GASNOW_RESPONSE=$(curl -s https://www.gasnow.org/api/v3/gas/price)
|
||||
response=$(jq '.code' <<< $GASNOW_RESPONSE)
|
||||
if [[ $response != "200" ]]; then
|
||||
echo "Could not get gas information from ${TPUT_BOLD}gasnow.org${TPUT_RESET}: https://www.gasnow.org"
|
||||
echo "response code: $response"
|
||||
else
|
||||
rapid=$(( $(jq '.data.rapid' <<< $GASNOW_RESPONSE) / 1000000000 ))
|
||||
fast=$(( $(jq '.data.fast' <<< $GASNOW_RESPONSE) / 1000000000 ))
|
||||
standard=$(( $(jq '.data.standard' <<< $GASNOW_RESPONSE) / 1000000000 ))
|
||||
slow=$(( $(jq '.data.slow' <<< $GASNOW_RESPONSE) / 1000000000 ))
|
||||
echo "Gas prices from ${TPUT_BOLD}gasnow.org${TPUT_RESET}: https://www.gasnow.org"
|
||||
echo " \
|
||||
${TPUT_RED}Rapid: $rapid gwei ${TPUT_RESET} \n
|
||||
${TPUT_YELLOW}Fast: $fast gwei \n
|
||||
${TPUT_BLUE}Standard: $standard gwei \n
|
||||
${TPUT_GREEN}Slow: $slow gwei${TPUT_RESET}" | column -t
|
||||
size=$(contract_size $NAME)
|
||||
echo "Estimated Gas cost for deployment of $NAME: ${TPUT_BOLD}$GAS${TPUT_RESET} units of gas"
|
||||
echo "Contract Size: ${size} bytes"
|
||||
echo "Total cost for deployment:"
|
||||
rapid_cost=$(echo "scale=5; $GAS*$rapid/1000000000" | bc)
|
||||
fast_cost=$(echo "scale=5; $GAS*$fast/1000000000" | bc)
|
||||
standard_cost=$(echo "scale=5; $GAS*$standard/1000000000" | bc)
|
||||
slow_cost=$(echo "scale=5; $GAS*$slow/1000000000" | bc)
|
||||
echo " \
|
||||
${TPUT_RED}Rapid: $rapid_cost ETH ${TPUT_RESET} \n
|
||||
${TPUT_YELLOW}Fast: $fast_cost ETH \n
|
||||
${TPUT_BLUE}Standard: $standard_cost ETH \n
|
||||
${TPUT_GREEN}Slow: $slow_cost ETH ${TPUT_RESET}" | column -t
|
||||
fi
|
||||
}
|
||||
|
||||
contract_size(){
|
||||
NAME=$1
|
||||
ARGS=${@:2}
|
||||
# select the filename and the contract in it
|
||||
PATTERN=".contracts[\"src/$NAME.sol\"].$NAME"
|
||||
|
||||
# get the bytecode from the compiled file
|
||||
BYTECODE=0x$(jq -r "$PATTERN.evm.bytecode.object" out/dapp.sol.json)
|
||||
length=$(echo $BYTECODE | wc -m )
|
||||
echo $(( $length / 2 ))
|
||||
}
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
. $(dirname $0)/common.sh
|
||||
|
||||
if [[ -z $contract ]]; then
|
||||
if [[ -z ${1} ]];then
|
||||
echo '"$contract" env variable is not set. Set it to the name of the contract you want to estimate gas cost for.'
|
||||
exit 1
|
||||
else
|
||||
contract=${1}
|
||||
fi
|
||||
fi
|
||||
contract_size=$(contract_size ${contract})
|
||||
echo "Contract Name: ${contract}"
|
||||
echo "Contract Size: ${contract_size} bytes"
|
||||
echo "$(( 24576 - ${contract_size} )) bytes left to reach the smart contract size limit of 24576 bytes."
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# import the deployment helpers
|
||||
. $(dirname $0)/common.sh
|
||||
|
||||
# Deploy.
|
||||
GreeterAddr=$(deploy Greeter)
|
||||
log "Greeter deployed at:" $GreeterAddr
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
. $(dirname $0)/common.sh
|
||||
|
||||
if [[ -z $contract ]]; then
|
||||
if [[ -z ${1} ]];then
|
||||
echo '"$contract" env variable is not set. Set it to the name of the contract you want to estimate gas cost for.'
|
||||
exit 1
|
||||
else
|
||||
contract=${1}
|
||||
fi
|
||||
fi
|
||||
|
||||
estimate_gas $contract
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Utility for running a temporary dapp testnet w/ an ephemeral account
|
||||
# to be used for deployment tests
|
||||
|
||||
# make a temp dir to store testnet info
|
||||
export TMPDIR=$(mktemp -d)
|
||||
|
||||
# clean up
|
||||
trap 'killall geth && rm -rf "$TMPDIR"' EXIT
|
||||
trap "exit 1" SIGINT SIGTERM
|
||||
|
||||
# test helper
|
||||
error() {
|
||||
printf 1>&2 "fail: function '%s' at line %d.\n" "${FUNCNAME[1]}" "${BASH_LINENO[0]}"
|
||||
printf 1>&2 "got: %s" "$output"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# launch the testnet
|
||||
dapp testnet --dir "$TMPDIR" &
|
||||
# wait for it to launch (can't go <3s)
|
||||
sleep 3
|
||||
|
||||
# get the created account (it's unlocked so we only need to set the address)
|
||||
export ETH_FROM=$(seth ls --keystore $TMPDIR/8545/keystore | cut -f1)
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# bring up the network
|
||||
. $(dirname $0)/run-temp-testnet.sh
|
||||
|
||||
# run the deploy script
|
||||
. $(dirname $0)/deploy.sh
|
||||
|
||||
# get the address
|
||||
addr=$(jq -r '.Greeter' out/addresses.json)
|
||||
|
||||
# the initial greeting must be empty
|
||||
greeting=$(seth call $addr 'greeting()(string)')
|
||||
[[ $greeting = "" ]] || error
|
||||
|
||||
# set it to a value
|
||||
seth send $addr \
|
||||
'greet(string memory)' '"yo"' \
|
||||
--keystore $TMPDIR/8545/keystore \
|
||||
--password /dev/null
|
||||
|
||||
sleep 1
|
||||
|
||||
# should be set afterwards
|
||||
greeting=$(seth call $addr 'greeting()(string)')
|
||||
[[ $greeting = "yo" ]] || error
|
||||
|
||||
echo "Success."
|
||||
@@ -0,0 +1,18 @@
|
||||
let
|
||||
pkgs = import (builtins.fetchGit rec {
|
||||
name = "dapptools-${rev}";
|
||||
url = https://github.com/dapphub/dapptools;
|
||||
rev = "adcc076b1441b3a928a8f0b42b2a63f05d9bcf0d";
|
||||
}) {};
|
||||
|
||||
in
|
||||
pkgs.mkShell {
|
||||
src = null;
|
||||
name = "dapptools-template";
|
||||
buildInputs = with pkgs; [
|
||||
pkgs.dapp
|
||||
pkgs.seth
|
||||
pkgs.go-ethereum-unlimited
|
||||
pkgs.hevm
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: Unlicense
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "@openzeppelin/contracts/access/Ownable.sol";
|
||||
|
||||
library Errors {
|
||||
string constant InvalidBlockNumber = "invalid block number, please wait";
|
||||
string constant CannotGm = "cannot greet with gm";
|
||||
}
|
||||
|
||||
contract Greeter is Ownable {
|
||||
string public greeting;
|
||||
|
||||
function gm() onlyOwner public {
|
||||
require(block.number % 10 == 0, Errors.InvalidBlockNumber);
|
||||
greeting = "gm";
|
||||
}
|
||||
|
||||
function greet(string memory _greeting) public {
|
||||
require(keccak256(abi.encodePacked(_greeting)) != keccak256("gm"), Errors.CannotGm);
|
||||
greeting = _greeting;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: Unlicense
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "./utils/GreeterTest.sol";
|
||||
import { Errors } from "../Greeter.sol";
|
||||
|
||||
contract Greet is GreeterTest {
|
||||
function testCannotGm() public {
|
||||
try alice.greet("gm") { fail(); } catch Error(string memory error) {
|
||||
assertEq(error, Errors.CannotGm);
|
||||
}
|
||||
}
|
||||
|
||||
function testCanSetGreeting() public {
|
||||
alice.greet("hi");
|
||||
assertEq(greeter.greeting(), "hi");
|
||||
}
|
||||
|
||||
function testWorksForAllGreetings(string memory greeting) public {
|
||||
alice.greet(greeting);
|
||||
assertEq(greeter.greeting(), greeting);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
contract Gm is GreeterTest {
|
||||
function testOwnerCanGmOnGoodBlocks() public {
|
||||
hevm.roll(10);
|
||||
alice.gm();
|
||||
assertEq(greeter.greeting(), "gm");
|
||||
}
|
||||
|
||||
function testOwnerCannotGmOnBadBlocks() public {
|
||||
hevm.roll(11);
|
||||
try alice.gm() { fail(); } catch Error(string memory error) {
|
||||
assertEq(error, Errors.InvalidBlockNumber);
|
||||
}
|
||||
}
|
||||
|
||||
function testNonOwnerCannotGm() public {
|
||||
try bob.gm() { fail(); } catch Error(string memory error) {
|
||||
assertEq(error, "Ownable: caller is not the owner");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// SPDX-License-Identifier: Unlicense
|
||||
pragma solidity ^0.8.0;
|
||||
import "ds-test/test.sol";
|
||||
|
||||
import "../../Greeter.sol";
|
||||
import "./Hevm.sol";
|
||||
|
||||
contract User {
|
||||
Greeter internal greeter;
|
||||
|
||||
constructor(address _greeter) {
|
||||
greeter = Greeter(_greeter);
|
||||
}
|
||||
|
||||
function greet(string memory greeting) public {
|
||||
greeter.greet(greeting);
|
||||
}
|
||||
|
||||
function gm() public {
|
||||
greeter.gm();
|
||||
}
|
||||
}
|
||||
|
||||
contract GreeterTest is DSTest {
|
||||
Hevm internal constant hevm = Hevm(HEVM_ADDRESS);
|
||||
|
||||
// contracts
|
||||
Greeter internal greeter;
|
||||
|
||||
// users
|
||||
User internal alice;
|
||||
User internal bob;
|
||||
|
||||
function setUp() public virtual {
|
||||
greeter = new Greeter();
|
||||
alice = new User(address(greeter));
|
||||
bob = new User(address(greeter));
|
||||
greeter.transferOwnership(address(alice));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: Unlicense
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
abstract contract Hevm {
|
||||
// sets the block timestamp to x
|
||||
function warp(uint x) public virtual;
|
||||
// sets the block number to x
|
||||
function roll(uint x) public virtual;
|
||||
// sets the slot loc of contract c to val
|
||||
function store(address c, bytes32 loc, bytes32 val) public virtual;
|
||||
function ffi(string[] calldata) external virtual returns (bytes memory);
|
||||
}
|
||||
@@ -0,0 +1,360 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@solidity-parser/parser@^0.13.2":
|
||||
version "0.13.2"
|
||||
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.13.2.tgz#b6c71d8ca0b382d90a7bbed241f9bc110af65cbe"
|
||||
integrity sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==
|
||||
dependencies:
|
||||
antlr4ts "^0.5.0-alpha.4"
|
||||
|
||||
ansi-regex@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
||||
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
antlr4ts@^0.5.0-alpha.4:
|
||||
version "0.5.0-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a"
|
||||
integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
|
||||
copyfiles@^2.4.1:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||
integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==
|
||||
dependencies:
|
||||
glob "^7.0.5"
|
||||
minimatch "^3.0.3"
|
||||
mkdirp "^1.0.4"
|
||||
noms "0.0.0"
|
||||
through2 "^2.0.1"
|
||||
untildify "^4.0.0"
|
||||
yargs "^16.1.0"
|
||||
|
||||
core-util-is@~1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
|
||||
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
emoji-regex@^9.2.2:
|
||||
version "9.2.2"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
||||
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
||||
|
||||
escape-string-regexp@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob@^7.0.5, glob@^7.1.3:
|
||||
version "7.1.7"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
|
||||
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.4"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2, inherits@^2.0.1, inherits@~2.0.1, inherits@~2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
isarray@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||
integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
|
||||
|
||||
isarray@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
||||
|
||||
lru-cache@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
minimatch@^3.0.3, minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
mkdirp@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
noms@0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859"
|
||||
integrity sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=
|
||||
dependencies:
|
||||
inherits "^2.0.1"
|
||||
readable-stream "~1.0.31"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
|
||||
prettier-plugin-solidity@^1.0.0-beta.13:
|
||||
version "1.0.0-beta.17"
|
||||
resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.17.tgz#fc0fe977202b6503763a338383efeceaa6c7661e"
|
||||
integrity sha512-YFkxV/rHi1mphi17/XKcJ9QjZlb+L/J0yY2erix21BZfzPv2BN9dfmSRGr/poDp/FBOFSW+jteP2BCMe7HndVQ==
|
||||
dependencies:
|
||||
"@solidity-parser/parser" "^0.13.2"
|
||||
emoji-regex "^9.2.2"
|
||||
escape-string-regexp "^4.0.0"
|
||||
semver "^7.3.5"
|
||||
solidity-comments-extractor "^0.0.7"
|
||||
string-width "^4.2.2"
|
||||
|
||||
prettier@^2.3.1:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
|
||||
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==
|
||||
|
||||
process-nextick-args@~2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||
|
||||
readable-stream@~1.0.31:
|
||||
version "1.0.34"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
|
||||
integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=
|
||||
dependencies:
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.1"
|
||||
isarray "0.0.1"
|
||||
string_decoder "~0.10.x"
|
||||
|
||||
readable-stream@~2.3.6:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
||||
dependencies:
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.3"
|
||||
isarray "~1.0.0"
|
||||
process-nextick-args "~2.0.0"
|
||||
safe-buffer "~5.1.1"
|
||||
string_decoder "~1.1.1"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
|
||||
|
||||
rimraf@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
|
||||
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
|
||||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||
|
||||
semver@^7.3.5:
|
||||
version "7.3.5"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
solidity-comments-extractor@^0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19"
|
||||
integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2:
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
|
||||
integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
string_decoder@~0.10.x:
|
||||
version "0.10.31"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
|
||||
integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=
|
||||
|
||||
string_decoder@~1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
|
||||
dependencies:
|
||||
safe-buffer "~5.1.0"
|
||||
|
||||
strip-ansi@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
|
||||
integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.0"
|
||||
|
||||
through2@^2.0.1:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
|
||||
integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
|
||||
dependencies:
|
||||
readable-stream "~2.3.6"
|
||||
xtend "~4.0.1"
|
||||
|
||||
untildify@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
|
||||
integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==
|
||||
|
||||
util-deprecate@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
xtend@~4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
|
||||
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yallist@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.1.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
||||
Reference in New Issue
Block a user