From 8364a2a9417e9068fe87ed05ce64621fbbaa101e Mon Sep 17 00:00:00 2001 From: Maksym Kulish Date: Wed, 17 Jan 2024 19:22:49 +0200 Subject: [PATCH 1/5] Deneb support --- Dockerfile | 18 +++++++++--------- eth_possim/resources/cl/minimal.yaml | 12 ++++++++++++ eth_possim/resources/cl/privatenet.yaml | 3 ++- eth_possim/resources/el/genesis.json | 1 + .../resources/shell/cl/__init/eth2-genesis.sh | 4 ++-- requirements-dev.txt | 3 ++- 6 files changed, 28 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 13d267e..abbfd7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,13 +23,13 @@ ARG DEBIAN_RELEASE="bookworm" # Lighthouse testnet bakery helper -ARG LCLI_VERSION="4.5.0" +ARG LCLI_VERSION="4.6.0-rc.0" # Ethereum clients -ARG GETH_VERSION="1.13.2" -ARG LIGHTHOUSE_VERSION="4.5.0" -ARG TEKU_VERSION="23.10.0" -ARG MEV_BOOST_VERSION="1.6" +ARG GETH_VERSION="1.13.10" +ARG LIGHTHOUSE_VERSION="4.6.0-rc.0" +ARG TEKU_VERSION="24.1.0" +ARG MEV_BOOST_VERSION="1.7a1" # prysm image FROM bitnami/minideb:${DEBIAN_RELEASE} AS prysmbuilder @@ -38,7 +38,7 @@ FROM bitnami/minideb:${DEBIAN_RELEASE} AS prysmbuilder ARG BAZELISK_VERSION="1.17.0" ARG BAZELISK_SHA256="61699e22abb2a26304edfa1376f65ad24191f94a4ffed68a58d42b6fee01e124" -ARG PRYSM_REF="refs/tags/v4.0.8" +ARG PRYSM_REF="refs/tags/v4.2.0" ENV BAZELISK_VERSION="${BAZELISK_VERSION}" ENV PRYSM_REF="${PRYSM_REF}" @@ -62,7 +62,7 @@ RUN find -L /usr/local/prysm # builder and relay FROM bitnami/minideb:${DEBIAN_RELEASE} AS mevbuilder -ARG FLASHBOTS_BUILDER_REF="v1.11.5-0.2.1" +ARG FLASHBOTS_BUILDER_REF="b2dcbddfb1c81b1c20f0870d6fca414b9016433b" ARG MAINIFOLD_FREELAY_REF="support-privatenet" ENV GO_1_20_SHA256="5a9ebcc65c1cce56e0d2dc616aff4c4cedcfbda8cc6f0288cc08cda3b18dcbf1" @@ -93,7 +93,7 @@ RUN PATH="/usr/local/go/bin/:$PATH" go run build/ci.go install -static ./cmd/get FROM bitnami/minideb:${DEBIAN_RELEASE} AS genesisbuilder # Testnet baking accessories ARG ZCLI_REF="refs/tags/v0.6.0" -ARG ETH2_TESTNET_GENESIS_REF="refs/tags/v0.8.0" +ARG ETH2_TESTNET_GENESIS_REF="955d4a81095c019dd712ba96316c426330133240" ENV GO_1_19_SHA256="464b6b66591f6cf055bc5df90a9750bf5fbc9d038722bb84a9d56a2bea974be6" ENV ZCLI_REF="${ZCLI_REF}" ENV ETH2_TESTNET_GENESIS_REF="${ETH2_TESTNET_GENESIS_REF}" @@ -111,7 +111,7 @@ RUN git clone https://github.com/protolambda/zcli.git && cd zcli && git fetch or RUN cd zcli && PATH="/usr/local/go/bin/:$PATH" go build # Build genesis tool -RUN git clone https://github.com/protolambda/eth2-testnet-genesis.git && cd eth2-testnet-genesis && git fetch origin "${ETH2_TESTNET_GENESIS_REF}" && git checkout "${ETH2_TESTNET_GENESIS_REF}" +RUN git clone https://github.com/pk910/eth2-testnet-genesis.git && cd eth2-testnet-genesis && git fetch origin "${ETH2_TESTNET_GENESIS_REF}" && git checkout "${ETH2_TESTNET_GENESIS_REF}" RUN cd eth2-testnet-genesis && PATH="/usr/local/go/bin/:$PATH" go build # builder and relay diff --git a/eth_possim/resources/cl/minimal.yaml b/eth_possim/resources/cl/minimal.yaml index 18f3106..d4a9afe 100644 --- a/eth_possim/resources/cl/minimal.yaml +++ b/eth_possim/resources/cl/minimal.yaml @@ -95,3 +95,15 @@ DEPOSIT_CHAIN_ID: 5 DEPOSIT_NETWORK_ID: 5 # Configured on a per testnet basis DEPOSIT_CONTRACT_ADDRESS: 0xde1802CF413AC060F06abB158b15762016c196ad + + +# Misc +# --------------------------------------------------------------- +# [customized] +FIELD_ELEMENTS_PER_BLOB: 4096 +# [customized] +MAX_BLOB_COMMITMENTS_PER_BLOCK: 16 +# `uint64(6)` +MAX_BLOBS_PER_BLOCK: 6 +# [customized] `floorlog2(BLOB_KZG_COMMITMENTS_GINDEX) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 4 = 9 +KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 9 \ No newline at end of file diff --git a/eth_possim/resources/cl/privatenet.yaml b/eth_possim/resources/cl/privatenet.yaml index d4820db..8c0899e 100644 --- a/eth_possim/resources/cl/privatenet.yaml +++ b/eth_possim/resources/cl/privatenet.yaml @@ -15,12 +15,13 @@ GENESIS_DELAY: 0 ALTAIR_FORK_EPOCH: 0 BELLATRIX_FORK_EPOCH: 0 CAPELLA_FORK_EPOCH: 0 +DENEB_FORK_EPOCH: 0 EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 8 # A.K.A. EIP4844 DENEB_FORK_VERSION: "0x04000001" -DENEB_FORK_EPOCH: 18446744073709551615 + # Very fast deposit discovery ETH1_FOLLOW_DISTANCE: 6 diff --git a/eth_possim/resources/el/genesis.json b/eth_possim/resources/el/genesis.json index 5fd02c8..d6e72c0 100644 --- a/eth_possim/resources/el/genesis.json +++ b/eth_possim/resources/el/genesis.json @@ -17,6 +17,7 @@ "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true, "shanghaiTime": 0, + "cancunTime": 0, "ethash": {} }, "difficulty": "1", diff --git a/eth_possim/resources/shell/cl/__init/eth2-genesis.sh b/eth_possim/resources/shell/cl/__init/eth2-genesis.sh index 3caa040..d6072ee 100644 --- a/eth_possim/resources/shell/cl/__init/eth2-genesis.sh +++ b/eth_possim/resources/shell/cl/__init/eth2-genesis.sh @@ -4,7 +4,7 @@ set -euxo pipefail # Generate post-merge (Capella-enabled) genesis genesis_args=( - capella + deneb --legacy-config {{ cfg.meta.dir.cl }}/etc/config-prysm.yaml --config {{ cfg.meta.dir.cl }}/etc/config-prysm.yaml --mnemonics {{ cfg.meta.dir.cl }}/etc/mnemonics.yaml @@ -20,7 +20,7 @@ genesis_args=( ) pretty_args=( - capella + deneb BeaconState --config {{ cfg.meta.dir.cl }}/etc/config-prysm.yaml --preset-phase0 minimal diff --git a/requirements-dev.txt b/requirements-dev.txt index 577f884..ed1ab8b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ pytest pytest-ordering -pytest-timeout \ No newline at end of file +pytest-timeout +typing-extensions \ No newline at end of file From 37b6fea0be93028bcf6947634b5cf8f33272518b Mon Sep 17 00:00:00 2001 From: Maksym Kulish Date: Mon, 26 Feb 2024 14:06:38 +0200 Subject: [PATCH 2/5] Working deneb support --- Dockerfile | 28 +++---- eth_possim/__main__.py | 22 +++++- eth_possim/contracts.py | 38 +++++++--- eth_possim/resources/cl/minimal.yaml | 3 +- .../resources/shell/cl/__init/eth2-genesis.sh | 3 +- requirements-dev.txt | 2 +- setup.py | 12 +-- tests/test_pos_mev_enabled.py | 73 +++++++++++++++++-- tests/test_pos_privatenet.py | 66 +++++++++++++++-- 9 files changed, 198 insertions(+), 49 deletions(-) diff --git a/Dockerfile b/Dockerfile index abbfd7b..eff90eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,12 +23,12 @@ ARG DEBIAN_RELEASE="bookworm" # Lighthouse testnet bakery helper -ARG LCLI_VERSION="4.6.0-rc.0" +ARG LCLI_VERSION="5.0.0" # Ethereum clients -ARG GETH_VERSION="1.13.10" -ARG LIGHTHOUSE_VERSION="4.6.0-rc.0" -ARG TEKU_VERSION="24.1.0" +ARG GETH_VERSION="1.13.13" +ARG LIGHTHOUSE_VERSION="5.0.0" +ARG TEKU_VERSION="24.2.0" ARG MEV_BOOST_VERSION="1.7a1" # prysm image @@ -62,7 +62,7 @@ RUN find -L /usr/local/prysm # builder and relay FROM bitnami/minideb:${DEBIAN_RELEASE} AS mevbuilder -ARG FLASHBOTS_BUILDER_REF="b2dcbddfb1c81b1c20f0870d6fca414b9016433b" +ARG FLASHBOTS_BUILDER_REF="7845c515c32ef08f15c420fda0f5de4f2e6800cd" ARG MAINIFOLD_FREELAY_REF="support-privatenet" ENV GO_1_20_SHA256="5a9ebcc65c1cce56e0d2dc616aff4c4cedcfbda8cc6f0288cc08cda3b18dcbf1" @@ -92,9 +92,9 @@ RUN PATH="/usr/local/go/bin/:$PATH" go run build/ci.go install -static ./cmd/get # genesis & zcli tools FROM bitnami/minideb:${DEBIAN_RELEASE} AS genesisbuilder # Testnet baking accessories -ARG ZCLI_REF="refs/tags/v0.6.0" -ARG ETH2_TESTNET_GENESIS_REF="955d4a81095c019dd712ba96316c426330133240" -ENV GO_1_19_SHA256="464b6b66591f6cf055bc5df90a9750bf5fbc9d038722bb84a9d56a2bea974be6" +ARG ZCLI_REF="refs/tags/v0.7.1" +ARG ETH2_TESTNET_GENESIS_REF="4b3498476f14b872b43080eee319adea45286daf" +ENV GO_1_21_SHA256="13b76a9b2a26823e53062fa841b07087d48ae2ef2936445dc34c4ae03293702c" ENV ZCLI_REF="${ZCLI_REF}" ENV ETH2_TESTNET_GENESIS_REF="${ETH2_TESTNET_GENESIS_REF}" WORKDIR /usr/local/src/ @@ -102,21 +102,21 @@ WORKDIR /usr/local/src/ RUN install_packages curl ca-certificates git build-essential # Install golang -RUN cd /tmp && curl -OL https://golang.org/dl/go1.19.linux-amd64.tar.gz -RUN echo "${GO_1_19_SHA256} /tmp/go1.19.linux-amd64.tar.gz" | sha256sum -c -RUN cd /tmp && tar -C /usr/local -xvf go1.19.linux-amd64.tar.gz +RUN cd /tmp && curl -OL https://golang.org/dl/go1.21.7.linux-amd64.tar.gz +RUN echo "${GO_1_21_SHA256} /tmp/go1.21.7.linux-amd64.tar.gz" | sha256sum -c +RUN cd /tmp && tar -C /usr/local -xvf go1.21.7.linux-amd64.tar.gz # Build zcli RUN git clone https://github.com/protolambda/zcli.git && cd zcli && git fetch origin "${ZCLI_REF}" && git checkout "${ZCLI_REF}" RUN cd zcli && PATH="/usr/local/go/bin/:$PATH" go build # Build genesis tool -RUN git clone https://github.com/pk910/eth2-testnet-genesis.git && cd eth2-testnet-genesis && git fetch origin "${ETH2_TESTNET_GENESIS_REF}" && git checkout "${ETH2_TESTNET_GENESIS_REF}" +RUN git clone https://github.com/protolambda/eth2-testnet-genesis.git && cd eth2-testnet-genesis && git fetch origin "${ETH2_TESTNET_GENESIS_REF}" && git checkout "${ETH2_TESTNET_GENESIS_REF}" RUN cd eth2-testnet-genesis && PATH="/usr/local/go/bin/:$PATH" go build # builder and relay FROM bitnami/minideb:${DEBIAN_RELEASE} AS ethodbuilder -ARG ETHDO_REF="v1.31.0" +ARG ETHDO_REF="5895bbfbe6484505ddf666f0f4c0e25dde3cce9b" ENV GO_1_20_SHA256="5a9ebcc65c1cce56e0d2dc616aff4c4cedcfbda8cc6f0288cc08cda3b18dcbf1" RUN install_packages curl ca-certificates git build-essential @@ -126,7 +126,7 @@ RUN echo "${GO_1_20_SHA256} /tmp/go1.20.linux-amd64.tar.gz" | sha256sum -c RUN cd /tmp && tar -C /usr/local -xvf go1.20.linux-amd64.tar.gz WORKDIR /usr/local/src/ -RUN git clone https://github.com/wealdtech/ethdo.git && cd ethdo && git fetch origin "${ETHDO_REF}" && git checkout "${ETHDO_REF}" +RUN git clone https://github.com/ChorusOne/ethdo.git && cd ethdo && git fetch origin "${ETHDO_REF}" && git checkout "${ETHDO_REF}" RUN cd ethdo && PATH="/usr/local/go/bin/:$PATH" go mod download RUN cd ethdo && PATH="/usr/local/go/bin/:$PATH" go build diff --git a/eth_possim/__main__.py b/eth_possim/__main__.py index 11ffd4d..6215e65 100644 --- a/eth_possim/__main__.py +++ b/eth_possim/__main__.py @@ -73,6 +73,7 @@ def deploy_batch_deposit_contract(rpc: str): with open("./.data/configuration.yaml", "w") as f: yaml.dump(cfg, f) + @cli.command() @click.option("--rpc", help="RPC endpoint URL address.", default="") def deploy_fee_manager_contracts(rpc: str): @@ -97,20 +98,30 @@ def deploy_fee_manager_contracts(rpc: str): rpc=rpc, foundry_json_path=f"{cfg['resources']}/ethereum_compiled_contracts/FeeRewardsManager.json", args=[2800], - libraries=[("__$c56d76a1417c078a963cba4fa22c45184c$__", fee_manager_library_address)] + libraries=[ + ("__$c56d76a1417c078a963cba4fa22c45184c$__", fee_manager_library_address) + ], ) cfg["cl"]["fee_manager_address"] = fee_manager_address with open("./.data/configuration.yaml", "w") as f: yaml.dump(cfg, f) + @cli.command() @click.option("--rpc", help="RPC endpoint URL address.", default="") @click.option("--path", help="Path to the contract source.") @click.option("--cfg-key-address", help="Key in which to save the contract address.") -@click.option("--library", multiple=True, type=(str, str), help="Libraries to be replaced in the bytecode contract in the format key value") +@click.option( + "--library", + multiple=True, + type=(str, str), + help="Libraries to be replaced in the bytecode contract in the format key value", +) @click.argument("args", nargs=-1) -def deploy_contract_bytecode(rpc: str, path: str, cfg_key_address: str, args: list, library: list): +def deploy_contract_bytecode( + rpc: str, path: str, cfg_key_address: str, args: list, library: list +): """Deploys a contract by the compiled bytecode and abi.""" with open("./.data/configuration.yaml", "r") as f: @@ -118,13 +129,16 @@ def deploy_contract_bytecode(rpc: str, path: str, cfg_key_address: str, args: li if not rpc: rpc = f"http://localhost:{cfg['haproxy']['el']['port_geth_rpc']}" - contract_address = deploy_compiled_contract(cfg=cfg, rpc=rpc, foundry_json_path=path, args=args, libraries=library) + contract_address = deploy_compiled_contract( + cfg=cfg, rpc=rpc, foundry_json_path=path, args=args, libraries=library + ) # Patch and write back `configuration.yaml` cfg["cl"][cfg_key_address] = contract_address with open("./.data/configuration.yaml", "w") as f: yaml.dump(cfg, f) + @cli.command() @click.option("--rpc", help="RPC endpoint URL address.", default="") @click.option("--path", help="Path to the contract source.") diff --git a/eth_possim/contracts.py b/eth_possim/contracts.py index 82e83c6..a3dcd2a 100644 --- a/eth_possim/contracts.py +++ b/eth_possim/contracts.py @@ -4,21 +4,29 @@ import solcx import web3 import re +import time from typing import List, Tuple logger = logging.getLogger(__name__) -def deploy_compiled_contract(cfg: dict, rpc: str, foundry_json_path: str, args: list = [], libraries: List[Tuple[str, str]] = []) -> str: + +def deploy_compiled_contract( + cfg: dict, + rpc: str, + foundry_json_path: str, + args: list = [], + libraries: List[Tuple[str, str]] = [], +) -> str: with open(foundry_json_path, "r") as f: foundry_json = json.loads(f.read()) - + bytecode_str = foundry_json["bytecode"]["object"][2:] for library in libraries: # Skip 0x from the library address. - bytecode_str = bytecode_str.replace(library[0], library[1][2:]) + bytecode_str = bytecode_str.replace(library[0], library[1][2:]) bytecode = binascii.unhexlify(bytecode_str) - + abi = foundry_json["abi"] w3 = web3.Web3(web3.Web3.HTTPProvider(rpc)) @@ -54,6 +62,7 @@ def deploy_compiled_contract(cfg: dict, rpc: str, foundry_json_path: str, args: return tx_receipt["contractAddress"] + def deploy_contract_onchain( cfg: dict, rpc: str, path: str, name: str, args: list = [] ) -> str: @@ -96,10 +105,21 @@ def deploy_contract_onchain( private_key=cfg["el"]["funder"]["private_key"], ) w3.eth.send_raw_transaction(signed_txn.rawTransaction) - tx_receipt = w3.eth.wait_for_transaction_receipt(signed_txn.hash) + for _ in range(1, 10): + try: + tx_receipt = w3.eth.wait_for_transaction_receipt(signed_txn.hash) + except ValueError as exc: + if exc.args[0]["message"] == "transaction indexing is in progress": + logger.info( + "Failed to get transaction receipt due to indexing, will retry" + ) + time.sleep(5) + continue + else: + raise - logger.info( - f"Contract from '{path}' was published at address '{tx_receipt['contractAddress']}' [block: {tx_receipt['blockNumber']}]" - ) + logger.info( + f"Contract from '{path}' was published at address '{tx_receipt['contractAddress']}' [block: {tx_receipt['blockNumber']}]" + ) - return tx_receipt["contractAddress"] + return tx_receipt["contractAddress"] diff --git a/eth_possim/resources/cl/minimal.yaml b/eth_possim/resources/cl/minimal.yaml index d4a9afe..041439c 100644 --- a/eth_possim/resources/cl/minimal.yaml +++ b/eth_possim/resources/cl/minimal.yaml @@ -11,7 +11,8 @@ PRESET_BASE: 'minimal' # * 'mainnet' - there can be only one # * 'prater' - testnet # Must match the regex: [a-z0-9\-] -CONFIG_NAME: 'minimal' +# CONFIG_NAME: 'minimal' +# read from privatenet.yaml # Transition # --------------------------------------------------------------- diff --git a/eth_possim/resources/shell/cl/__init/eth2-genesis.sh b/eth_possim/resources/shell/cl/__init/eth2-genesis.sh index d6072ee..f5be6e9 100644 --- a/eth_possim/resources/shell/cl/__init/eth2-genesis.sh +++ b/eth_possim/resources/shell/cl/__init/eth2-genesis.sh @@ -2,10 +2,9 @@ set -euxo pipefail -# Generate post-merge (Capella-enabled) genesis +# Generate Deneb genesis genesis_args=( deneb - --legacy-config {{ cfg.meta.dir.cl }}/etc/config-prysm.yaml --config {{ cfg.meta.dir.cl }}/etc/config-prysm.yaml --mnemonics {{ cfg.meta.dir.cl }}/etc/mnemonics.yaml --tranches-dir {{ cfg.meta.dir.cl }}/etc/tranches diff --git a/requirements-dev.txt b/requirements-dev.txt index ed1ab8b..4fdddcf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ pytest pytest-ordering pytest-timeout -typing-extensions \ No newline at end of file +typing-extensions diff --git a/setup.py b/setup.py index a422b3c..01566f2 100644 --- a/setup.py +++ b/setup.py @@ -6,15 +6,15 @@ setup( - name='eth_possim', - version='0.1.0', - description=''' + name="eth_possim", + version="0.1.0", + description=""" Run full-featured Ethereum PoS simulator (private net) locally or in CI/CD, with experimental PBS (MEV) emulation support. - ''', - packages=find_packages(exclude=['ez_setup', 'tests', 'tests.*']), + """, + packages=find_packages(exclude=["ez_setup", "tests", "tests.*"]), include_package_data=True, install_requires=requires, - python_requires='==3.11', + python_requires="==3.11", author_email="opus@chorus.one", ) diff --git a/tests/test_pos_mev_enabled.py b/tests/test_pos_mev_enabled.py index b766e7b..6b8cc13 100644 --- a/tests/test_pos_mev_enabled.py +++ b/tests/test_pos_mev_enabled.py @@ -20,7 +20,11 @@ def tilt_up(): os.system("killall -9 geth tilt bootnode haproxy java lighthouse") - p = subprocess.Popen("make freshrun CONFIG=/opt/privatenet/pbs_config.yaml", shell=True, stdout=subprocess.PIPE) + p = subprocess.Popen( + "make freshrun CONFIG=/opt/privatenet/pbs_config.yaml", + shell=True, + stdout=subprocess.PIPE, + ) # Wait some time to delete non-PBS privatenet data. time.sleep(2) @@ -38,7 +42,6 @@ def tilt_up(): p.kill() - def beacon_url(cfg): return f"http://127.0.0.1:{cfg['port']['beacon_api']}" @@ -155,14 +158,70 @@ def test_validator_exited(tilt_up): with open(f"{os.path.dirname(__file__)}/deposit_data.json") as f: deposit_data = json.load(f) - # Send exits - for i, private_key in enumerate(deposit_data["private_keys"]): + # Offline preparation is necessary, since + # ethdo does not support minimal beacon spec, making it unable + # to read necessary beacon data due to ssz encoding mismatches + beacon_genesis_data = requests.get(f"{base_url}/eth/v1/beacon/genesis").json() + beacon_fork_data = requests.get(f"{base_url}/eth/v1/beacon/states/head/fork").json() + beacon_spec = requests.get(f"{base_url}/eth/v1/config/spec").json() + + # Fork version: honor EIP-7044 + current_fork_version = beacon_fork_data["data"]["current_version"] + if current_fork_version >= beacon_spec["data"]["DENEB_FORK_VERSION"]: + exit_fork_version = beacon_spec["data"]["CAPELLA_FORK_VERSION"] + else: + exit_fork_version = current_fork_version + voluntary_exit_domain = beacon_spec["data"]["DOMAIN_VOLUNTARY_EXIT"] + bls_to_execution_change_domain = beacon_spec["data"]["DOMAIN_BEACON_PROPOSER"] + + chain_preparation_data = { + "version": "3", + "validators": [], + "genesis_validators_root": beacon_genesis_data["data"][ + "genesis_validators_root" + ], + "genesis_fork_version": beacon_genesis_data["data"]["genesis_fork_version"], + "epoch": beacon_fork_data["data"]["epoch"], + "exit_fork_version": exit_fork_version, + "current_fork_version": current_fork_version, + "voluntary_exit_domain_type": voluntary_exit_domain, + "bls_to_execution_change_domain_type": bls_to_execution_change_domain, + } + for i, _ in enumerate(deposit_data["private_keys"]): + pubkey = deposit_data["deposit_data"][i]["pubkey"] + validator_data = requests.get( + f"{base_url}/eth/v1/beacon/states/head/validators/0x{pubkey}" + ).json() + chain_preparation_data["validators"].append( + { + "index": validator_data["data"]["index"], + "withdrawal_credentials": validator_data["data"]["validator"][ + "withdrawal_credentials" + ], + "pubkey": pubkey, + "state": validator_data["data"]["status"], + } + ) + with open("offline-preparation.json", "w") as opf: + opf.write(json.dumps(chain_preparation_data)) + + mnemonic = deposit_data["mnemonic"]["seed"] + for i, _ in enumerate(deposit_data["private_keys"]): + pubkey = deposit_data["deposit_data"][i]["pubkey"] + index = chain_preparation_data["validators"][i]["index"] subprocess.check_call( shlex.split( - f"ethdo validator exit --private-key 0x{private_key} --connection {base_url}" - ) + f'ethdo validator exit --mnemonic "{mnemonic}" --validator {index} --public-key {pubkey} --connection {base_url} --allow-insecure-connections --offline ' + ), + ) + with open("exit-operations.json", "r") as f: + exit_data = f.read() + exit = json.loads(exit_data) + print(f"Prepared exit for validator #{index}") + response = requests.post( + f"{base_url}/eth/v1/beacon/pool/voluntary_exits", json=exit ) - print(f"Sent exit to validator #{33 + i}") + print(f"Exit status: {response.status_code}") # Wait until validators become exited while True: diff --git a/tests/test_pos_privatenet.py b/tests/test_pos_privatenet.py index 30c1167..0fac938 100644 --- a/tests/test_pos_privatenet.py +++ b/tests/test_pos_privatenet.py @@ -149,14 +149,70 @@ def test_validator_exited(tilt_up): with open(f"{os.path.dirname(__file__)}/deposit_data.json") as f: deposit_data = json.load(f) - # Send exits - for i, private_key in enumerate(deposit_data["private_keys"]): + # Offline preparation is necessary, since + # ethdo does not support minimal beacon spec, making it unable + # to read necessary beacon data due to ssz encoding mismatches + beacon_genesis_data = requests.get(f"{base_url}/eth/v1/beacon/genesis").json() + beacon_fork_data = requests.get(f"{base_url}/eth/v1/beacon/states/head/fork").json() + beacon_spec = requests.get(f"{base_url}/eth/v1/config/spec").json() + + # Fork version: honor EIP-7044 + current_fork_version = beacon_fork_data["data"]["current_version"] + if current_fork_version >= beacon_spec["data"]["DENEB_FORK_VERSION"]: + exit_fork_version = beacon_spec["data"]["CAPELLA_FORK_VERSION"] + else: + exit_fork_version = current_fork_version + voluntary_exit_domain = beacon_spec["data"]["DOMAIN_VOLUNTARY_EXIT"] + bls_to_execution_change_domain = beacon_spec["data"]["DOMAIN_BEACON_PROPOSER"] + + chain_preparation_data = { + "version": "3", + "validators": [], + "genesis_validators_root": beacon_genesis_data["data"][ + "genesis_validators_root" + ], + "genesis_fork_version": beacon_genesis_data["data"]["genesis_fork_version"], + "epoch": beacon_fork_data["data"]["epoch"], + "exit_fork_version": exit_fork_version, + "current_fork_version": current_fork_version, + "voluntary_exit_domain_type": voluntary_exit_domain, + "bls_to_execution_change_domain_type": bls_to_execution_change_domain, + } + for i, _ in enumerate(deposit_data["private_keys"]): + pubkey = deposit_data["deposit_data"][i]["pubkey"] + validator_data = requests.get( + f"{base_url}/eth/v1/beacon/states/head/validators/0x{pubkey}" + ).json() + chain_preparation_data["validators"].append( + { + "index": validator_data["data"]["index"], + "withdrawal_credentials": validator_data["data"]["validator"][ + "withdrawal_credentials" + ], + "pubkey": pubkey, + "state": validator_data["data"]["status"], + } + ) + with open("offline-preparation.json", "w") as opf: + opf.write(json.dumps(chain_preparation_data)) + + mnemonic = deposit_data["mnemonic"]["seed"] + for i, _ in enumerate(deposit_data["private_keys"]): + pubkey = deposit_data["deposit_data"][i]["pubkey"] + index = chain_preparation_data["validators"][i]["index"] subprocess.check_call( shlex.split( - f"ethdo validator exit --private-key 0x{private_key} --connection {base_url}" - ) + f'ethdo validator exit --mnemonic "{mnemonic}" --validator {index} --public-key {pubkey} --connection {base_url} --allow-insecure-connections --offline ' + ), + ) + with open("exit-operations.json", "r") as f: + exit_data = f.read() + exit = json.loads(exit_data) + print(f"Prepared exit for validator #{index}") + response = requests.post( + f"{base_url}/eth/v1/beacon/pool/voluntary_exits", json=exit ) - print(f"Sent exit to validator #{33 + i}") + print(f"Exit status: {response.status_code}") # Wait until validators become exited while True: From e1c95c2de0162b33c9a02348868e28a6bfcb91d5 Mon Sep 17 00:00:00 2001 From: Fynn Date: Thu, 29 Feb 2024 13:18:36 +0000 Subject: [PATCH 3/5] Update FeeRewardsManager to final version --- .../FeeRewardsManager.json | 3861 ++++++++++------- 1 file changed, 2349 insertions(+), 1512 deletions(-) diff --git a/eth_possim/resources/ethereum_compiled_contracts/FeeRewardsManager.json b/eth_possim/resources/ethereum_compiled_contracts/FeeRewardsManager.json index f1b700b..14ba7c5 100644 --- a/eth_possim/resources/ethereum_compiled_contracts/FeeRewardsManager.json +++ b/eth_possim/resources/ethereum_compiled_contracts/FeeRewardsManager.json @@ -11,6 +11,28 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -30,6 +52,25 @@ "name": "ContractDeployed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -49,6 +90,13 @@ "name": "OwnershipTransferred", "type": "event" }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -151,6 +199,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -196,13 +257,13 @@ } ], "bytecode": { - "object": "0x608060405234801561001057600080fd5b50604051610cc6380380610cc683398101604081905261002f916100b1565b61003833610061565b6000805463ffffffff909216600160a01b0263ffffffff60a01b199092169190911790556100de565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100c357600080fd5b815163ffffffff811681146100d757600080fd5b9392505050565b610bd9806100ed6000396000f3fe6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b14610155578063a900ccec14610173578063af3f6f4d14610193578063ef5828d0146101cc578063f2fde38b146101ec57600080fd5b806301361090146100a15780632630be4e146100c3578063673c949d146100e35780636a953e0914610120578063715018a61461014057600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046106b2565b61020c565b005b3480156100cf57600080fd5b506100c16100de3660046106e7565b610277565b3480156100ef57600080fd5b506101036100fe36600461075c565b61031d565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012c57600080fd5b506100c161013b36600461075c565b6103e9565b34801561014c57600080fd5b506100c161042a565b34801561016157600080fd5b506000546001600160a01b0316610103565b34801561017f57600080fd5b5061010361018e36600461075c565b61043e565b34801561019f57600080fd5b506000546101b790600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610117565b3480156101d857600080fd5b506100c16101e7366004610780565b610521565b3480156101f857600080fd5b506100c161020736600461075c565b61054f565b6102146105cd565b6040516335c8427760e01b815263ffffffff821660048201526001600160a01b038316906335c8427790602401600060405180830381600087803b15801561025b57600080fd5b505af115801561026f573d6000803e3d6000fd5b505050505050565b60005b63ffffffff81168211156103185782828263ffffffff168181106102a0576102a061079b565b90506020020160208101906102b5919061075c565b6001600160a01b03166370bb45b36040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156102ef57600080fd5b505af1158015610303573d6000803e3d6000fd5b5050505080610311906107b1565b905061027a565b505050565b600080826001600160a01b031660001b905060008184600060149054906101000a900463ffffffff1660405161035290610677565b6001600160a01b03909216825263ffffffff1660208201526040018190604051809103906000f590508015801561038d573d6000803e3d6000fd5b50600054604080516001600160a01b0384168152600160a01b90920463ffffffff1660208301529192507f620dca0c9d04f7cea9d7f31e571d74acccd54c21dc8ff8855ec1d5a21733c26b910160405180910390a19392505050565b6103f16105cd565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610426573d6000803e3d6000fd5b5050565b6104326105cd565b61043c6000610627565b565b6000806040518060200161045190610677565b601f1982820381018352601f9091011660408181526000546001600160a01b038716602084015263ffffffff600160a01b9091041681830152805180830382018152606083019091529192506104ab918391608001610812565b60408051601f1981840301815282825280516020918201206001600160f81b0319828501523060601b6bffffffffffffffffffffffff191660218501526001600160a01b039690961660358401526055808401969096528151808403909601865260759092019052835193019290922092915050565b6105296105cd565b6000805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b6105576105cd565b6001600160a01b0381166105c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6105ca81610627565b50565b6000546001600160a01b0316331461043c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105b8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103748061083083390190565b6001600160a01b03811681146105ca57600080fd5b803563ffffffff811681146106ad57600080fd5b919050565b600080604083850312156106c557600080fd5b82356106d081610684565b91506106de60208401610699565b90509250929050565b600080602083850312156106fa57600080fd5b823567ffffffffffffffff8082111561071257600080fd5b818501915085601f83011261072657600080fd5b81358181111561073557600080fd5b8660208260051b850101111561074a57600080fd5b60209290920196919550909350505050565b60006020828403121561076e57600080fd5b813561077981610684565b9392505050565b60006020828403121561079257600080fd5b61077982610699565b634e487b7160e01b600052603260045260246000fd5b600063ffffffff8083168181036107d857634e487b7160e01b600052601160045260246000fd5b6001019392505050565b6000815160005b8181101561080357602081850181015186830152016107e9565b50600093019283525090919050565b600061082761082183866107e2565b846107e2565b94935050505056fe608060405234801561001057600080fd5b5060405161037438038061037483398101604081905261002f91610076565b6000805463ffffffff909216600160a01b026001600160c01b03199092166001600160a01b0390931692909217179055600180546001600160a01b031916331790556100c5565b6000806040838503121561008957600080fd5b82516001600160a01b03811681146100a057600080fd5b602084015190925063ffffffff811681146100ba57600080fd5b809150509250929050565b6102a0806100d46000396000f3fe60806040526004361061004e5760003560e01c8063230b9da31461005a57806335c842771461009757806370bb45b3146100b957806383059303146100c1578063e86dea4a146100e157600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5060015461007a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b236600461023d565b61011a565b005b6100b76101b0565b3480156100cd57600080fd5b5060005461007a906001600160a01b031681565b3480156100ed57600080fd5b5060005461010590600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161008e565b6001546001600160a01b0316331461018a5760405162461bcd60e51b815260206004820152602960248201527f4368616e6765466565206e6f742063616c6c65642066726f6d20706172656e746044820152680818dbdb9d1c9858dd60ba1b606482015260840160405180910390fd5b6000805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b60005460015460405163ea788f4360e01b8152600160a01b830463ffffffff1660048201526001600160a01b0391821660248201529116604482015273__$c56d76a1417c078a963cba4fa22c45184c$__9063ea788f439060640160006040518083038186803b15801561022357600080fd5b505af4158015610237573d6000803e3d6000fd5b50505050565b60006020828403121561024f57600080fd5b813563ffffffff8116811461026357600080fd5b939250505056fea264697066735822122066a2ab64342090ae4ac32d24120d45f6850a430fefa09a9390d57ffc7d754d3e64736f6c63430008140033a26469706673582212201d2b8bc53bada45dfd2c1bca271919ec861e2df7a5d7b24efbf4b1de9c0182e864736f6c63430008140033", - "sourceMap": "2888:2661:19:-:0;;;2972:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;936:32:0;719:10:1;936:18:0;:32::i;:::-;3023:19:19;:42;;;;;;-1:-1:-1;;;3023:42:19;-1:-1:-1;;;;3023:42:19;;;;;;;;;2888:2661;;2426:187:0;2499:16;2518:6;;-1:-1:-1;;;;;2534:17:0;;;-1:-1:-1;;;;;;2534:17:0;;;;;;2566:40;;2518:6;;;;;;;2566:40;;2499:16;2566:40;2489:124;2426:187;:::o;14:280:21:-;83:6;136:2;124:9;115:7;111:23;107:32;104:52;;;152:1;149;142:12;104:52;184:9;178:16;234:10;227:5;223:22;216:5;213:33;203:61;;260:1;257;250:12;203:61;283:5;14:280;-1:-1:-1;;;14:280:21:o;:::-;2888:2661:19;;;;;;", + "object": "0x608060405234801561001057600080fd5b50604051610f5b380380610f5b83398101604081905261002f9161014d565b338061005657604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61005f816100e1565b506127108163ffffffff1611156100b85760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420666565206e756d657261746f720000000000000000000000604482015260640161004d565b6001805463ffffffff909216600160a01b0263ffffffff60a01b1990921691909117905561017a565b600180546001600160a01b03191690556100fa816100fd565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561015f57600080fd5b815163ffffffff8116811461017357600080fd5b9392505050565b610dd2806101896000396000f3fe6080604052600436106100ab5760003560e01c80638da5cb5b116100645780638da5cb5b14610180578063a900ccec1461019e578063af3f6f4d146101be578063e30c3978146101f7578063ef5828d014610215578063f2fde38b1461023557600080fd5b806301361090146100b75780632630be4e146100d9578063673c949d146100f95780636a953e0914610136578063715018a61461015657806379ba50971461016b57600080fd5b366100b257005b600080fd5b3480156100c357600080fd5b506100d76100d2366004610816565b610255565b005b3480156100e557600080fd5b506100d76100f436600461084b565b6102c0565b34801561010557600080fd5b506101196101143660046108c0565b610366565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014257600080fd5b506100d76101513660046108c0565b61047e565b34801561016257600080fd5b506100d7610532565b34801561017757600080fd5b506100d7610546565b34801561018c57600080fd5b506000546001600160a01b0316610119565b3480156101aa57600080fd5b506101196101b93660046108c0565b61058a565b3480156101ca57600080fd5b506001546101e290600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161012d565b34801561020357600080fd5b506001546001600160a01b0316610119565b34801561022157600080fd5b506100d76102303660046108e4565b61065b565b34801561024157600080fd5b506100d76102503660046108c0565b6106d9565b61025d61074a565b6040516335c8427760e01b815263ffffffff821660048201526001600160a01b038316906335c8427790602401600060405180830381600087803b1580156102a457600080fd5b505af11580156102b8573d6000803e3d6000fd5b505050505050565b60005b63ffffffff81168211156103615782828263ffffffff168181106102e9576102e96108ff565b90506020020160208101906102fe91906108c0565b6001600160a01b03166370bb45b36040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561033857600080fd5b505af115801561034c573d6000803e3d6000fd5b505050508061035a90610915565b90506102c3565b505050565b600080826001600160a01b031660001b905060008184604051610388906107db565b6001600160a01b0390911681526020018190604051809103906000f59050801580156103b8573d6000803e3d6000fd5b506001546040516335c8427760e01b8152600160a01b90910463ffffffff1660048201529091506001600160a01b038216906335c8427790602401600060405180830381600087803b15801561040d57600080fd5b505af1158015610421573d6000803e3d6000fd5b5050600154604080516001600160a01b0386168152600160a01b90920463ffffffff1660208301527f620dca0c9d04f7cea9d7f31e571d74acccd54c21dc8ff8855ec1d5a21733c26b935001905060405180910390a19392505050565b61048661074a565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146104d3576040519150601f19603f3d011682016040523d82523d6000602084013e6104d8565b606091505b505090508061052e5760405162461bcd60e51b815260206004820152601f60248201527f4661696c656420746f20676574204574682066726f6d20636f6e74726163740060448201526064015b60405180910390fd5b5050565b61053a61074a565b6105446000610777565b565b60015433906001600160a01b0316811461057e5760405163118cdaa760e01b81526001600160a01b0382166004820152602401610525565b61058781610777565b50565b6000806040518060200161059d906107db565b601f1982820381018352601f9091011660408181526001600160a01b038616602083015291925082910160408051601f19818403018152908290526105e59291602001610976565b60408051601f1981840301815282825280516020918201206001600160f81b0319828501523060601b6bffffffffffffffffffffffff191660218501526001600160a01b039690961660358401526055808401969096528151808403909601865260759092019052835193019290922092915050565b61066361074a565b6127108163ffffffff1611156106b35760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103332b290373ab6b2b930ba37b960591b6044820152606401610525565b6001805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b6106e161074a565b600180546001600160a01b0383166001600160a01b031990911681179091556107126000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146105445760405163118cdaa760e01b8152336004820152602401610525565b600180546001600160a01b031916905561058781600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104098061099483390190565b6001600160a01b038116811461058757600080fd5b803563ffffffff8116811461081157600080fd5b919050565b6000806040838503121561082957600080fd5b8235610834816107e8565b9150610842602084016107fd565b90509250929050565b6000806020838503121561085e57600080fd5b823567ffffffffffffffff8082111561087657600080fd5b818501915085601f83011261088a57600080fd5b81358181111561089957600080fd5b8660208260051b85010111156108ae57600080fd5b60209290920196919550909350505050565b6000602082840312156108d257600080fd5b81356108dd816107e8565b9392505050565b6000602082840312156108f657600080fd5b6108dd826107fd565b634e487b7160e01b600052603260045260246000fd5b600063ffffffff80831681810361093c57634e487b7160e01b600052601160045260246000fd5b6001019392505050565b6000815160005b81811015610967576020818501810151868301520161094d565b50600093019283525090919050565b600061098b6109858386610946565b84610946565b94935050505056fe60c060405234801561001057600080fd5b5060405161040938038061040983398101604081905261002f91610044565b6001600160a01b03166080523360a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a05161035d6100ac60003960008181606c01528181610146015261025c01526000818160e70152610284015261035d6000f3fe60806040526004361061004e5760003560e01c8063230b9da31461005a57806335c84277146100ab57806370bb45b3146100cd57806383059303146100d5578063e86dea4a1461010957600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100b757600080fd5b506100cb6100c63660046102fa565b61013b565b005b6100cb610236565b3480156100e157600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561011557600080fd5b506000546101269063ffffffff1681565b60405163ffffffff90911681526020016100a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101ca5760405162461bcd60e51b815260206004820152602960248201527f4368616e6765466565206e6f742063616c6c65642066726f6d20706172656e746044820152680818dbdb9d1c9858dd60ba1b60648201526084015b60405180910390fd5b6127108163ffffffff16111561021a5760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103332b290373ab6b2b930ba37b960591b60448201526064016101c1565b6000805463ffffffff191663ffffffff92909216919091179055565b60005460405162a1b0d360e71b815263ffffffff90911660048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660248301527f000000000000000000000000000000000000000000000000000000000000000016604482015273__$c56d76a1417c078a963cba4fa22c45184c$__906350d869809060640160006040518083038186803b1580156102e057600080fd5b505af41580156102f4573d6000803e3d6000fd5b50505050565b60006020828403121561030c57600080fd5b813563ffffffff8116811461032057600080fd5b939250505056fea26469706673582212208ccf8ac8c2a8edb6b26ed33559013ced7d26e968165813c3212e2316677f815f64736f6c63430008140033a2646970667358221220fc1b4406c8832e89c9c5f0a6a8fb3714275a9899ddebdc3e5a97513dac10cb1c64736f6c63430008140033", + "sourceMap": "3189:3059:25:-:0;;;3278:254;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3327:10;;1269:95:0;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;445:51:27;418:18;;1322:31:0;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;1225:187;3441:6:25::1;3417:20;:30;;;;3409:64;;;::::0;-1:-1:-1;;;3409:64:25;;709:2:27;3409:64:25::1;::::0;::::1;691:21:27::0;748:2;728:18;;;721:30;787:23;767:18;;;760:51;828:18;;3409:64:25::1;507:345:27::0;3409:64:25::1;3483:19;:42:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;3483:42:25::1;-1:-1:-1::0;;;;3483:42:25;;::::1;::::0;;;::::1;::::0;;3189:3059;;1886:153:1;1975:13;1968:20;;-1:-1:-1;;;;;;1968:20:1;;;1998:34;2023:8;1998:24;:34::i;:::-;1886:153;:::o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:280:27:-;83:6;136:2;124:9;115:7;111:23;107:32;104:52;;;152:1;149;142:12;104:52;184:9;178:16;234:10;227:5;223:22;216:5;213:33;203:61;;260:1;257;250:12;203:61;283:5;14:280;-1:-1:-1;;;14:280:27:o;507:345::-;3189:3059:25;;;;;;", "linkReferences": { "src/FeeRewardsManager.sol": { "CalculateAndSendRewards": [ { - "start": 3039, + "start": 3700, "length": 20 } ] @@ -210,13 +271,13 @@ } }, "deployedBytecode": { - "object": "0x6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b14610155578063a900ccec14610173578063af3f6f4d14610193578063ef5828d0146101cc578063f2fde38b146101ec57600080fd5b806301361090146100a15780632630be4e146100c3578063673c949d146100e35780636a953e0914610120578063715018a61461014057600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046106b2565b61020c565b005b3480156100cf57600080fd5b506100c16100de3660046106e7565b610277565b3480156100ef57600080fd5b506101036100fe36600461075c565b61031d565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012c57600080fd5b506100c161013b36600461075c565b6103e9565b34801561014c57600080fd5b506100c161042a565b34801561016157600080fd5b506000546001600160a01b0316610103565b34801561017f57600080fd5b5061010361018e36600461075c565b61043e565b34801561019f57600080fd5b506000546101b790600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610117565b3480156101d857600080fd5b506100c16101e7366004610780565b610521565b3480156101f857600080fd5b506100c161020736600461075c565b61054f565b6102146105cd565b6040516335c8427760e01b815263ffffffff821660048201526001600160a01b038316906335c8427790602401600060405180830381600087803b15801561025b57600080fd5b505af115801561026f573d6000803e3d6000fd5b505050505050565b60005b63ffffffff81168211156103185782828263ffffffff168181106102a0576102a061079b565b90506020020160208101906102b5919061075c565b6001600160a01b03166370bb45b36040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156102ef57600080fd5b505af1158015610303573d6000803e3d6000fd5b5050505080610311906107b1565b905061027a565b505050565b600080826001600160a01b031660001b905060008184600060149054906101000a900463ffffffff1660405161035290610677565b6001600160a01b03909216825263ffffffff1660208201526040018190604051809103906000f590508015801561038d573d6000803e3d6000fd5b50600054604080516001600160a01b0384168152600160a01b90920463ffffffff1660208301529192507f620dca0c9d04f7cea9d7f31e571d74acccd54c21dc8ff8855ec1d5a21733c26b910160405180910390a19392505050565b6103f16105cd565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610426573d6000803e3d6000fd5b5050565b6104326105cd565b61043c6000610627565b565b6000806040518060200161045190610677565b601f1982820381018352601f9091011660408181526000546001600160a01b038716602084015263ffffffff600160a01b9091041681830152805180830382018152606083019091529192506104ab918391608001610812565b60408051601f1981840301815282825280516020918201206001600160f81b0319828501523060601b6bffffffffffffffffffffffff191660218501526001600160a01b039690961660358401526055808401969096528151808403909601865260759092019052835193019290922092915050565b6105296105cd565b6000805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b6105576105cd565b6001600160a01b0381166105c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6105ca81610627565b50565b6000546001600160a01b0316331461043c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105b8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103748061083083390190565b6001600160a01b03811681146105ca57600080fd5b803563ffffffff811681146106ad57600080fd5b919050565b600080604083850312156106c557600080fd5b82356106d081610684565b91506106de60208401610699565b90509250929050565b600080602083850312156106fa57600080fd5b823567ffffffffffffffff8082111561071257600080fd5b818501915085601f83011261072657600080fd5b81358181111561073557600080fd5b8660208260051b850101111561074a57600080fd5b60209290920196919550909350505050565b60006020828403121561076e57600080fd5b813561077981610684565b9392505050565b60006020828403121561079257600080fd5b61077982610699565b634e487b7160e01b600052603260045260246000fd5b600063ffffffff8083168181036107d857634e487b7160e01b600052601160045260246000fd5b6001019392505050565b6000815160005b8181101561080357602081850181015186830152016107e9565b50600093019283525090919050565b600061082761082183866107e2565b846107e2565b94935050505056fe608060405234801561001057600080fd5b5060405161037438038061037483398101604081905261002f91610076565b6000805463ffffffff909216600160a01b026001600160c01b03199092166001600160a01b0390931692909217179055600180546001600160a01b031916331790556100c5565b6000806040838503121561008957600080fd5b82516001600160a01b03811681146100a057600080fd5b602084015190925063ffffffff811681146100ba57600080fd5b809150509250929050565b6102a0806100d46000396000f3fe60806040526004361061004e5760003560e01c8063230b9da31461005a57806335c842771461009757806370bb45b3146100b957806383059303146100c1578063e86dea4a146100e157600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5060015461007a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b236600461023d565b61011a565b005b6100b76101b0565b3480156100cd57600080fd5b5060005461007a906001600160a01b031681565b3480156100ed57600080fd5b5060005461010590600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161008e565b6001546001600160a01b0316331461018a5760405162461bcd60e51b815260206004820152602960248201527f4368616e6765466565206e6f742063616c6c65642066726f6d20706172656e746044820152680818dbdb9d1c9858dd60ba1b606482015260840160405180910390fd5b6000805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b60005460015460405163ea788f4360e01b8152600160a01b830463ffffffff1660048201526001600160a01b0391821660248201529116604482015273__$c56d76a1417c078a963cba4fa22c45184c$__9063ea788f439060640160006040518083038186803b15801561022357600080fd5b505af4158015610237573d6000803e3d6000fd5b50505050565b60006020828403121561024f57600080fd5b813563ffffffff8116811461026357600080fd5b939250505056fea264697066735822122066a2ab64342090ae4ac32d24120d45f6850a430fefa09a9390d57ffc7d754d3e64736f6c63430008140033a26469706673582212201d2b8bc53bada45dfd2c1bca271919ec861e2df7a5d7b24efbf4b1de9c0182e864736f6c63430008140033", - "sourceMap": "2888:2661:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4922:188;;;;;;;;;;-1:-1:-1;4922:188:19;;;;;:::i;:::-;;:::i;:::-;;5116:231;;;;;;;;;;-1:-1:-1;5116:231:19;;;;;:::i;:::-;;:::i;3282:551::-;;;;;;;;;;-1:-1:-1;3282:551:19;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1734:32:21;;;1716:51;;1704:2;1689:18;3282:551:19;;;;;;;;5436:111;;;;;;;;;;-1:-1:-1;5436:111:19;;;;;:::i;:::-;;:::i;1824:101:0:-;;;;;;;;;;;;;:::i;1201:85::-;;;;;;;;;;-1:-1:-1;1247:7:0;1273:6;-1:-1:-1;;;;;1273:6:0;1201:85;;4203:713:19;;;;;;;;;;-1:-1:-1;4203:713:19;;;;;:::i;:::-;;:::i;2932:33::-;;;;;;;;;;-1:-1:-1;2932:33:19;;;;-1:-1:-1;;;2932:33:19;;;;;;;;;2160:10:21;2148:23;;;2130:42;;2118:2;2103:18;2932:33:19;1986:192:21;3153:123:19;;;;;;;;;;-1:-1:-1;3153:123:19;;;;;:::i;:::-;;:::i;2074:198:0:-;;;;;;;;;;-1:-1:-1;2074:198:0;;;;;:::i;:::-;;:::i;4922:188:19:-;1094:13:0;:11;:13::i;:::-;5045:58:19::1;::::0;-1:-1:-1;;;5045:58:19;;2160:10:21;2148:23;;5045:58:19::1;::::0;::::1;2130:42:21::0;-1:-1:-1;;;;;5045:49:19;::::1;::::0;::::1;::::0;2103:18:21;;5045:58:19::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;4922:188:::0;;:::o;5116:231::-;5222:8;5217:124;5236:23;;;;-1:-1:-1;5217:124:19;;;5297:12;;5310:1;5297:15;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;5280:48:19;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5261:3;;;;:::i;:::-;;;5217:124;;;;5116:231;;:::o;3282:551::-;3370:15;3397:33;3470:21;-1:-1:-1;;;;;3454:39:19;3433:70;;3397:106;;3513:12;3612:25;3656:21;3695:19;;;;;;;;;;;3585:143;;;;;:::i;:::-;-1:-1:-1;;;;;3265:32:21;;;3247:51;;3346:10;3334:23;3329:2;3314:18;;3307:51;3235:2;3220:18;3585:143:19;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3776:19:19;;3753:43;;;-1:-1:-1;;;;;3265:32:21;;3247:51;;-1:-1:-1;;;3776:19:19;;;;;3329:2:21;3314:18;;3307:51;3265:32;;-1:-1:-1;3753:43:19;;3220:18:21;3753:43:19;;;;;;;3821:4;3282:551;-1:-1:-1;;;3282:551:19:o;5436:111::-;1094:13:0;:11;:13::i;:::-;5495:45:19::1;::::0;-1:-1:-1;;;;;5495:22:19;::::1;::::0;5518:21:::1;5495:45:::0;::::1;;;::::0;::::1;::::0;;;5518:21;5495:22;:45;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;5436:111:::0;:::o;1824:101:0:-;1094:13;:11;:13::i;:::-;1888:30:::1;1915:1;1888:18;:30::i;:::-;1824:101::o:0;4203:713:19:-;4304:7;4323:21;4347:35;;;;;;;;:::i;:::-;-1:-1:-1;;4347:35:19;;;;;;;;;;;;;;;;4489:19;;-1:-1:-1;;;;;3265:32:21;;4347:35:19;4455:54;;3247:51:21;4489:19:19;-1:-1:-1;;;4489:19:19;;;;3314:18:21;;;3307:51;4455:54:19;;;;;;;;;3220:18:21;;;4455:54:19;;;4347:35;;-1:-1:-1;4403:116:19;;4347:35;;4403:116;;;:::i;:::-;;;;-1:-1:-1;;4403:116:19;;;;;;;;;4821:19;;4403:116;4821:19;;;;-1:-1:-1;;;;;;4683:171:19;;;4173:39:21;4755:4:19;4249:2:21;4245:15;-1:-1:-1;;4241:53:21;4228:11;;;4221:74;-1:-1:-1;;;;;4586:39:19;;;;4311:12:21;;;4304:28;4348:12;;;;4341:28;;;;4683:171:19;;;;;;;;;;4385:12:21;;;;4683:171:19;;4660:204;;;;;;;;;;-1:-1:-1;;4203:713:19:o;3153:123::-;1094:13:0;:11;:13::i;:::-;3231:19:19::1;:38:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;3231:38:19::1;-1:-1:-1::0;;;;3231:38:19;;::::1;::::0;;;::::1;::::0;;3153:123::o;2074:198:0:-;1094:13;:11;:13::i;:::-;-1:-1:-1;;;;;2162:22:0;::::1;2154:73;;;::::0;-1:-1:-1;;;2154:73:0;;4610:2:21;2154:73:0::1;::::0;::::1;4592:21:21::0;4649:2;4629:18;;;4622:30;4688:34;4668:18;;;4661:62;-1:-1:-1;;;4739:18:21;;;4732:36;4785:19;;2154:73:0::1;;;;;;;;;2237:28;2256:8;2237:18;:28::i;:::-;2074:198:::0;:::o;1359:130::-;1247:7;1273:6;-1:-1:-1;;;;;1273:6:0;719:10:1;1422:23:0;1414:68;;;;-1:-1:-1;;;1414:68:0;;5017:2:21;1414:68:0;;;4999:21:21;;;5036:18;;;5029:30;5095:34;5075:18;;;5068:62;5147:18;;1414:68:0;4815:356:21;2426:187:0;2499:16;2518:6;;-1:-1:-1;;;;;2534:17:0;;;-1:-1:-1;;;;;;2534:17:0;;;;;;2566:40;;2518:6;;;;;;;2566:40;;2499:16;2566:40;2489:124;2426:187;:::o;-1:-1:-1:-;;;;;;;;:::o;14:139:21:-;-1:-1:-1;;;;;97:31:21;;87:42;;77:70;;143:1;140;133:12;158:163;225:20;;285:10;274:22;;264:33;;254:61;;311:1;308;301:12;254:61;158:163;;;:::o;326:335::-;401:6;409;462:2;450:9;441:7;437:23;433:32;430:52;;;478:1;475;468:12;430:52;517:9;504:23;536:39;569:5;536:39;:::i;:::-;594:5;-1:-1:-1;618:37:21;651:2;636:18;;618:37;:::i;:::-;608:47;;326:335;;;;;:::o;666:623::-;760:6;768;821:2;809:9;800:7;796:23;792:32;789:52;;;837:1;834;827:12;789:52;877:9;864:23;906:18;947:2;939:6;936:14;933:34;;;963:1;960;953:12;933:34;1001:6;990:9;986:22;976:32;;1046:7;1039:4;1035:2;1031:13;1027:27;1017:55;;1068:1;1065;1058:12;1017:55;1108:2;1095:16;1134:2;1126:6;1123:14;1120:34;;;1150:1;1147;1140:12;1120:34;1203:7;1198:2;1188:6;1185:1;1181:14;1177:2;1173:23;1169:32;1166:45;1163:65;;;1224:1;1221;1214:12;1163:65;1255:2;1247:11;;;;;1277:6;;-1:-1:-1;666:623:21;;-1:-1:-1;;;;666:623:21:o;1294:255::-;1353:6;1406:2;1394:9;1385:7;1381:23;1377:32;1374:52;;;1422:1;1419;1412:12;1374:52;1461:9;1448:23;1480:39;1513:5;1480:39;:::i;:::-;1538:5;1294:255;-1:-1:-1;;;1294:255:21:o;2183:184::-;2241:6;2294:2;2282:9;2273:7;2269:23;2265:32;2262:52;;;2310:1;2307;2300:12;2262:52;2333:28;2351:9;2333:28;:::i;2372:127::-;2433:10;2428:3;2424:20;2421:1;2414:31;2464:4;2461:1;2454:15;2488:4;2485:1;2478:15;2772:298;2810:3;2838:10;2883:2;2876:5;2872:14;2910:2;2901:7;2898:15;2895:138;;2955:10;2950:3;2946:20;2943:1;2936:31;2990:4;2987:1;2980:15;3018:4;3015:1;3008:15;2895:138;3062:1;3049:15;;2772:298;-1:-1:-1;;;2772:298:21:o;3369:322::-;3410:3;3448:5;3442:12;3472:1;3482:128;3496:6;3493:1;3490:13;3482:128;;;3593:4;3578:13;;;3574:24;;3568:31;3555:11;;;3548:52;3511:12;3482:128;;;-1:-1:-1;3665:1:21;3629:16;;3654:13;;;-1:-1:-1;3629:16:21;;3369:322;-1:-1:-1;3369:322:21:o;3696:261::-;3871:3;3896:55;3921:29;3946:3;3938:6;3921:29;:::i;:::-;3913:6;3896:55;:::i;:::-;3889:62;3696:261;-1:-1:-1;;;;3696:261:21:o", + "object": "0x6080604052600436106100ab5760003560e01c80638da5cb5b116100645780638da5cb5b14610180578063a900ccec1461019e578063af3f6f4d146101be578063e30c3978146101f7578063ef5828d014610215578063f2fde38b1461023557600080fd5b806301361090146100b75780632630be4e146100d9578063673c949d146100f95780636a953e0914610136578063715018a61461015657806379ba50971461016b57600080fd5b366100b257005b600080fd5b3480156100c357600080fd5b506100d76100d2366004610816565b610255565b005b3480156100e557600080fd5b506100d76100f436600461084b565b6102c0565b34801561010557600080fd5b506101196101143660046108c0565b610366565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014257600080fd5b506100d76101513660046108c0565b61047e565b34801561016257600080fd5b506100d7610532565b34801561017757600080fd5b506100d7610546565b34801561018c57600080fd5b506000546001600160a01b0316610119565b3480156101aa57600080fd5b506101196101b93660046108c0565b61058a565b3480156101ca57600080fd5b506001546101e290600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161012d565b34801561020357600080fd5b506001546001600160a01b0316610119565b34801561022157600080fd5b506100d76102303660046108e4565b61065b565b34801561024157600080fd5b506100d76102503660046108c0565b6106d9565b61025d61074a565b6040516335c8427760e01b815263ffffffff821660048201526001600160a01b038316906335c8427790602401600060405180830381600087803b1580156102a457600080fd5b505af11580156102b8573d6000803e3d6000fd5b505050505050565b60005b63ffffffff81168211156103615782828263ffffffff168181106102e9576102e96108ff565b90506020020160208101906102fe91906108c0565b6001600160a01b03166370bb45b36040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561033857600080fd5b505af115801561034c573d6000803e3d6000fd5b505050508061035a90610915565b90506102c3565b505050565b600080826001600160a01b031660001b905060008184604051610388906107db565b6001600160a01b0390911681526020018190604051809103906000f59050801580156103b8573d6000803e3d6000fd5b506001546040516335c8427760e01b8152600160a01b90910463ffffffff1660048201529091506001600160a01b038216906335c8427790602401600060405180830381600087803b15801561040d57600080fd5b505af1158015610421573d6000803e3d6000fd5b5050600154604080516001600160a01b0386168152600160a01b90920463ffffffff1660208301527f620dca0c9d04f7cea9d7f31e571d74acccd54c21dc8ff8855ec1d5a21733c26b935001905060405180910390a19392505050565b61048661074a565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146104d3576040519150601f19603f3d011682016040523d82523d6000602084013e6104d8565b606091505b505090508061052e5760405162461bcd60e51b815260206004820152601f60248201527f4661696c656420746f20676574204574682066726f6d20636f6e74726163740060448201526064015b60405180910390fd5b5050565b61053a61074a565b6105446000610777565b565b60015433906001600160a01b0316811461057e5760405163118cdaa760e01b81526001600160a01b0382166004820152602401610525565b61058781610777565b50565b6000806040518060200161059d906107db565b601f1982820381018352601f9091011660408181526001600160a01b038616602083015291925082910160408051601f19818403018152908290526105e59291602001610976565b60408051601f1981840301815282825280516020918201206001600160f81b0319828501523060601b6bffffffffffffffffffffffff191660218501526001600160a01b039690961660358401526055808401969096528151808403909601865260759092019052835193019290922092915050565b61066361074a565b6127108163ffffffff1611156106b35760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103332b290373ab6b2b930ba37b960591b6044820152606401610525565b6001805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b6106e161074a565b600180546001600160a01b0383166001600160a01b031990911681179091556107126000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146105445760405163118cdaa760e01b8152336004820152602401610525565b600180546001600160a01b031916905561058781600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104098061099483390190565b6001600160a01b038116811461058757600080fd5b803563ffffffff8116811461081157600080fd5b919050565b6000806040838503121561082957600080fd5b8235610834816107e8565b9150610842602084016107fd565b90509250929050565b6000806020838503121561085e57600080fd5b823567ffffffffffffffff8082111561087657600080fd5b818501915085601f83011261088a57600080fd5b81358181111561089957600080fd5b8660208260051b85010111156108ae57600080fd5b60209290920196919550909350505050565b6000602082840312156108d257600080fd5b81356108dd816107e8565b9392505050565b6000602082840312156108f657600080fd5b6108dd826107fd565b634e487b7160e01b600052603260045260246000fd5b600063ffffffff80831681810361093c57634e487b7160e01b600052601160045260246000fd5b6001019392505050565b6000815160005b81811015610967576020818501810151868301520161094d565b50600093019283525090919050565b600061098b6109858386610946565b84610946565b94935050505056fe60c060405234801561001057600080fd5b5060405161040938038061040983398101604081905261002f91610044565b6001600160a01b03166080523360a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a05161035d6100ac60003960008181606c01528181610146015261025c01526000818160e70152610284015261035d6000f3fe60806040526004361061004e5760003560e01c8063230b9da31461005a57806335c84277146100ab57806370bb45b3146100cd57806383059303146100d5578063e86dea4a1461010957600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100b757600080fd5b506100cb6100c63660046102fa565b61013b565b005b6100cb610236565b3480156100e157600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561011557600080fd5b506000546101269063ffffffff1681565b60405163ffffffff90911681526020016100a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101ca5760405162461bcd60e51b815260206004820152602960248201527f4368616e6765466565206e6f742063616c6c65642066726f6d20706172656e746044820152680818dbdb9d1c9858dd60ba1b60648201526084015b60405180910390fd5b6127108163ffffffff16111561021a5760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103332b290373ab6b2b930ba37b960591b60448201526064016101c1565b6000805463ffffffff191663ffffffff92909216919091179055565b60005460405162a1b0d360e71b815263ffffffff90911660048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660248301527f000000000000000000000000000000000000000000000000000000000000000016604482015273__$c56d76a1417c078a963cba4fa22c45184c$__906350d869809060640160006040518083038186803b1580156102e057600080fd5b505af41580156102f4573d6000803e3d6000fd5b50505050565b60006020828403121561030c57600080fd5b813563ffffffff8116811461032057600080fd5b939250505056fea26469706673582212208ccf8ac8c2a8edb6b26ed33559013ced7d26e968165813c3212e2316677f815f64736f6c63430008140033a2646970667358221220fc1b4406c8832e89c9c5f0a6a8fb3714275a9899ddebdc3e5a97513dac10cb1c64736f6c63430008140033", + "sourceMap": "3189:3059:25:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5540:188;;;;;;;;;;-1:-1:-1;5540:188:25;;;;;:::i;:::-;;:::i;:::-;;5734:231;;;;;;;;;;-1:-1:-1;5734:231:25;;;;;:::i;:::-;;:::i;3872:600::-;;;;;;;;;;-1:-1:-1;3872:600:25;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1734:32:27;;;1716:51;;1704:2;1689:18;3872:600:25;;;;;;;;6054:192;;;;;;;;;;-1:-1:-1;6054:192:25;;;;;:::i;:::-;;:::i;2293:101:0:-;;;;;;;;;;;;;:::i;2119:229:1:-;;;;;;;;;;;;;:::i;1638:85:0:-;;;;;;;;;;-1:-1:-1;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;4842:692:25;;;;;;;;;;-1:-1:-1;4842:692:25;;;;;:::i;:::-;;:::i;3238:33::-;;;;;;;;;;-1:-1:-1;3238:33:25;;;;-1:-1:-1;;;3238:33:25;;;;;;;;;2160:10:27;2148:23;;;2130:42;;2118:2;2103:18;3238:33:25;1986:192:27;1232:99:1;;;;;;;;;;-1:-1:-1;1311:13:1;;-1:-1:-1;;;;;1311:13:1;1232:99;;3613:253:25;;;;;;;;;;-1:-1:-1;3613:253:25;;;;;:::i;:::-;;:::i;1524:178:1:-;;;;;;;;;;-1:-1:-1;1524:178:1;;;;;:::i;:::-;;:::i;5540:188:25:-;1531:13:0;:11;:13::i;:::-;5663:58:25::1;::::0;-1:-1:-1;;;5663:58:25;;2160:10:27;2148:23;;5663:58:25::1;::::0;::::1;2130:42:27::0;-1:-1:-1;;;;;5663:49:25;::::1;::::0;::::1;::::0;2103:18:27;;5663:58:25::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;5540:188:::0;;:::o;5734:231::-;5840:8;5835:124;5854:23;;;;-1:-1:-1;5835:124:25;;;5915:12;;5928:1;5915:15;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;5898:48:25;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5879:3;;;;:::i;:::-;;;5835:124;;;;5734:231;;:::o;3872:600::-;3960:15;3987:33;4060:21;-1:-1:-1;;;;;4044:39:25;4023:70;;3987:106;;4135:33;4211:25;4247:21;4171:98;;;;;:::i;:::-;-1:-1:-1;;;;;1734:32:27;;;1716:51;;1704:2;1689:18;4171:98:25;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4315:19:25;;4279:56;;-1:-1:-1;;;4279:56:25;;-1:-1:-1;;;4315:19:25;;;;;4279:56;;;2130:42:27;4135:134:25;;-1:-1:-1;;;;;;4279:35:25;;;;;2103:18:27;;4279:56:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4394:19:25;;4350:64;;;-1:-1:-1;;;;;3265:32:27;;3247:51;;-1:-1:-1;;;4394:19:25;;;;;3329:2:27;3314:18;;3307:51;4350:64:25;;-1:-1:-1;3220:18:27;;-1:-1:-1;4350:64:25;;;;;;;4447:16;3872:600;-1:-1:-1;;;3872:600:25:o;6054:192::-;1531:13:0;:11;:13::i;:::-;6114:9:25::1;6137:4;-1:-1:-1::0;;;;;6129:18:25::1;6155:21;6129:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6113:68;;;6199:4;6191:48;;;::::0;-1:-1:-1;;;6191:48:25;;3781:2:27;6191:48:25::1;::::0;::::1;3763:21:27::0;3820:2;3800:18;;;3793:30;3859:33;3839:18;;;3832:61;3910:18;;6191:48:25::1;;;;;;;;;6103:143;6054:192:::0;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2119:229:1:-;1311:13;;735:10:2;;-1:-1:-1;;;;;1311:13:1;2214:24;;2210:96;;2261:34;;-1:-1:-1;;;2261:34:1;;-1:-1:-1;;;;;1734:32:27;;2261:34:1;;;1716:51:27;1689:18;;2261:34:1;1554:219:27;2210:96:1;2315:26;2334:6;2315:18;:26::i;:::-;2161:187;2119:229::o;4842:692:25:-;4943:7;4962:21;4986:35;;;;;;;;:::i;:::-;-1:-1:-1;;4986:35:25;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1734:32:27;;4986:35:25;5094:33;;1716:51:27;4986:35:25;;-1:-1:-1;4986:35:25;;1689:18:27;5094:33:25;;;-1:-1:-1;;5094:33:25;;;;;;;;;;5042:95;;;5094:33;5042:95;;:::i;:::-;;;;-1:-1:-1;;5042:95:25;;;;;;;;;5439:19;;5042:95;5439:19;;;;-1:-1:-1;;;;;;5301:171:25;;;4743:39:27;5373:4:25;4819:2:27;4815:15;-1:-1:-1;;4811:53:27;4798:11;;;4791:74;-1:-1:-1;;;;;5204:39:25;;;;4881:12:27;;;4874:28;4918:12;;;;4911:28;;;;5301:171:25;;;;;;;;;;4955:12:27;;;;5301:171:25;;5278:204;;;;;;;;;;-1:-1:-1;;4842:692:25:o;3613:253::-;1531:13:0;:11;:13::i;:::-;3779:6:25::1;3759:16;:26;;;;3751:60;;;::::0;-1:-1:-1;;;3751:60:25;;5180:2:27;3751:60:25::1;::::0;::::1;5162:21:27::0;5219:2;5199:18;;;5192:30;-1:-1:-1;;;5238:18:27;;;5231:51;5299:18;;3751:60:25::1;4978:345:27::0;3751:60:25::1;3821:19;:38:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;3821:38:25::1;-1:-1:-1::0;;;;3821:38:25;;::::1;::::0;;;::::1;::::0;;3613:253::o;1524:178:1:-;1531:13:0;:11;:13::i;:::-;1613::1::1;:24:::0;;-1:-1:-1;;;;;1613:24:1;::::1;-1:-1:-1::0;;;;;;1613:24:1;;::::1;::::0;::::1;::::0;;;1677:7:::1;1684::0::0;1710:6;-1:-1:-1;;;;;1710:6:0;;1638:85;1677:7:1::1;-1:-1:-1::0;;;;;1652:43:1::1;;;;;;;;;;;1524:178:::0;:::o;1796:162:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:2;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:2;1901:40:0;;;1716:51:27;1689:18;;1901:40:0;1554:219:27;1886:153:1;1975:13;1968:20;;-1:-1:-1;;;;;;1968:20:1;;;1998:34;2023:8;2985:16:0;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;-1:-1:-1:-;;;;;;;;:::o;14:139:27:-;-1:-1:-1;;;;;97:31:27;;87:42;;77:70;;143:1;140;133:12;158:163;225:20;;285:10;274:22;;264:33;;254:61;;311:1;308;301:12;254:61;158:163;;;:::o;326:335::-;401:6;409;462:2;450:9;441:7;437:23;433:32;430:52;;;478:1;475;468:12;430:52;517:9;504:23;536:39;569:5;536:39;:::i;:::-;594:5;-1:-1:-1;618:37:27;651:2;636:18;;618:37;:::i;:::-;608:47;;326:335;;;;;:::o;666:623::-;760:6;768;821:2;809:9;800:7;796:23;792:32;789:52;;;837:1;834;827:12;789:52;877:9;864:23;906:18;947:2;939:6;936:14;933:34;;;963:1;960;953:12;933:34;1001:6;990:9;986:22;976:32;;1046:7;1039:4;1035:2;1031:13;1027:27;1017:55;;1068:1;1065;1058:12;1017:55;1108:2;1095:16;1134:2;1126:6;1123:14;1120:34;;;1150:1;1147;1140:12;1120:34;1203:7;1198:2;1188:6;1185:1;1181:14;1177:2;1173:23;1169:32;1166:45;1163:65;;;1224:1;1221;1214:12;1163:65;1255:2;1247:11;;;;;1277:6;;-1:-1:-1;666:623:27;;-1:-1:-1;;;;666:623:27:o;1294:255::-;1353:6;1406:2;1394:9;1385:7;1381:23;1377:32;1374:52;;;1422:1;1419;1412:12;1374:52;1461:9;1448:23;1480:39;1513:5;1480:39;:::i;:::-;1538:5;1294:255;-1:-1:-1;;;1294:255:27:o;2183:184::-;2241:6;2294:2;2282:9;2273:7;2269:23;2265:32;2262:52;;;2310:1;2307;2300:12;2262:52;2333:28;2351:9;2333:28;:::i;2372:127::-;2433:10;2428:3;2424:20;2421:1;2414:31;2464:4;2461:1;2454:15;2488:4;2485:1;2478:15;2772:298;2810:3;2838:10;2883:2;2876:5;2872:14;2910:2;2901:7;2898:15;2895:138;;2955:10;2950:3;2946:20;2943:1;2936:31;2990:4;2987:1;2980:15;3018:4;3015:1;3008:15;2895:138;3062:1;3049:15;;2772:298;-1:-1:-1;;;2772:298:27:o;3939:322::-;3980:3;4018:5;4012:12;4042:1;4052:128;4066:6;4063:1;4060:13;4052:128;;;4163:4;4148:13;;;4144:24;;4138:31;4125:11;;;4118:52;4081:12;4052:128;;;-1:-1:-1;4235:1:27;4199:16;;4224:13;;;-1:-1:-1;4199:16:27;;3939:322;-1:-1:-1;3939:322:27:o;4266:261::-;4441:3;4466:55;4491:29;4516:3;4508:6;4491:29;:::i;:::-;4483:6;4466:55;:::i;:::-;4459:62;4266:261;-1:-1:-1;;;;4266:261:27:o", "linkReferences": { "src/FeeRewardsManager.sol": { "CalculateAndSendRewards": [ { - "start": 2802, + "start": 3307, "length": 20 } ] @@ -224,6 +285,7 @@ } }, "methodIdentifiers": { + "acceptOwnership()": "79ba5097", "batchCollectRewards(address[])": "2630be4e", "changeDefaultFee(uint32)": "ef5828d0", "changeFeeNumerator(address,uint32)": "01361090", @@ -231,11 +293,12 @@ "defaultFeeNumerator()": "af3f6f4d", "getEth(address)": "6a953e09", "owner()": "8da5cb5b", + "pendingOwner()": "e30c3978", "predictFeeContractAddress(address)": "a900ccec", "renounceOwnership()": "715018a6", "transferOwnership(address)": "f2fde38b" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_defaultFeeNumerator\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"feeNumerator\",\"type\":\"uint32\"}],\"name\":\"ContractDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address payable[]\",\"name\":\"feeAddresses\",\"type\":\"address[]\"}],\"name\":\"batchCollectRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_newFeeNumerator\",\"type\":\"uint32\"}],\"name\":\"changeDefaultFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_feeContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"changeFeeNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawalCredential\",\"type\":\"address\"}],\"name\":\"createFeeContract\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultFeeNumerator\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getEth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawalCredential\",\"type\":\"address\"}],\"name\":\"predictFeeContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/FeeRewardsManager.sol\":\"FeeRewardsManager\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\"lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/FeeRewardsManager.sol\":{\"keccak256\":\"0xee7707562ed88509b24a4afdb11a67e249e370a3cdcaadb4ec07f84e03ed7fee\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://919c541bdc389cb848285b2dea3ae95530b979b4cc38464b7cbbb27a6de72b54\",\"dweb:/ipfs/QmcBL1oHeRKRdrmh8FYBbKkRjAMpgZjyCR46V1yazkLaL4\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_defaultFeeNumerator\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"feeNumerator\",\"type\":\"uint32\"}],\"name\":\"ContractDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable[]\",\"name\":\"feeAddresses\",\"type\":\"address[]\"}],\"name\":\"batchCollectRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_newFeeNumerator\",\"type\":\"uint32\"}],\"name\":\"changeDefaultFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_feeContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"changeFeeNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawalCredential\",\"type\":\"address\"}],\"name\":\"createFeeContract\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultFeeNumerator\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getEth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawalCredential\",\"type\":\"address\"}],\"name\":\"predictFeeContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/FeeRewardsManager.sol\":\"FeeRewardsManager\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\"lib/openzeppelin-contracts:@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol\":{\"keccak256\":\"0x08b074ae1b12e70ce24d1335086ec5a418934311a6771d9f61fe24d392050e12\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e2fd900a8f8244fc0a49bae1ca1bd5815884f248a2306b8e7dc68011c25803b7\",\"dweb:/ipfs/Qmd4EaujSR74x7EqziRDfqgc6Tv2nzRQDSaxKXcU1ybxbA\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"src/FeeRewardsManager.sol\":{\"keccak256\":\"0x1316fed5b0975e31f90de0a527a240ccbea5cd227522c6fe5a2690ebb26ffa6f\",\"license\":\"Apache License 2.0\",\"urls\":[\"bzz-raw://8f396a5eca524cb10d64e1ff4a04f4b6f6b1d81c60ab8f40148592b24c8504ac\",\"dweb:/ipfs/QmbqWv8EPca3HKyfH7YZBuNWGVvgsasJiNQithnt7xKkSN\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.20+commit.a1b79de6" @@ -254,6 +317,28 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "type": "error", + "name": "OwnableInvalidOwner" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "type": "error", + "name": "OwnableUnauthorizedAccount" + }, { "inputs": [ { @@ -273,6 +358,25 @@ "name": "ContractDeployed", "anonymous": false }, + { + "inputs": [ + { + "internalType": "address", + "name": "previousOwner", + "type": "address", + "indexed": true + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "OwnershipTransferStarted", + "anonymous": false + }, { "inputs": [ { @@ -292,6 +396,12 @@ "name": "OwnershipTransferred", "anonymous": false }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "name": "acceptOwnership" + }, { "inputs": [ { @@ -390,6 +500,19 @@ } ] }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ] + }, { "inputs": [ { @@ -436,14 +559,20 @@ "devdoc": { "kind": "dev", "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, "owner()": { "details": "Returns the address of the current owner." }, + "pendingOwner()": { + "details": "Returns the address of the pending owner." + }, "renounceOwnership()": { "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." }, "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + "details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner." } }, "version": 1 @@ -461,7 +590,7 @@ "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", - "lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/" + "lib/openzeppelin-contracts:@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": true, @@ -477,59 +606,67 @@ }, "sources": { "lib/openzeppelin-contracts/contracts/access/Ownable.sol": { - "keccak256": "0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218", + "keccak256": "0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb", + "urls": [ + "bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6", + "dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol": { + "keccak256": "0x08b074ae1b12e70ce24d1335086ec5a418934311a6771d9f61fe24d392050e12", "urls": [ - "bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32", - "dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz" + "bzz-raw://e2fd900a8f8244fc0a49bae1ca1bd5815884f248a2306b8e7dc68011c25803b7", + "dweb:/ipfs/Qmd4EaujSR74x7EqziRDfqgc6Tv2nzRQDSaxKXcU1ybxbA" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/utils/Context.sol": { - "keccak256": "0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7", + "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", "urls": [ - "bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92", - "dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3" + "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", + "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" ], "license": "MIT" }, "src/FeeRewardsManager.sol": { - "keccak256": "0xee7707562ed88509b24a4afdb11a67e249e370a3cdcaadb4ec07f84e03ed7fee", + "keccak256": "0x1316fed5b0975e31f90de0a527a240ccbea5cd227522c6fe5a2690ebb26ffa6f", "urls": [ - "bzz-raw://919c541bdc389cb848285b2dea3ae95530b979b4cc38464b7cbbb27a6de72b54", - "dweb:/ipfs/QmcBL1oHeRKRdrmh8FYBbKkRjAMpgZjyCR46V1yazkLaL4" + "bzz-raw://8f396a5eca524cb10d64e1ff4a04f4b6f6b1d81c60ab8f40148592b24c8504ac", + "dweb:/ipfs/QmbqWv8EPca3HKyfH7YZBuNWGVvgsasJiNQithnt7xKkSN" ], - "license": "BSD-3-Clause" + "license": "Apache License 2.0" } }, "version": 1 }, "ast": { "absolutePath": "src/FeeRewardsManager.sol", - "id": 28869, + "id": 45604, "exportedSymbols": { "CalculateAndSendRewards": [ - 28588 - ], - "Context": [ - 134 + 45287 ], "FeeRewardsManager": [ - 28868 + 45603 ], "Ownable": [ - 112 + 147 + ], + "Ownable2Step": [ + 233 ], "RewardsCollector": [ - 28650 + 45350 ] }, "nodeType": "SourceUnit", - "src": "41:5509:19", + "src": "47:6202:25", "nodes": [ { - "id": 28497, + "id": 45187, "nodeType": "PragmaDirective", - "src": "41:24:19", + "src": "47:24:25", "nodes": [], "literals": [ "solidity", @@ -539,34 +676,34 @@ ] }, { - "id": 28498, + "id": 45188, "nodeType": "ImportDirective", - "src": "67:52:19", + "src": "73:57:25", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/access/Ownable.sol", - "file": "@openzeppelin/contracts/access/Ownable.sol", + "absolutePath": "lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol", + "file": "@openzeppelin/contracts/access/Ownable2Step.sol", "nameLocation": "-1:-1:-1", - "scope": 28869, - "sourceUnit": 113, + "scope": 45604, + "sourceUnit": 234, "symbolAliases": [], "unitAlias": "" }, { - "id": 28588, + "id": 45287, "nodeType": "ContractDefinition", - "src": "370:1280:19", + "src": "381:1473:25", "nodes": [ { - "id": 28501, + "id": 45191, "nodeType": "VariableDeclaration", - "src": "499:46:19", + "src": "510:47:25", "nodes": [], "constant": true, "functionSelector": "d73792a9", "mutability": "constant", "name": "FEE_DENOMINATOR", - "nameLocation": "522:15:19", - "scope": 28588, + "nameLocation": "533:15:25", + "scope": 45287, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -574,56 +711,56 @@ "typeString": "uint32" }, "typeName": { - "id": 28499, + "id": 45189, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "499:6:19", + "src": "510:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": { - "hexValue": "3130303030", - "id": 28500, + "hexValue": "31305f303030", + "id": 45190, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "540:5:19", + "src": "551:6:25", "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, - "value": "10000" + "value": "10_000" }, "visibility": "public" }, { - "id": 28511, + "id": 45201, "nodeType": "EventDefinition", - "src": "551:148:19", + "src": "563:155:25", "nodes": [], "anonymous": false, "eventSelector": "ea26d65e718d9960bf3d074b264a29f878be92f11e3a4f1b5ab8e81038cc1fc0", "name": "CollectedReward", - "nameLocation": "557:15:19", + "nameLocation": "569:15:25", "parameters": { - "id": 28510, + "id": 45200, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28503, + "id": 45193, "indexed": false, "mutability": "mutable", "name": "withdrawalCredential", - "nameLocation": "590:20:19", + "nameLocation": "602:20:25", "nodeType": "VariableDeclaration", - "scope": 28511, - "src": "582:28:19", + "scope": 45201, + "src": "594:28:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -631,10 +768,10 @@ "typeString": "address" }, "typeName": { - "id": 28502, + "id": 45192, "name": "address", "nodeType": "ElementaryTypeName", - "src": "582:7:19", + "src": "594:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -645,14 +782,14 @@ }, { "constant": false, - "id": 28505, + "id": 45195, "indexed": false, "mutability": "mutable", "name": "withdrawnAmount", - "nameLocation": "628:15:19", + "nameLocation": "640:15:25", "nodeType": "VariableDeclaration", - "scope": 28511, - "src": "620:23:19", + "scope": 45201, + "src": "632:23:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -660,10 +797,10 @@ "typeString": "uint256" }, "typeName": { - "id": 28504, + "id": 45194, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "620:7:19", + "src": "632:7:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -673,14 +810,14 @@ }, { "constant": false, - "id": 28507, + "id": 45197, "indexed": false, "mutability": "mutable", - "name": "owner", - "nameLocation": "661:5:19", + "name": "feeRewardsManager", + "nameLocation": "673:17:25", "nodeType": "VariableDeclaration", - "scope": 28511, - "src": "653:13:19", + "scope": 45201, + "src": "665:25:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -688,10 +825,10 @@ "typeString": "address" }, "typeName": { - "id": 28506, + "id": 45196, "name": "address", "nodeType": "ElementaryTypeName", - "src": "653:7:19", + "src": "665:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -702,14 +839,14 @@ }, { "constant": false, - "id": 28509, + "id": 45199, "indexed": false, "mutability": "mutable", - "name": "ownerFee", - "nameLocation": "684:8:19", + "name": "fee", + "nameLocation": "708:3:25", "nodeType": "VariableDeclaration", - "scope": 28511, - "src": "676:16:19", + "scope": 45201, + "src": "700:11:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -717,10 +854,10 @@ "typeString": "uint256" }, "typeName": { - "id": 28508, + "id": 45198, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "676:7:19", + "src": "700:7:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -729,34 +866,205 @@ "visibility": "internal" } ], - "src": "572:126:19" + "src": "584:133:25" } }, { - "id": 28587, + "id": 45286, "nodeType": "FunctionDefinition", - "src": "705:943:19", + "src": "724:1128:25", "nodes": [], "body": { - "id": 28586, + "id": 45285, "nodeType": "Block", - "src": "834:814:19", + "src": "872:980:25", "nodes": [], "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 45217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 45213, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "898:4:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CalculateAndSendRewards_$45287", + "typeString": "library CalculateAndSendRewards" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CalculateAndSendRewards_$45287", + "typeString": "library CalculateAndSendRewards" + } + ], + "id": 45212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "890:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 45211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "890:7:25", + "typeDescriptions": {} + } + }, + "id": 45214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "890:13:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 45215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "904:7:25", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "890:21:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 45216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "915:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "890:26:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e6f7468696e6720746f2064697374726962757465", + "id": 45218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "918:23:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d842f201acf40e4a9c5acce2e04563f7270e91457322da48af841f8dba899054", + "typeString": "literal_string \"Nothing to distribute\"" + }, + "value": "Nothing to distribute" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d842f201acf40e4a9c5acce2e04563f7270e91457322da48af841f8dba899054", + "typeString": "literal_string \"Nothing to distribute\"" + } + ], + "id": 45210, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "882:7:25", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 45219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "882:60:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 45220, + "nodeType": "ExpressionStatement", + "src": "882:60:25" + }, { "assignments": [ - 28521 + 45222 ], "declarations": [ { "constant": false, - "id": 28521, + "id": 45222, "mutability": "mutable", - "name": "ownerAmount", - "nameLocation": "852:11:19", + "name": "feeAmount", + "nameLocation": "961:9:25", "nodeType": "VariableDeclaration", - "scope": 28586, - "src": "844:19:19", + "scope": 45285, + "src": "953:17:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -764,10 +1072,10 @@ "typeString": "uint256" }, "typeName": { - "id": 28520, + "id": 45221, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "844:7:19", + "src": "953:7:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -776,13 +1084,13 @@ "visibility": "internal" } ], - "id": 28532, + "id": 45233, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 28531, + "id": 45232, "isConstant": false, "isLValue": false, "isPure": false, @@ -794,7 +1102,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 28528, + "id": 45229, "isConstant": false, "isLValue": false, "isPure": false, @@ -803,14 +1111,14 @@ "expression": { "arguments": [ { - "id": 28524, + "id": 45225, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "875:4:19", + "src": "982:4:25", "typeDescriptions": { - "typeIdentifier": "t_contract$_CalculateAndSendRewards_$28588", + "typeIdentifier": "t_contract$_CalculateAndSendRewards_$45287", "typeString": "library CalculateAndSendRewards" } } @@ -818,30 +1126,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_CalculateAndSendRewards_$28588", + "typeIdentifier": "t_contract$_CalculateAndSendRewards_$45287", "typeString": "library CalculateAndSendRewards" } ], - "id": 28523, + "id": 45224, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "867:7:19", + "src": "974:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 28522, + "id": 45223, "name": "address", "nodeType": "ElementaryTypeName", - "src": "867:7:19", + "src": "974:7:25", "typeDescriptions": {} } }, - "id": 28525, + "id": 45226, "isConstant": false, "isLValue": false, "isPure": false, @@ -850,22 +1158,22 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "867:13:19", + "src": "974:13:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 28526, + "id": 45227, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "881:7:19", + "memberLocation": "988:7:25", "memberName": "balance", "nodeType": "MemberAccess", - "src": "867:21:19", + "src": "974:21:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -874,32 +1182,32 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 28527, + "id": 45228, "name": "feeNominator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28513, - "src": "891:12:19", + "referencedDeclaration": 45203, + "src": "998:12:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "src": "867:36:19", + "src": "974:36:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 28529, + "id": 45230, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "866:38:19", + "src": "973:38:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -908,40 +1216,40 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 28530, + "id": 45231, "name": "FEE_DENOMINATOR", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28501, - "src": "919:15:19", + "referencedDeclaration": 45191, + "src": "1026:15:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "src": "866:68:19", + "src": "973:68:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "844:90:19" + "src": "953:88:25" }, { "assignments": [ - 28534 + 45235 ], "declarations": [ { "constant": false, - "id": 28534, + "id": 45235, "mutability": "mutable", - "name": "returnedAmount", - "nameLocation": "952:14:19", + "name": "withdrawAmount", + "nameLocation": "1059:14:25", "nodeType": "VariableDeclaration", - "scope": 28586, - "src": "944:22:19", + "scope": 45285, + "src": "1051:22:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -949,10 +1257,10 @@ "typeString": "uint256" }, "typeName": { - "id": 28533, + "id": 45234, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "944:7:19", + "src": "1051:7:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -961,13 +1269,13 @@ "visibility": "internal" } ], - "id": 28542, + "id": 45243, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 28541, + "id": 45242, "isConstant": false, "isLValue": false, "isPure": false, @@ -976,14 +1284,14 @@ "expression": { "arguments": [ { - "id": 28537, + "id": 45238, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "977:4:19", + "src": "1084:4:25", "typeDescriptions": { - "typeIdentifier": "t_contract$_CalculateAndSendRewards_$28588", + "typeIdentifier": "t_contract$_CalculateAndSendRewards_$45287", "typeString": "library CalculateAndSendRewards" } } @@ -991,30 +1299,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_CalculateAndSendRewards_$28588", + "typeIdentifier": "t_contract$_CalculateAndSendRewards_$45287", "typeString": "library CalculateAndSendRewards" } ], - "id": 28536, + "id": 45237, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "969:7:19", + "src": "1076:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 28535, + "id": 45236, "name": "address", "nodeType": "ElementaryTypeName", - "src": "969:7:19", + "src": "1076:7:25", "typeDescriptions": {} } }, - "id": 28538, + "id": 45239, "isConstant": false, "isLValue": false, "isPure": false, @@ -1023,22 +1331,22 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "969:13:19", + "src": "1076:13:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 28539, + "id": 45240, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "983:7:19", + "memberLocation": "1090:7:25", "memberName": "balance", "nodeType": "MemberAccess", - "src": "969:21:19", + "src": "1076:21:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1047,247 +1355,72 @@ "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { - "id": 28540, - "name": "ownerAmount", + "id": 45241, + "name": "feeAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28521, - "src": "993:11:19", + "referencedDeclaration": 45222, + "src": "1100:9:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "969:35:19", + "src": "1076:33:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "944:60:19" + "src": "1051:58:25" }, { - "expression": { + "eventCall": { "arguments": [ { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 28550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 28546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 28544, - "name": "ownerAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28521, - "src": "1035:11:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "hexValue": "30", - "id": 28545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1050:1:19", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1035:16:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 28549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 28547, - "name": "returnedAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28534, - "src": "1055:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "hexValue": "30", - "id": 28548, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1073:1:19", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1055:19:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1035:39:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "4e6f7468696e6720746f2064697374726962757465", - "id": 28551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1088:23:19", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d842f201acf40e4a9c5acce2e04563f7270e91457322da48af841f8dba899054", - "typeString": "literal_string \"Nothing to distribute\"" - }, - "value": "Nothing to distribute" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d842f201acf40e4a9c5acce2e04563f7270e91457322da48af841f8dba899054", - "typeString": "literal_string \"Nothing to distribute\"" - } - ], - "id": 28543, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1014:7:19", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 28552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1014:107:19", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 28553, - "nodeType": "ExpressionStatement", - "src": "1014:107:19" - }, - { - "eventCall": { - "arguments": [ - { - "id": 28555, + "id": 45245, "name": "withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28517, - "src": "1165:20:19", + "referencedDeclaration": 45207, + "src": "1153:20:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 28556, - "name": "returnedAmount", + "id": 45246, + "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28534, - "src": "1199:14:19", + "referencedDeclaration": 45235, + "src": "1187:14:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 28557, - "name": "owner", + "id": 45247, + "name": "feeRewardsManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28515, - "src": "1227:5:19", + "referencedDeclaration": 45205, + "src": "1215:17:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 28558, - "name": "ownerAmount", + "id": 45248, + "name": "feeAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28521, - "src": "1246:11:19", + "referencedDeclaration": 45222, + "src": "1246:9:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1313,18 +1446,18 @@ "typeString": "uint256" } ], - "id": 28554, + "id": 45244, "name": "CollectedReward", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28511, - "src": "1136:15:19", + "referencedDeclaration": 45201, + "src": "1124:15:25", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,address,uint256)" } }, - "id": 28559, + "id": 45249, "isConstant": false, "isLValue": false, "isPure": false, @@ -1333,113 +1466,264 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1136:131:19", + "src": "1124:141:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28560, + "id": 45250, "nodeType": "EmitStatement", - "src": "1131:136:19" + "src": "1119:146:25" }, { - "expression": { + "assignments": [ + 45252, + null + ], + "declarations": [ + { + "constant": false, + "id": 45252, + "mutability": "mutable", + "name": "feeRewardsManagerSent", + "nameLocation": "1436:21:25", + "nodeType": "VariableDeclaration", + "scope": 45285, + "src": "1431:26:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 45251, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1431:4:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 45262, + "initialValue": { "arguments": [ { - "id": 28566, - "name": "ownerAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28521, - "src": "1443:11:19", + "hexValue": "", + "id": 45260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1535:2:25", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" } ], "expression": { - "arguments": [ + "argumentTypes": [ { - "id": 28563, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28515, - "src": "1427:5:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" } ], "expression": { - "argumentTypes": [ + "arguments": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "id": 45255, + "name": "feeRewardsManager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45205, + "src": "1471:17:25", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 28562, + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 45254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1463:8:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 45253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1463:8:25", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 45256, "isConstant": false, "isLValue": false, - "isPure": true, + "isPure": false, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1419:8:19", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1463:26:25", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_payable_$", - "typeString": "type(address payable)" - }, - "typeName": { - "id": 28561, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1419:8:19", - "stateMutability": "payable", - "typeDescriptions": {} + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 28564, + "id": 45257, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "typeConversion", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1419:14:19", - "tryCall": false, + "memberLocation": "1490:4:25", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "1463:31:25", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 28565, + "id": 45259, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1434:8:19", - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "1419:23:19", + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 45258, + "name": "feeAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45222, + "src": "1515:9:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "1463:71:25", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 45261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1463:75:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1430:108:25" + }, + { + "expression": { + "arguments": [ + { + "id": 45264, + "name": "feeRewardsManagerSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45252, + "src": "1569:21:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4661696c656420746f2073656e64204574686572206261636b20746f206f776e657220636f6e7472616374", + "id": 45265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1604:45:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_63aa9f71d140506e95e1b3ae24505ef7d3784944eea371a4448c0286e55eeff6", + "typeString": "literal_string \"Failed to send Ether back to owner contract\"" + }, + "value": "Failed to send Ether back to owner contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_63aa9f71d140506e95e1b3ae24505ef7d3784944eea371a4448c0286e55eeff6", + "typeString": "literal_string \"Failed to send Ether back to owner contract\"" + } + ], + "id": 45263, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1548:7:25", "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 28567, + "id": 45266, "isConstant": false, "isLValue": false, "isPure": false, @@ -1448,32 +1732,32 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1419:36:19", + "src": "1548:111:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28568, + "id": 45267, "nodeType": "ExpressionStatement", - "src": "1419:36:19" + "src": "1548:111:25" }, { "assignments": [ - 28570, + 45269, null ], "declarations": [ { "constant": false, - "id": 28570, + "id": 45269, "mutability": "mutable", "name": "sent", - "nameLocation": "1471:4:19", + "nameLocation": "1675:4:25", "nodeType": "VariableDeclaration", - "scope": 28586, - "src": "1466:9:19", + "scope": 45285, + "src": "1670:9:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1481,10 +1765,10 @@ "typeString": "bool" }, "typeName": { - "id": 28569, + "id": 45268, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1466:4:19", + "src": "1670:4:25", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1494,19 +1778,19 @@ }, null ], - "id": 28580, + "id": 45279, "initialValue": { "arguments": [ { "hexValue": "", - "id": 28578, + "id": 45277, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1561:2:19", + "src": "1765:2:25", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" @@ -1531,12 +1815,12 @@ "expression": { "arguments": [ { - "id": 28573, + "id": 45272, "name": "withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28517, - "src": "1489:20:19", + "referencedDeclaration": 45207, + "src": "1693:20:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1550,27 +1834,27 @@ "typeString": "address" } ], - "id": 28572, + "id": 45271, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1481:8:19", + "src": "1685:8:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_payable_$", "typeString": "type(address payable)" }, "typeName": { - "id": 28571, + "id": 45270, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1481:8:19", + "src": "1685:8:25", "stateMutability": "payable", "typeDescriptions": {} } }, - "id": 28574, + "id": 45273, "isConstant": false, "isLValue": false, "isPure": false, @@ -1579,28 +1863,28 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1481:29:19", + "src": "1685:29:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 28575, + "id": 45274, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1511:4:19", + "memberLocation": "1715:4:25", "memberName": "call", "nodeType": "MemberAccess", - "src": "1481:34:19", + "src": "1685:34:25", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 28577, + "id": 45276, "isConstant": false, "isLValue": false, "isPure": false, @@ -1611,25 +1895,25 @@ "nodeType": "FunctionCallOptions", "options": [ { - "id": 28576, - "name": "returnedAmount", + "id": 45275, + "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28534, - "src": "1536:14:19", + "referencedDeclaration": 45235, + "src": "1740:14:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "src": "1481:79:19", + "src": "1685:79:25", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 28579, + "id": 45278, "isConstant": false, "isLValue": false, "isPure": false, @@ -1638,7 +1922,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1481:83:19", + "src": "1685:83:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", @@ -1646,18 +1930,18 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "1465:99:19" + "src": "1669:99:25" }, { "expression": { "arguments": [ { - "id": 28582, + "id": 45281, "name": "sent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28570, - "src": "1582:4:19", + "referencedDeclaration": 45269, + "src": "1786:4:25", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1665,14 +1949,14 @@ }, { "hexValue": "4661696c656420746f2073656e64204574686572206261636b20746f207769746864726177616c2063726564656e7469616c", - "id": 28583, + "id": 45282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1588:52:19", + "src": "1792:52:25", "typeDescriptions": { "typeIdentifier": "t_stringliteral_6ccf786fc3618692ee3b7a0f19c9a459b50c544b1291a2feb85a687148f1638e", "typeString": "literal_string \"Failed to send Ether back to withdrawal credential\"" @@ -1691,7 +1975,7 @@ "typeString": "literal_string \"Failed to send Ether back to withdrawal credential\"" } ], - "id": 28581, + "id": 45280, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1699,13 +1983,13 @@ -18 ], "referencedDeclaration": -18, - "src": "1574:7:19", + "src": "1778:7:25", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 28584, + "id": 45283, "isConstant": false, "isLValue": false, "isPure": false, @@ -1714,38 +1998,38 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1574:67:19", + "src": "1778:67:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28585, + "id": 45284, "nodeType": "ExpressionStatement", - "src": "1574:67:19" + "src": "1778:67:25" } ] }, - "functionSelector": "ea788f43", + "functionSelector": "50d86980", "implemented": true, "kind": "function", "modifiers": [], - "name": "calculateRewards", - "nameLocation": "714:16:19", + "name": "calculateAndSendRewards", + "nameLocation": "733:23:25", "parameters": { - "id": 28518, + "id": 45208, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28513, + "id": 45203, "mutability": "mutable", "name": "feeNominator", - "nameLocation": "747:12:19", + "nameLocation": "773:12:25", "nodeType": "VariableDeclaration", - "scope": 28587, - "src": "740:19:19", + "scope": 45286, + "src": "766:19:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1753,10 +2037,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28512, + "id": 45202, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "740:6:19", + "src": "766:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1766,13 +2050,13 @@ }, { "constant": false, - "id": 28515, + "id": 45205, "mutability": "mutable", - "name": "owner", - "nameLocation": "777:5:19", + "name": "feeRewardsManager", + "nameLocation": "803:17:25", "nodeType": "VariableDeclaration", - "scope": 28587, - "src": "769:13:19", + "scope": 45286, + "src": "795:25:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1780,10 +2064,10 @@ "typeString": "address" }, "typeName": { - "id": 28514, + "id": 45204, "name": "address", "nodeType": "ElementaryTypeName", - "src": "769:7:19", + "src": "795:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1794,13 +2078,13 @@ }, { "constant": false, - "id": 28517, + "id": 45207, "mutability": "mutable", "name": "withdrawalCredential", - "nameLocation": "800:20:19", + "nameLocation": "838:20:25", "nodeType": "VariableDeclaration", - "scope": 28587, - "src": "792:28:19", + "scope": 45286, + "src": "830:28:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1808,10 +2092,10 @@ "typeString": "address" }, "typeName": { - "id": 28516, + "id": 45206, "name": "address", "nodeType": "ElementaryTypeName", - "src": "792:7:19", + "src": "830:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1821,15 +2105,15 @@ "visibility": "internal" } ], - "src": "730:96:19" + "src": "756:108:25" }, "returnParameters": { - "id": 28519, + "id": 45209, "nodeType": "ParameterList", "parameters": [], - "src": "834:0:19" + "src": "872:0:25" }, - "scope": 28588, + "scope": 45287, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -1842,32 +2126,32 @@ "contractKind": "library", "fullyImplemented": true, "linearizedBaseContracts": [ - 28588 + 45287 ], "name": "CalculateAndSendRewards", - "nameLocation": "378:23:19", - "scope": 28869, + "nameLocation": "389:23:25", + "scope": 45604, "usedErrors": [], "usedEvents": [ - 28511 + 45201 ] }, { - "id": 28650, + "id": 45350, "nodeType": "ContractDefinition", - "src": "1652:1234:19", + "src": "1856:1331:25", "nodes": [ { - "id": 28590, + "id": 45289, "nodeType": "VariableDeclaration", - "src": "1738:35:19", + "src": "1942:45:25", "nodes": [], "constant": false, "functionSelector": "83059303", - "mutability": "mutable", + "mutability": "immutable", "name": "withdrawalCredential", - "nameLocation": "1753:20:19", - "scope": 28650, + "nameLocation": "1967:20:25", + "scope": 45350, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1875,10 +2159,10 @@ "typeString": "address" }, "typeName": { - "id": 28589, + "id": 45288, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1738:7:19", + "src": "1942:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1888,16 +2172,16 @@ "visibility": "public" }, { - "id": 28592, + "id": 45291, "nodeType": "VariableDeclaration", - "src": "1804:26:19", + "src": "2018:26:25", "nodes": [], "constant": false, "functionSelector": "e86dea4a", "mutability": "mutable", "name": "feeNumerator", - "nameLocation": "1818:12:19", - "scope": 28650, + "nameLocation": "2032:12:25", + "scope": 45350, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1905,10 +2189,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28591, + "id": 45290, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1804:6:19", + "src": "2018:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1917,16 +2201,16 @@ "visibility": "public" }, { - "id": 28594, + "id": 45293, "nodeType": "VariableDeclaration", - "src": "2124:29:19", + "src": "2338:39:25", "nodes": [], "constant": false, "functionSelector": "230b9da3", - "mutability": "mutable", + "mutability": "immutable", "name": "parentContract", - "nameLocation": "2139:14:19", - "scope": 28650, + "nameLocation": "2363:14:25", + "scope": 45350, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1934,10 +2218,10 @@ "typeString": "address" }, "typeName": { - "id": 28593, + "id": 45292, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2124:7:19", + "src": "2338:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1947,14 +2231,14 @@ "visibility": "public" }, { - "id": 28598, + "id": 45297, "nodeType": "FunctionDefinition", - "src": "2206:29:19", + "src": "2430:29:25", "nodes": [], "body": { - "id": 28597, + "id": 45296, "nodeType": "Block", - "src": "2233:2:19", + "src": "2457:2:25", "nodes": [], "statements": [] }, @@ -1964,67 +2248,67 @@ "name": "", "nameLocation": "-1:-1:-1", "parameters": { - "id": 28595, + "id": 45294, "nodeType": "ParameterList", "parameters": [], - "src": "2213:2:19" + "src": "2437:2:25" }, "returnParameters": { - "id": 28596, + "id": 45295, "nodeType": "ParameterList", "parameters": [], - "src": "2233:0:19" + "src": "2457:0:25" }, - "scope": 28650, + "scope": 45350, "stateMutability": "payable", "virtual": false, "visibility": "external" }, { - "id": 28610, + "id": 45309, "nodeType": "FunctionDefinition", - "src": "2241:196:19", + "src": "2465:203:25", "nodes": [], "body": { - "id": 28609, + "id": 45308, "nodeType": "Block", - "src": "2282:155:19", + "src": "2506:162:25", "nodes": [], "statements": [ { "expression": { "arguments": [ { - "id": 28604, + "id": 45303, "name": "feeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28592, - "src": "2346:12:19", + "referencedDeclaration": 45291, + "src": "2577:12:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, { - "id": 28605, + "id": 45304, "name": "parentContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28594, - "src": "2372:14:19", + "referencedDeclaration": 45293, + "src": "2603:14:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 28606, + "id": 45305, "name": "withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28590, - "src": "2400:20:19", + "referencedDeclaration": 45289, + "src": "2631:20:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2047,33 +2331,33 @@ } ], "expression": { - "id": 28601, + "id": 45300, "name": "CalculateAndSendRewards", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28588, - "src": "2292:23:19", + "referencedDeclaration": 45287, + "src": "2516:23:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_CalculateAndSendRewards_$28588_$", + "typeIdentifier": "t_type$_t_contract$_CalculateAndSendRewards_$45287_$", "typeString": "type(library CalculateAndSendRewards)" } }, - "id": 28603, + "id": 45302, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2316:16:19", - "memberName": "calculateRewards", + "memberLocation": "2540:23:25", + "memberName": "calculateAndSendRewards", "nodeType": "MemberAccess", - "referencedDeclaration": 28587, - "src": "2292:40:19", + "referencedDeclaration": 45286, + "src": "2516:47:25", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_nonpayable$_t_uint32_$_t_address_$_t_address_$returns$__$", "typeString": "function (uint32,address,address)" } }, - "id": 28607, + "id": 45306, "isConstant": false, "isLValue": false, "isPure": false, @@ -2082,16 +2366,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2292:138:19", + "src": "2516:145:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28608, + "id": 45307, "nodeType": "ExpressionStatement", - "src": "2292:138:19" + "src": "2516:145:25" } ] }, @@ -2100,49 +2384,49 @@ "kind": "function", "modifiers": [], "name": "collectRewards", - "nameLocation": "2250:14:19", + "nameLocation": "2474:14:25", "parameters": { - "id": 28599, + "id": 45298, "nodeType": "ParameterList", "parameters": [], - "src": "2264:2:19" + "src": "2488:2:25" }, "returnParameters": { - "id": 28600, + "id": 45299, "nodeType": "ParameterList", "parameters": [], - "src": "2282:0:19" + "src": "2506:0:25" }, - "scope": 28650, + "scope": 45350, "stateMutability": "payable", "virtual": false, "visibility": "public" }, { - "id": 28631, + "id": 45324, "nodeType": "FunctionDefinition", - "src": "2443:201:19", + "src": "2674:141:25", "nodes": [], "body": { - "id": 28630, + "id": 45323, "nodeType": "Block", - "src": "2508:136:19", + "src": "2717:98:25", "nodes": [], "statements": [ { "expression": { - "id": 28619, + "id": 45316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 28617, + "id": 45314, "name": "withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28590, - "src": "2518:20:19", + "referencedDeclaration": 45289, + "src": "2727:20:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2151,84 +2435,41 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 28618, + "id": 45315, "name": "_withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28612, - "src": "2541:21:19", + "referencedDeclaration": 45311, + "src": "2750:21:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2518:44:19", + "src": "2727:44:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 28620, + "id": 45317, "nodeType": "ExpressionStatement", - "src": "2518:44:19" + "src": "2727:44:25" }, { "expression": { - "id": 28623, + "id": 45321, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 28621, - "name": "feeNumerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28592, - "src": "2572:12:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 28622, - "name": "_feeNumerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28614, - "src": "2587:13:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "2572:28:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 28624, - "nodeType": "ExpressionStatement", - "src": "2572:28:19" - }, - { - "expression": { - "id": 28628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 28625, + "id": 45318, "name": "parentContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28594, - "src": "2610:14:19", + "referencedDeclaration": 45293, + "src": "2781:14:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2238,40 +2479,40 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 28626, + "id": 45319, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "2627:3:19", + "src": "2798:3:25", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 28627, + "id": 45320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2631:6:19", + "memberLocation": "2802:6:25", "memberName": "sender", "nodeType": "MemberAccess", - "src": "2627:10:19", + "src": "2798:10:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2610:27:19", + "src": "2781:27:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 28629, + "id": 45322, "nodeType": "ExpressionStatement", - "src": "2610:27:19" + "src": "2781:27:25" } ] }, @@ -2281,18 +2522,18 @@ "name": "", "nameLocation": "-1:-1:-1", "parameters": { - "id": 28615, + "id": 45312, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28612, + "id": 45311, "mutability": "mutable", "name": "_withdrawalCredential", - "nameLocation": "2463:21:19", + "nameLocation": "2694:21:25", "nodeType": "VariableDeclaration", - "scope": 28631, - "src": "2455:29:19", + "scope": 45324, + "src": "2686:29:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2300,10 +2541,10 @@ "typeString": "address" }, "typeName": { - "id": 28611, + "id": 45310, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2455:7:19", + "src": "2686:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2311,134 +2552,218 @@ } }, "visibility": "internal" - }, + } + ], + "src": "2685:31:25" + }, + "returnParameters": { + "id": 45313, + "nodeType": "ParameterList", + "parameters": [], + "src": "2717:0:25" + }, + "scope": 45350, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "id": 45349, + "nodeType": "FunctionDefinition", + "src": "2821:364:25", + "nodes": [], + "body": { + "id": 45348, + "nodeType": "Block", + "src": "2881:304:25", + "nodes": [], + "statements": [ { - "constant": false, - "id": 28614, - "mutability": "mutable", - "name": "_feeNumerator", - "nameLocation": "2493:13:19", - "nodeType": "VariableDeclaration", - "scope": 28631, - "src": "2486:20:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 28613, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2486:6:19", + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 45333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 45330, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2912:3:25", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 45331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2916:6:25", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2912:10:25", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 45332, + "name": "parentContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45293, + "src": "2926:14:25", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2912:28:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4368616e6765466565206e6f742063616c6c65642066726f6d20706172656e7420636f6e7472616374", + "id": 45334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2954:43:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ac16390d20fe80ce13231de77b89bac161e164e2dad6197662a09bda86b1722", + "typeString": "literal_string \"ChangeFee not called from parent contract\"" + }, + "value": "ChangeFee not called from parent contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3ac16390d20fe80ce13231de77b89bac161e164e2dad6197662a09bda86b1722", + "typeString": "literal_string \"ChangeFee not called from parent contract\"" + } + ], + "id": 45329, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2891:7:25", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 45335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2891:116:25", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "visibility": "internal" - } - ], - "src": "2454:53:19" - }, - "returnParameters": { - "id": 28616, - "nodeType": "ParameterList", - "parameters": [], - "src": "2508:0:19" - }, - "scope": 28650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "id": 28649, - "nodeType": "FunctionDefinition", - "src": "2650:234:19", - "nodes": [], - "body": { - "id": 28648, - "nodeType": "Block", - "src": "2710:174:19", - "nodes": [], - "statements": [ + "id": 45336, + "nodeType": "ExpressionStatement", + "src": "2891:116:25" + }, { "expression": { "arguments": [ { "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint32", + "typeString": "uint32" }, - "id": 28640, + "id": 45340, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "expression": { - "id": 28637, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2741:3:19", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 28638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2745:6:19", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "2741:10:19", + "id": 45338, + "name": "_newFeeNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45326, + "src": "3085:16:25", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint32", + "typeString": "uint32" } }, "nodeType": "BinaryOperation", - "operator": "==", + "operator": "<=", "rightExpression": { - "id": 28639, - "name": "parentContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28594, - "src": "2755:14:19", + "hexValue": "31305f303030", + "id": 45339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3105:6:25", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10_000" }, - "src": "2741:28:19", + "src": "3085:26:25", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "hexValue": "4368616e6765466565206e6f742063616c6c65642066726f6d20706172656e7420636f6e7472616374", - "id": 28641, + "hexValue": "496e76616c696420666565206e756d657261746f72", + "id": 45341, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2783:43:19", + "src": "3113:23:25", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ac16390d20fe80ce13231de77b89bac161e164e2dad6197662a09bda86b1722", - "typeString": "literal_string \"ChangeFee not called from parent contract\"" + "typeIdentifier": "t_stringliteral_7717f2bb590a0e4bac5e786736f6921be279b2d9e98c99b6d860f9e64478568b", + "typeString": "literal_string \"Invalid fee numerator\"" }, - "value": "ChangeFee not called from parent contract" + "value": "Invalid fee numerator" } ], "expression": { @@ -2448,11 +2773,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_3ac16390d20fe80ce13231de77b89bac161e164e2dad6197662a09bda86b1722", - "typeString": "literal_string \"ChangeFee not called from parent contract\"" + "typeIdentifier": "t_stringliteral_7717f2bb590a0e4bac5e786736f6921be279b2d9e98c99b6d860f9e64478568b", + "typeString": "literal_string \"Invalid fee numerator\"" } ], - "id": 28636, + "id": 45337, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2460,13 +2785,13 @@ -18 ], "referencedDeclaration": -18, - "src": "2720:7:19", + "src": "3077:7:25", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 28642, + "id": 45342, "isConstant": false, "isLValue": false, "isPure": false, @@ -2475,31 +2800,31 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2720:116:19", + "src": "3077:60:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28643, + "id": 45343, "nodeType": "ExpressionStatement", - "src": "2720:116:19" + "src": "3077:60:25" }, { "expression": { - "id": 28646, + "id": 45346, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 28644, + "id": 45344, "name": "feeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28592, - "src": "2846:12:19", + "referencedDeclaration": 45291, + "src": "3147:12:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2508,26 +2833,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 28645, + "id": 45345, "name": "_newFeeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28633, - "src": "2861:16:19", + "referencedDeclaration": 45326, + "src": "3162:16:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "src": "2846:31:19", + "src": "3147:31:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "id": 28647, + "id": 45347, "nodeType": "ExpressionStatement", - "src": "2846:31:19" + "src": "3147:31:25" } ] }, @@ -2536,20 +2861,20 @@ "kind": "function", "modifiers": [], "name": "changeFeeNumerator", - "nameLocation": "2659:18:19", + "nameLocation": "2830:18:25", "parameters": { - "id": 28634, + "id": 45327, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28633, + "id": 45326, "mutability": "mutable", "name": "_newFeeNumerator", - "nameLocation": "2685:16:19", + "nameLocation": "2856:16:25", "nodeType": "VariableDeclaration", - "scope": 28649, - "src": "2678:23:19", + "scope": 45349, + "src": "2849:23:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2557,10 +2882,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28632, + "id": 45325, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "2678:6:19", + "src": "2849:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2569,15 +2894,15 @@ "visibility": "internal" } ], - "src": "2677:25:19" + "src": "2848:25:25" }, "returnParameters": { - "id": 28635, + "id": 45328, "nodeType": "ParameterList", "parameters": [], - "src": "2710:0:19" + "src": "2881:0:25" }, - "scope": 28650, + "scope": 45350, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -2590,30 +2915,30 @@ "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ - 28650 + 45350 ], "name": "RewardsCollector", - "nameLocation": "1661:16:19", - "scope": 28869, + "nameLocation": "1865:16:25", + "scope": 45604, "usedErrors": [], "usedEvents": [] }, { - "id": 28868, + "id": 45603, "nodeType": "ContractDefinition", - "src": "2888:2661:19", + "src": "3189:3059:25", "nodes": [ { - "id": 28654, + "id": 45354, "nodeType": "VariableDeclaration", - "src": "2932:33:19", + "src": "3238:33:25", "nodes": [], "constant": false, "functionSelector": "af3f6f4d", "mutability": "mutable", "name": "defaultFeeNumerator", - "nameLocation": "2946:19:19", - "scope": 28868, + "nameLocation": "3252:19:25", + "scope": 45603, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2621,10 +2946,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28653, + "id": 45353, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "2932:6:19", + "src": "3238:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2633,30 +2958,141 @@ "visibility": "public" }, { - "id": 28664, + "id": 45375, "nodeType": "FunctionDefinition", - "src": "2972:100:19", + "src": "3278:254:25", "nodes": [], "body": { - "id": 28663, + "id": 45374, "nodeType": "Block", - "src": "3013:59:19", + "src": "3339:193:25", "nodes": [], "statements": [ { "expression": { - "id": 28661, + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 45366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 45364, + "name": "_defaultFeeNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45356, + "src": "3417:20:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "31305f303030", + "id": 45365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3441:6:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10_000" + }, + "src": "3417:30:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c696420666565206e756d657261746f72", + "id": 45367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3449:23:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7717f2bb590a0e4bac5e786736f6921be279b2d9e98c99b6d860f9e64478568b", + "typeString": "literal_string \"Invalid fee numerator\"" + }, + "value": "Invalid fee numerator" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7717f2bb590a0e4bac5e786736f6921be279b2d9e98c99b6d860f9e64478568b", + "typeString": "literal_string \"Invalid fee numerator\"" + } + ], + "id": 45363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3409:7:25", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 45368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3409:64:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 45369, + "nodeType": "ExpressionStatement", + "src": "3409:64:25" + }, + { + "expression": { + "id": 45372, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 28659, + "id": 45370, "name": "defaultFeeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28654, - "src": "3023:19:19", + "referencedDeclaration": 45354, + "src": "3483:19:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2665,47 +3101,93 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 28660, + "id": 45371, "name": "_defaultFeeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28656, - "src": "3045:20:19", + "referencedDeclaration": 45356, + "src": "3505:20:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "src": "3023:42:19", + "src": "3483:42:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "id": 28662, + "id": 45373, "nodeType": "ExpressionStatement", - "src": "3023:42:19" + "src": "3483:42:25" } ] }, "implemented": true, "kind": "constructor", - "modifiers": [], + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 45359, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3327:3:25", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 45360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3331:6:25", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3327:10:25", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 45361, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 45358, + "name": "Ownable", + "nameLocations": [ + "3319:7:25" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 147, + "src": "3319:7:25" + }, + "nodeType": "ModifierInvocation", + "src": "3319:19:25" + } + ], "name": "", "nameLocation": "-1:-1:-1", "parameters": { - "id": 28657, + "id": 45357, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28656, + "id": 45356, "mutability": "mutable", "name": "_defaultFeeNumerator", - "nameLocation": "2991:20:19", + "nameLocation": "3297:20:25", "nodeType": "VariableDeclaration", - "scope": 28664, - "src": "2984:27:19", + "scope": 45375, + "src": "3290:27:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2713,10 +3195,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28655, + "id": 45355, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "2984:6:19", + "src": "3290:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2725,42 +3207,42 @@ "visibility": "internal" } ], - "src": "2983:29:19" + "src": "3289:29:25" }, "returnParameters": { - "id": 28658, + "id": 45362, "nodeType": "ParameterList", "parameters": [], - "src": "3013:0:19" + "src": "3339:0:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 28670, + "id": 45381, "nodeType": "EventDefinition", - "src": "3078:69:19", + "src": "3538:69:25", "nodes": [], "anonymous": false, "eventSelector": "620dca0c9d04f7cea9d7f31e571d74acccd54c21dc8ff8855ec1d5a21733c26b", "name": "ContractDeployed", - "nameLocation": "3084:16:19", + "nameLocation": "3544:16:25", "parameters": { - "id": 28669, + "id": 45380, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28666, + "id": 45377, "indexed": false, "mutability": "mutable", "name": "contractAddress", - "nameLocation": "3109:15:19", + "nameLocation": "3569:15:25", "nodeType": "VariableDeclaration", - "scope": 28670, - "src": "3101:23:19", + "scope": 45381, + "src": "3561:23:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2768,10 +3250,10 @@ "typeString": "address" }, "typeName": { - "id": 28665, + "id": 45376, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3101:7:19", + "src": "3561:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2782,14 +3264,14 @@ }, { "constant": false, - "id": 28668, + "id": 45379, "indexed": false, "mutability": "mutable", "name": "feeNumerator", - "nameLocation": "3133:12:19", + "nameLocation": "3593:12:25", "nodeType": "VariableDeclaration", - "scope": 28670, - "src": "3126:19:19", + "scope": 45381, + "src": "3586:19:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2797,10 +3279,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28667, + "id": 45378, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "3126:6:19", + "src": "3586:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2809,34 +3291,145 @@ "visibility": "internal" } ], - "src": "3100:46:19" + "src": "3560:46:25" } }, { - "id": 28682, + "id": 45400, "nodeType": "FunctionDefinition", - "src": "3153:123:19", + "src": "3613:253:25", "nodes": [], "body": { - "id": 28681, + "id": 45399, "nodeType": "Block", - "src": "3221:55:19", + "src": "3681:185:25", "nodes": [], "statements": [ { "expression": { - "id": 28679, + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 45391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 45389, + "name": "_newFeeNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45383, + "src": "3759:16:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "31305f303030", + "id": 45390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3779:6:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10_000" + }, + "src": "3759:26:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c696420666565206e756d657261746f72", + "id": 45392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3787:23:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7717f2bb590a0e4bac5e786736f6921be279b2d9e98c99b6d860f9e64478568b", + "typeString": "literal_string \"Invalid fee numerator\"" + }, + "value": "Invalid fee numerator" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7717f2bb590a0e4bac5e786736f6921be279b2d9e98c99b6d860f9e64478568b", + "typeString": "literal_string \"Invalid fee numerator\"" + } + ], + "id": 45388, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3751:7:25", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 45393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3751:60:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 45394, + "nodeType": "ExpressionStatement", + "src": "3751:60:25" + }, + { + "expression": { + "id": 45397, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 28677, + "id": 45395, "name": "defaultFeeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28654, - "src": "3231:19:19", + "referencedDeclaration": 45354, + "src": "3821:19:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2845,26 +3438,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 28678, + "id": 45396, "name": "_newFeeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28672, - "src": "3253:16:19", + "referencedDeclaration": 45383, + "src": "3843:16:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "src": "3231:38:19", + "src": "3821:38:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, - "id": 28680, + "id": 45398, "nodeType": "ExpressionStatement", - "src": "3231:38:19" + "src": "3821:38:25" } ] }, @@ -2873,37 +3466,37 @@ "kind": "function", "modifiers": [ { - "id": 28675, + "id": 45386, "kind": "modifierInvocation", "modifierName": { - "id": 28674, + "id": 45385, "name": "onlyOwner", "nameLocations": [ - "3211:9:19" + "3671:9:25" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 31, - "src": "3211:9:19" + "referencedDeclaration": 58, + "src": "3671:9:25" }, "nodeType": "ModifierInvocation", - "src": "3211:9:19" + "src": "3671:9:25" } ], "name": "changeDefaultFee", - "nameLocation": "3162:16:19", + "nameLocation": "3622:16:25", "parameters": { - "id": 28673, + "id": 45384, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28672, + "id": 45383, "mutability": "mutable", "name": "_newFeeNumerator", - "nameLocation": "3186:16:19", + "nameLocation": "3646:16:25", "nodeType": "VariableDeclaration", - "scope": 28682, - "src": "3179:23:19", + "scope": 45400, + "src": "3639:23:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2911,10 +3504,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28671, + "id": 45382, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "3179:6:19", + "src": "3639:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2923,44 +3516,44 @@ "visibility": "internal" } ], - "src": "3178:25:19" + "src": "3638:25:25" }, "returnParameters": { - "id": 28676, + "id": 45387, "nodeType": "ParameterList", "parameters": [], - "src": "3221:0:19" + "src": "3681:0:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 28727, + "id": 45454, "nodeType": "FunctionDefinition", - "src": "3282:551:19", + "src": "3872:600:25", "nodes": [], "body": { - "id": 28726, + "id": 45453, "nodeType": "Block", - "src": "3387:446:19", + "src": "3977:495:25", "nodes": [], "statements": [ { "assignments": [ - 28690 + 45408 ], "declarations": [ { "constant": false, - "id": 28690, + "id": 45408, "mutability": "mutable", "name": "withdrawalCredentialBytes", - "nameLocation": "3405:25:19", + "nameLocation": "3995:25:25", "nodeType": "VariableDeclaration", - "scope": 28726, - "src": "3397:33:19", + "scope": 45453, + "src": "3987:33:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2968,10 +3561,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 28689, + "id": 45407, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3397:7:19", + "src": "3987:7:25", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2980,7 +3573,7 @@ "visibility": "internal" } ], - "id": 28701, + "id": 45419, "initialValue": { "arguments": [ { @@ -2988,12 +3581,12 @@ { "arguments": [ { - "id": 28697, + "id": 45415, "name": "_withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28684, - "src": "3470:21:19", + "referencedDeclaration": 45402, + "src": "4060:21:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3007,26 +3600,26 @@ "typeString": "address" } ], - "id": 28696, + "id": 45414, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3462:7:19", + "src": "4052:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)" }, "typeName": { - "id": 28695, + "id": 45413, "name": "uint160", "nodeType": "ElementaryTypeName", - "src": "3462:7:19", + "src": "4052:7:25", "typeDescriptions": {} } }, - "id": 28698, + "id": 45416, "isConstant": false, "isLValue": false, "isPure": false, @@ -3035,7 +3628,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3462:30:19", + "src": "4052:30:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint160", @@ -3050,26 +3643,26 @@ "typeString": "uint160" } ], - "id": 28694, + "id": 45412, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3454:7:19", + "src": "4044:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 28693, + "id": 45411, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3454:7:19", + "src": "4044:7:25", "typeDescriptions": {} } }, - "id": 28699, + "id": 45417, "isConstant": false, "isLValue": false, "isPure": false, @@ -3078,7 +3671,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3454:39:19", + "src": "4044:39:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -3093,26 +3686,26 @@ "typeString": "uint256" } ], - "id": 28692, + "id": 45410, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3433:7:19", + "src": "4023:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes32_$", "typeString": "type(bytes32)" }, "typeName": { - "id": 28691, + "id": 45409, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3433:7:19", + "src": "4023:7:25", "typeDescriptions": {} } }, - "id": 28700, + "id": 45418, "isConstant": false, "isLValue": false, "isPure": false, @@ -3121,7 +3714,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3433:70:19", + "src": "4023:70:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -3129,239 +3722,298 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "3397:106:19" + "src": "3987:106:25" }, { "assignments": [ - 28703 + 45422 ], "declarations": [ { "constant": false, - "id": 28703, + "id": 45422, "mutability": "mutable", - "name": "addr", - "nameLocation": "3521:4:19", + "name": "rewardsCollector", + "nameLocation": "4152:16:25", "nodeType": "VariableDeclaration", - "scope": 28726, - "src": "3513:12:19", + "scope": 45453, + "src": "4135:33:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" }, "typeName": { - "id": 28702, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3513:7:19", - "stateMutability": "nonpayable", + "id": 45421, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 45420, + "name": "RewardsCollector", + "nameLocations": [ + "4135:16:25" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 45350, + "src": "4135:16:25" + }, + "referencedDeclaration": 45350, + "src": "4135:16:25", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" } }, "visibility": "internal" } ], - "id": 28715, + "id": 45430, "initialValue": { "arguments": [ { - "arguments": [ - { - "id": 28711, - "name": "_withdrawalCredential", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28684, - "src": "3656:21:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, + "id": 45428, + "name": "_withdrawalCredential", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45402, + "src": "4247:21:25", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": [ { - "id": 28712, - "name": "defaultFeeNumerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28654, - "src": "3695:19:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } + "typeIdentifier": "t_address", + "typeString": "address" } ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 28708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "3585:20:19", - "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$_t_address_$_t_uint32_$returns$_t_contract$_RewardsCollector_$28650_$", - "typeString": "function (address,uint32) returns (contract RewardsCollector)" - }, - "typeName": { - "id": 28707, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 28706, - "name": "RewardsCollector", - "nameLocations": [ - "3589:16:19" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 28650, - "src": "3589:16:19" - }, - "referencedDeclaration": 28650, - "src": "3589:16:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_RewardsCollector_$28650", - "typeString": "contract RewardsCollector" - } - } - }, - "id": 28710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "salt" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 28709, - "name": "withdrawalCredentialBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28690, - "src": "3612:25:19", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "src": "3585:53:19", - "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$_t_address_$_t_uint32_$returns$_t_contract$_RewardsCollector_$28650_$salt", - "typeString": "function (address,uint32) returns (contract RewardsCollector)" - } - }, - "id": 28713, + "id": 45425, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3585:143:19", - "tryCall": false, + "nodeType": "NewExpression", + "src": "4171:20:25", "typeDescriptions": { - "typeIdentifier": "t_contract$_RewardsCollector_$28650", - "typeString": "contract RewardsCollector" + "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_RewardsCollector_$45350_$", + "typeString": "function (address) returns (contract RewardsCollector)" + }, + "typeName": { + "id": 45424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 45423, + "name": "RewardsCollector", + "nameLocations": [ + "4175:16:25" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 45350, + "src": "4175:16:25" + }, + "referencedDeclaration": 45350, + "src": "4175:16:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + } + }, + "id": 45427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "salt" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 45426, + "name": "withdrawalCredentialBytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45408, + "src": "4211:25:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "src": "4171:75:25", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_RewardsCollector_$45350_$salt", + "typeString": "function (address) returns (contract RewardsCollector)" + } + }, + "id": 45429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4171:98:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4135:134:25" + }, + { + "expression": { + "arguments": [ + { + "id": 45434, + "name": "defaultFeeNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45354, + "src": "4315:19:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_RewardsCollector_$28650", - "typeString": "contract RewardsCollector" + "typeIdentifier": "t_uint32", + "typeString": "uint32" } ], - "id": 28705, + "expression": { + "id": 45431, + "name": "rewardsCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45422, + "src": "4279:16:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + }, + "id": 45433, "isConstant": false, "isLValue": false, - "isPure": true, + "isPure": false, "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3528:7:19", + "memberLocation": "4296:18:25", + "memberName": "changeFeeNumerator", + "nodeType": "MemberAccess", + "referencedDeclaration": 45349, + "src": "4279:35:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 28704, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3528:7:19", - "typeDescriptions": {} + "typeIdentifier": "t_function_external_nonpayable$_t_uint32_$returns$__$", + "typeString": "function (uint32) external" } }, - "id": 28714, + "id": 45435, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "typeConversion", + "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3528:210:19", + "src": "4279:56:25", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "nodeType": "VariableDeclarationStatement", - "src": "3513:225:19" + "id": 45436, + "nodeType": "ExpressionStatement", + "src": "4279:56:25" }, { "eventCall": { "arguments": [ { - "id": 28717, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28703, - "src": "3770:4:19", + "arguments": [ + { + "id": 45440, + "name": "rewardsCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45422, + "src": "4375:16:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + ], + "id": 45439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4367:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 45438, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4367:7:25", + "typeDescriptions": {} + } + }, + "id": 45441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4367:25:25", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 28718, + "id": 45442, "name": "defaultFeeNumerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28654, - "src": "3776:19:19", + "referencedDeclaration": 45354, + "src": "4394:19:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -3379,18 +4031,18 @@ "typeString": "uint32" } ], - "id": 28716, + "id": 45437, "name": "ContractDeployed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28670, - "src": "3753:16:19", + "referencedDeclaration": 45381, + "src": "4350:16:25", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint32_$returns$__$", "typeString": "function (address,uint32)" } }, - "id": 28719, + "id": 45443, "isConstant": false, "isLValue": false, "isPure": false, @@ -3399,27 +4051,72 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3753:43:19", + "src": "4350:64:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28720, + "id": 45444, "nodeType": "EmitStatement", - "src": "3748:48:19" + "src": "4345:69:25" }, { "expression": { "arguments": [ { - "id": 28723, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28703, - "src": "3821:4:19", + "arguments": [ + { + "id": 45449, + "name": "rewardsCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45422, + "src": "4447:16:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_RewardsCollector_$45350", + "typeString": "contract RewardsCollector" + } + ], + "id": 45448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4439:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 45447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4439:7:25", + "typeDescriptions": {} + } + }, + "id": 45450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4439:25:25", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3433,27 +4130,27 @@ "typeString": "address" } ], - "id": 28722, + "id": 45446, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3813:8:19", + "src": "4431:8:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_payable_$", "typeString": "type(address payable)" }, "typeName": { - "id": 28721, + "id": 45445, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3813:8:19", + "src": "4431:8:25", "stateMutability": "payable", "typeDescriptions": {} } }, - "id": 28724, + "id": 45451, "isConstant": false, "isLValue": false, "isPure": false, @@ -3462,17 +4159,17 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3813:13:19", + "src": "4431:34:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "functionReturnParameters": 28688, - "id": 28725, + "functionReturnParameters": 45406, + "id": 45452, "nodeType": "Return", - "src": "3806:20:19" + "src": "4424:41:25" } ] }, @@ -3481,20 +4178,20 @@ "kind": "function", "modifiers": [], "name": "createFeeContract", - "nameLocation": "3291:17:19", + "nameLocation": "3881:17:25", "parameters": { - "id": 28685, + "id": 45403, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28684, + "id": 45402, "mutability": "mutable", "name": "_withdrawalCredential", - "nameLocation": "3326:21:19", + "nameLocation": "3916:21:25", "nodeType": "VariableDeclaration", - "scope": 28727, - "src": "3318:29:19", + "scope": 45454, + "src": "3908:29:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3502,10 +4199,10 @@ "typeString": "address" }, "typeName": { - "id": 28683, + "id": 45401, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3318:7:19", + "src": "3908:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3515,21 +4212,21 @@ "visibility": "internal" } ], - "src": "3308:45:19" + "src": "3898:45:25" }, "returnParameters": { - "id": 28688, + "id": 45406, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28687, + "id": 45405, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 28727, - "src": "3370:15:19", + "scope": 45454, + "src": "3960:15:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3537,10 +4234,10 @@ "typeString": "address payable" }, "typeName": { - "id": 28686, + "id": 45404, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3370:15:19", + "src": "3960:15:25", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3550,38 +4247,38 @@ "visibility": "internal" } ], - "src": "3369:17:19" + "src": "3959:17:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 28798, + "id": 45524, "nodeType": "FunctionDefinition", - "src": "4203:713:19", + "src": "4842:692:25", "nodes": [], "body": { - "id": 28797, + "id": 45523, "nodeType": "Block", - "src": "4313:603:19", + "src": "4952:582:25", "nodes": [], "statements": [ { "assignments": [ - 28735 + 45462 ], "declarations": [ { "constant": false, - "id": 28735, + "id": 45462, "mutability": "mutable", "name": "bytecode", - "nameLocation": "4336:8:19", + "nameLocation": "4975:8:25", "nodeType": "VariableDeclaration", - "scope": 28797, - "src": "4323:21:19", + "scope": 45523, + "src": "4962:21:25", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -3589,10 +4286,10 @@ "typeString": "bytes" }, "typeName": { - "id": 28734, + "id": 45461, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "4323:5:19", + "src": "4962:5:25", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -3601,19 +4298,19 @@ "visibility": "internal" } ], - "id": 28740, + "id": 45467, "initialValue": { "expression": { "arguments": [ { - "id": 28737, + "id": 45464, "name": "RewardsCollector", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28650, - "src": "4352:16:19", + "referencedDeclaration": 45350, + "src": "4991:16:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$28650_$", + "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$45350_$", "typeString": "type(contract RewardsCollector)" } } @@ -3621,22 +4318,22 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$28650_$", + "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$45350_$", "typeString": "type(contract RewardsCollector)" } ], - "id": 28736, + "id": 45463, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, - "src": "4347:4:19", + "src": "4986:4:25", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 28738, + "id": 45465, "isConstant": false, "isLValue": false, "isPure": true, @@ -3645,44 +4342,44 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4347:22:19", + "src": "4986:22:25", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_magic_meta_type_t_contract$_RewardsCollector_$28650", + "typeIdentifier": "t_magic_meta_type_t_contract$_RewardsCollector_$45350", "typeString": "type(contract RewardsCollector)" } }, - "id": 28739, + "id": 45466, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "4370:12:19", + "memberLocation": "5009:12:25", "memberName": "creationCode", "nodeType": "MemberAccess", - "src": "4347:35:19", + "src": "4986:35:25", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "4323:59:19" + "src": "4962:59:25" }, { "expression": { - "id": 28751, + "id": 45477, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 28741, + "id": 45468, "name": "bytecode", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28735, - "src": "4392:8:19", + "referencedDeclaration": 45462, + "src": "5031:8:25", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -3693,12 +4390,12 @@ "rightHandSide": { "arguments": [ { - "id": 28744, + "id": 45471, "name": "bytecode", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28735, - "src": "4433:8:19", + "referencedDeclaration": 45462, + "src": "5072:8:25", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -3707,28 +4404,16 @@ { "arguments": [ { - "id": 28747, + "id": 45474, "name": "_withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28729, - "src": "4466:21:19", + "referencedDeclaration": 45456, + "src": "5105:21:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } - }, - { - "id": 28748, - "name": "defaultFeeNumerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28654, - "src": "4489:19:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } } ], "expression": { @@ -3736,39 +4421,35 @@ { "typeIdentifier": "t_address", "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" } ], "expression": { - "id": 28745, + "id": 45472, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, - "src": "4455:3:19", + "src": "5094:3:25", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 28746, + "id": 45473, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "4459:6:19", + "memberLocation": "5098:6:25", "memberName": "encode", "nodeType": "MemberAccess", - "src": "4455:10:19", + "src": "5094:10:25", "typeDescriptions": { "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 28749, + "id": 45475, "isConstant": false, "isLValue": false, "isPure": false, @@ -3777,7 +4458,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4455:54:19", + "src": "5094:33:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", @@ -3797,32 +4478,32 @@ } ], "expression": { - "id": 28742, + "id": 45469, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, - "src": "4403:3:19", + "src": "5042:3:25", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 28743, + "id": 45470, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "4407:12:19", + "memberLocation": "5046:12:25", "memberName": "encodePacked", "nodeType": "MemberAccess", - "src": "4403:16:19", + "src": "5042:16:25", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 28750, + "id": 45476, "isConstant": false, "isLValue": false, "isPure": false, @@ -3831,37 +4512,37 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4403:116:19", + "src": "5042:95:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "src": "4392:127:19", + "src": "5031:106:25", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 28752, + "id": 45478, "nodeType": "ExpressionStatement", - "src": "4392:127:19" + "src": "5031:106:25" }, { "assignments": [ - 28754 + 45480 ], "declarations": [ { "constant": false, - "id": 28754, + "id": 45480, "mutability": "mutable", "name": "withdrawalCredentialBytes", - "nameLocation": "4537:25:19", + "nameLocation": "5155:25:25", "nodeType": "VariableDeclaration", - "scope": 28797, - "src": "4529:33:19", + "scope": 45523, + "src": "5147:33:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3869,10 +4550,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 28753, + "id": 45479, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4529:7:19", + "src": "5147:7:25", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3881,7 +4562,7 @@ "visibility": "internal" } ], - "id": 28765, + "id": 45491, "initialValue": { "arguments": [ { @@ -3889,12 +4570,12 @@ { "arguments": [ { - "id": 28761, + "id": 45487, "name": "_withdrawalCredential", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28729, - "src": "4602:21:19", + "referencedDeclaration": 45456, + "src": "5220:21:25", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3908,26 +4589,26 @@ "typeString": "address" } ], - "id": 28760, + "id": 45486, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4594:7:19", + "src": "5212:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)" }, "typeName": { - "id": 28759, + "id": 45485, "name": "uint160", "nodeType": "ElementaryTypeName", - "src": "4594:7:19", + "src": "5212:7:25", "typeDescriptions": {} } }, - "id": 28762, + "id": 45488, "isConstant": false, "isLValue": false, "isPure": false, @@ -3936,7 +4617,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4594:30:19", + "src": "5212:30:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint160", @@ -3951,26 +4632,26 @@ "typeString": "uint160" } ], - "id": 28758, + "id": 45484, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4586:7:19", + "src": "5204:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 28757, + "id": 45483, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4586:7:19", + "src": "5204:7:25", "typeDescriptions": {} } }, - "id": 28763, + "id": 45489, "isConstant": false, "isLValue": false, "isPure": false, @@ -3979,7 +4660,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4586:39:19", + "src": "5204:39:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -3994,26 +4675,26 @@ "typeString": "uint256" } ], - "id": 28756, + "id": 45482, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4565:7:19", + "src": "5183:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes32_$", "typeString": "type(bytes32)" }, "typeName": { - "id": 28755, + "id": 45481, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4565:7:19", + "src": "5183:7:25", "typeDescriptions": {} } }, - "id": 28764, + "id": 45490, "isConstant": false, "isLValue": false, "isPure": false, @@ -4022,7 +4703,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4565:70:19", + "src": "5183:70:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -4030,22 +4711,22 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "4529:106:19" + "src": "5147:106:25" }, { "assignments": [ - 28767 + 45493 ], "declarations": [ { "constant": false, - "id": 28767, + "id": 45493, "mutability": "mutable", "name": "hash", - "nameLocation": "4653:4:19", + "nameLocation": "5271:4:25", "nodeType": "VariableDeclaration", - "scope": 28797, - "src": "4645:12:19", + "scope": 45523, + "src": "5263:12:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4053,10 +4734,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 28766, + "id": 45492, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4645:7:19", + "src": "5263:7:25", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4065,7 +4746,7 @@ "visibility": "internal" } ], - "id": 28785, + "id": 45511, "initialValue": { "arguments": [ { @@ -4074,14 +4755,14 @@ "arguments": [ { "hexValue": "30786666", - "id": 28773, + "id": 45499, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4724:4:19", + "src": "5342:4:25", "typeDescriptions": { "typeIdentifier": "t_rational_255_by_1", "typeString": "int_const 255" @@ -4096,26 +4777,26 @@ "typeString": "int_const 255" } ], - "id": 28772, + "id": 45498, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4717:6:19", + "src": "5335:6:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)" }, "typeName": { - "id": 28771, + "id": 45497, "name": "bytes1", "nodeType": "ElementaryTypeName", - "src": "4717:6:19", + "src": "5335:6:25", "typeDescriptions": {} } }, - "id": 28774, + "id": 45500, "isConstant": false, "isLValue": false, "isPure": true, @@ -4124,7 +4805,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4717:12:19", + "src": "5335:12:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes1", @@ -4134,14 +4815,14 @@ { "arguments": [ { - "id": 28777, + "id": 45503, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "4755:4:19", + "src": "5373:4:25", "typeDescriptions": { - "typeIdentifier": "t_contract$_FeeRewardsManager_$28868", + "typeIdentifier": "t_contract$_FeeRewardsManager_$45603", "typeString": "contract FeeRewardsManager" } } @@ -4149,30 +4830,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_FeeRewardsManager_$28868", + "typeIdentifier": "t_contract$_FeeRewardsManager_$45603", "typeString": "contract FeeRewardsManager" } ], - "id": 28776, + "id": 45502, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4747:7:19", + "src": "5365:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 28775, + "id": 45501, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4747:7:19", + "src": "5365:7:25", "typeDescriptions": {} } }, - "id": 28778, + "id": 45504, "isConstant": false, "isLValue": false, "isPure": false, @@ -4181,7 +4862,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4747:13:19", + "src": "5365:13:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -4189,12 +4870,12 @@ } }, { - "id": 28779, + "id": 45505, "name": "withdrawalCredentialBytes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28754, - "src": "4778:25:19", + "referencedDeclaration": 45480, + "src": "5396:25:25", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4203,12 +4884,12 @@ { "arguments": [ { - "id": 28781, + "id": 45507, "name": "bytecode", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28735, - "src": "4831:8:19", + "referencedDeclaration": 45462, + "src": "5449:8:25", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -4222,18 +4903,18 @@ "typeString": "bytes memory" } ], - "id": 28780, + "id": 45506, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -8, - "src": "4821:9:19", + "src": "5439:9:25", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, - "id": 28782, + "id": 45508, "isConstant": false, "isLValue": false, "isPure": false, @@ -4242,7 +4923,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4821:19:19", + "src": "5439:19:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -4270,32 +4951,32 @@ } ], "expression": { - "id": 28769, + "id": 45495, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, - "src": "4683:3:19", + "src": "5301:3:25", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 28770, + "id": 45496, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "4687:12:19", + "memberLocation": "5305:12:25", "memberName": "encodePacked", "nodeType": "MemberAccess", - "src": "4683:16:19", + "src": "5301:16:25", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 28783, + "id": 45509, "isConstant": false, "isLValue": false, "isPure": false, @@ -4304,7 +4985,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4683:171:19", + "src": "5301:171:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", @@ -4319,18 +5000,18 @@ "typeString": "bytes memory" } ], - "id": 28768, + "id": 45494, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -8, - "src": "4660:9:19", + "src": "5278:9:25", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, - "id": 28784, + "id": 45510, "isConstant": false, "isLValue": false, "isPure": false, @@ -4339,7 +5020,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4660:204:19", + "src": "5278:204:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -4347,7 +5028,7 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "4645:219:19" + "src": "5263:219:25" }, { "expression": { @@ -4357,12 +5038,12 @@ { "arguments": [ { - "id": 28792, + "id": 45518, "name": "hash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28767, - "src": "4902:4:19", + "referencedDeclaration": 45493, + "src": "5520:4:25", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4376,26 +5057,26 @@ "typeString": "bytes32" } ], - "id": 28791, + "id": 45517, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4897:4:19", + "src": "5515:4:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 28790, + "id": 45516, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4897:4:19", + "src": "5515:4:25", "typeDescriptions": {} } }, - "id": 28793, + "id": 45519, "isConstant": false, "isLValue": false, "isPure": false, @@ -4404,7 +5085,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4897:10:19", + "src": "5515:10:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -4419,26 +5100,26 @@ "typeString": "uint256" } ], - "id": 28789, + "id": 45515, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4889:7:19", + "src": "5507:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)" }, "typeName": { - "id": 28788, + "id": 45514, "name": "uint160", "nodeType": "ElementaryTypeName", - "src": "4889:7:19", + "src": "5507:7:25", "typeDescriptions": {} } }, - "id": 28794, + "id": 45520, "isConstant": false, "isLValue": false, "isPure": false, @@ -4447,7 +5128,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4889:19:19", + "src": "5507:19:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint160", @@ -4462,26 +5143,26 @@ "typeString": "uint160" } ], - "id": 28787, + "id": 45513, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4881:7:19", + "src": "5499:7:25", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 28786, + "id": 45512, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4881:7:19", + "src": "5499:7:25", "typeDescriptions": {} } }, - "id": 28795, + "id": 45521, "isConstant": false, "isLValue": false, "isPure": false, @@ -4490,17 +5171,17 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4881:28:19", + "src": "5499:28:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 28733, - "id": 28796, + "functionReturnParameters": 45460, + "id": 45522, "nodeType": "Return", - "src": "4874:35:19" + "src": "5492:35:25" } ] }, @@ -4509,20 +5190,20 @@ "kind": "function", "modifiers": [], "name": "predictFeeContractAddress", - "nameLocation": "4212:25:19", + "nameLocation": "4851:25:25", "parameters": { - "id": 28730, + "id": 45457, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28729, + "id": 45456, "mutability": "mutable", "name": "_withdrawalCredential", - "nameLocation": "4255:21:19", + "nameLocation": "4894:21:25", "nodeType": "VariableDeclaration", - "scope": 28798, - "src": "4247:29:19", + "scope": 45524, + "src": "4886:29:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4530,10 +5211,10 @@ "typeString": "address" }, "typeName": { - "id": 28728, + "id": 45455, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4247:7:19", + "src": "4886:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4543,21 +5224,21 @@ "visibility": "internal" } ], - "src": "4237:45:19" + "src": "4876:45:25" }, "returnParameters": { - "id": 28733, + "id": 45460, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28732, + "id": 45459, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 28798, - "src": "4304:7:19", + "scope": 45524, + "src": "4943:7:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4565,10 +5246,10 @@ "typeString": "address" }, "typeName": { - "id": 28731, + "id": 45458, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4304:7:19", + "src": "4943:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4578,34 +5259,34 @@ "visibility": "internal" } ], - "src": "4303:9:19" + "src": "4942:9:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "view", "virtual": false, "visibility": "public" }, { - "id": 28815, + "id": 45541, "nodeType": "FunctionDefinition", - "src": "4922:188:19", + "src": "5540:188:25", "nodes": [], "body": { - "id": 28814, + "id": 45540, "nodeType": "Block", - "src": "5035:75:19", + "src": "5653:75:25", "nodes": [], "statements": [ { "expression": { "arguments": [ { - "id": 28811, + "id": 45537, "name": "_newFee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28802, - "src": "5095:7:19", + "referencedDeclaration": 45528, + "src": "5713:7:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -4622,12 +5303,12 @@ "expression": { "arguments": [ { - "id": 28808, + "id": 45534, "name": "_feeContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28800, - "src": "5062:12:19", + "referencedDeclaration": 45526, + "src": "5680:12:25", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4641,18 +5322,18 @@ "typeString": "address payable" } ], - "id": 28807, + "id": 45533, "name": "RewardsCollector", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28650, - "src": "5045:16:19", + "referencedDeclaration": 45350, + "src": "5663:16:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$28650_$", + "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$45350_$", "typeString": "type(contract RewardsCollector)" } }, - "id": 28809, + "id": 45535, "isConstant": false, "isLValue": false, "isPure": false, @@ -4661,29 +5342,29 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5045:30:19", + "src": "5663:30:25", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_RewardsCollector_$28650", + "typeIdentifier": "t_contract$_RewardsCollector_$45350", "typeString": "contract RewardsCollector" } }, - "id": 28810, + "id": 45536, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5076:18:19", + "memberLocation": "5694:18:25", "memberName": "changeFeeNumerator", "nodeType": "MemberAccess", - "referencedDeclaration": 28649, - "src": "5045:49:19", + "referencedDeclaration": 45349, + "src": "5663:49:25", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint32_$returns$__$", "typeString": "function (uint32) external" } }, - "id": 28812, + "id": 45538, "isConstant": false, "isLValue": false, "isPure": false, @@ -4692,16 +5373,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5045:58:19", + "src": "5663:58:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28813, + "id": 45539, "nodeType": "ExpressionStatement", - "src": "5045:58:19" + "src": "5663:58:25" } ] }, @@ -4710,37 +5391,37 @@ "kind": "function", "modifiers": [ { - "id": 28805, + "id": 45531, "kind": "modifierInvocation", "modifierName": { - "id": 28804, + "id": 45530, "name": "onlyOwner", "nameLocations": [ - "5025:9:19" + "5643:9:25" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 31, - "src": "5025:9:19" + "referencedDeclaration": 58, + "src": "5643:9:25" }, "nodeType": "ModifierInvocation", - "src": "5025:9:19" + "src": "5643:9:25" } ], "name": "changeFeeNumerator", - "nameLocation": "4931:18:19", + "nameLocation": "5549:18:25", "parameters": { - "id": 28803, + "id": 45529, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28800, + "id": 45526, "mutability": "mutable", "name": "_feeContract", - "nameLocation": "4975:12:19", + "nameLocation": "5593:12:25", "nodeType": "VariableDeclaration", - "scope": 28815, - "src": "4959:28:19", + "scope": 45541, + "src": "5577:28:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4748,10 +5429,10 @@ "typeString": "address payable" }, "typeName": { - "id": 28799, + "id": 45525, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4959:15:19", + "src": "5577:15:25", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -4762,13 +5443,13 @@ }, { "constant": false, - "id": 28802, + "id": 45528, "mutability": "mutable", "name": "_newFee", - "nameLocation": "5004:7:19", + "nameLocation": "5622:7:25", "nodeType": "VariableDeclaration", - "scope": 28815, - "src": "4997:14:19", + "scope": 45541, + "src": "5615:14:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4776,10 +5457,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28801, + "id": 45527, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "4997:6:19", + "src": "5615:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -4788,35 +5469,35 @@ "visibility": "internal" } ], - "src": "4949:68:19" + "src": "5567:68:25" }, "returnParameters": { - "id": 28806, + "id": 45532, "nodeType": "ParameterList", "parameters": [], - "src": "5035:0:19" + "src": "5653:0:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 28843, + "id": 45569, "nodeType": "FunctionDefinition", - "src": "5116:231:19", + "src": "5734:231:25", "nodes": [], "body": { - "id": 28842, + "id": 45568, "nodeType": "Block", - "src": "5207:140:19", + "src": "5825:140:25", "nodes": [], "statements": [ { "body": { - "id": 28840, + "id": 45566, "nodeType": "Block", - "src": "5266:75:19", + "src": "5884:75:25", "statements": [ { "expression": { @@ -4827,25 +5508,25 @@ "arguments": [ { "baseExpression": { - "id": 28833, + "id": 45559, "name": "feeAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28818, - "src": "5297:12:19", + "referencedDeclaration": 45544, + "src": "5915:12:25", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", "typeString": "address payable[] calldata" } }, - "id": 28835, + "id": 45561, "indexExpression": { - "id": 28834, + "id": 45560, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28822, - "src": "5310:1:19", + "referencedDeclaration": 45548, + "src": "5928:1:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -4856,7 +5537,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5297:15:19", + "src": "5915:15:25", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4870,18 +5551,18 @@ "typeString": "address payable" } ], - "id": 28832, + "id": 45558, "name": "RewardsCollector", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28650, - "src": "5280:16:19", + "referencedDeclaration": 45350, + "src": "5898:16:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$28650_$", + "typeIdentifier": "t_type$_t_contract$_RewardsCollector_$45350_$", "typeString": "type(contract RewardsCollector)" } }, - "id": 28836, + "id": 45562, "isConstant": false, "isLValue": false, "isPure": false, @@ -4890,29 +5571,29 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5280:33:19", + "src": "5898:33:25", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_RewardsCollector_$28650", + "typeIdentifier": "t_contract$_RewardsCollector_$45350", "typeString": "contract RewardsCollector" } }, - "id": 28837, + "id": 45563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5314:14:19", + "memberLocation": "5932:14:25", "memberName": "collectRewards", "nodeType": "MemberAccess", - "referencedDeclaration": 28610, - "src": "5280:48:19", + "referencedDeclaration": 45309, + "src": "5898:48:25", "typeDescriptions": { "typeIdentifier": "t_function_external_payable$__$returns$__$", "typeString": "function () payable external" } }, - "id": 28838, + "id": 45564, "isConstant": false, "isLValue": false, "isPure": false, @@ -4921,16 +5602,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5280:50:19", + "src": "5898:50:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28839, + "id": 45565, "nodeType": "ExpressionStatement", - "src": "5280:50:19" + "src": "5898:50:25" } ] }, @@ -4939,18 +5620,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 28828, + "id": 45554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 28825, + "id": 45551, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28822, - "src": "5236:1:19", + "referencedDeclaration": 45548, + "src": "5854:1:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -4960,52 +5641,52 @@ "operator": "<", "rightExpression": { "expression": { - "id": 28826, + "id": 45552, "name": "feeAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28818, - "src": "5240:12:19", + "referencedDeclaration": 45544, + "src": "5858:12:25", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", "typeString": "address payable[] calldata" } }, - "id": 28827, + "id": 45553, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5253:6:19", + "memberLocation": "5871:6:25", "memberName": "length", "nodeType": "MemberAccess", - "src": "5240:19:19", + "src": "5858:19:25", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5236:23:19", + "src": "5854:23:25", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 28841, + "id": 45567, "initializationExpression": { "assignments": [ - 28822 + 45548 ], "declarations": [ { "constant": false, - "id": 28822, + "id": 45548, "mutability": "mutable", "name": "i", - "nameLocation": "5229:1:19", + "nameLocation": "5847:1:25", "nodeType": "VariableDeclaration", - "scope": 28841, - "src": "5222:8:19", + "scope": 45567, + "src": "5840:8:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5013,10 +5694,10 @@ "typeString": "uint32" }, "typeName": { - "id": 28821, + "id": 45547, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "5222:6:19", + "src": "5840:6:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -5025,17 +5706,17 @@ "visibility": "internal" } ], - "id": 28824, + "id": 45550, "initialValue": { "hexValue": "30", - "id": 28823, + "id": 45549, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5233:1:19", + "src": "5851:1:25", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -5043,11 +5724,11 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "5222:12:19" + "src": "5840:12:25" }, "loopExpression": { "expression": { - "id": 28830, + "id": 45556, "isConstant": false, "isLValue": false, "isPure": false, @@ -5055,14 +5736,14 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": true, - "src": "5261:3:19", + "src": "5879:3:25", "subExpression": { - "id": 28829, + "id": 45555, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28822, - "src": "5263:1:19", + "referencedDeclaration": 45548, + "src": "5881:1:25", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -5073,12 +5754,12 @@ "typeString": "uint32" } }, - "id": 28831, + "id": 45557, "nodeType": "ExpressionStatement", - "src": "5261:3:19" + "src": "5879:3:25" }, "nodeType": "ForStatement", - "src": "5217:124:19" + "src": "5835:124:25" } ] }, @@ -5087,20 +5768,20 @@ "kind": "function", "modifiers": [], "name": "batchCollectRewards", - "nameLocation": "5125:19:19", + "nameLocation": "5743:19:25", "parameters": { - "id": 28819, + "id": 45545, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28818, + "id": 45544, "mutability": "mutable", "name": "feeAddresses", - "nameLocation": "5181:12:19", + "nameLocation": "5799:12:25", "nodeType": "VariableDeclaration", - "scope": 28843, - "src": "5154:39:19", + "scope": 45569, + "src": "5772:39:25", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -5109,19 +5790,19 @@ }, "typeName": { "baseType": { - "id": 28816, + "id": 45542, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5154:15:19", + "src": "5772:15:25", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 28817, + "id": 45543, "nodeType": "ArrayTypeName", - "src": "5154:17:19", + "src": "5772:17:25", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", "typeString": "address payable[]" @@ -5130,28 +5811,28 @@ "visibility": "internal" } ], - "src": "5144:55:19" + "src": "5762:55:25" }, "returnParameters": { - "id": 28820, + "id": 45546, "nodeType": "ParameterList", "parameters": [], - "src": "5207:0:19" + "src": "5825:0:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 28847, + "id": 45573, "nodeType": "FunctionDefinition", - "src": "5353:29:19", + "src": "5971:29:25", "nodes": [], "body": { - "id": 28846, + "id": 45572, "nodeType": "Block", - "src": "5380:2:19", + "src": "5998:2:25", "nodes": [], "statements": [] }, @@ -5161,79 +5842,145 @@ "name": "", "nameLocation": "-1:-1:-1", "parameters": { - "id": 28844, + "id": 45570, "nodeType": "ParameterList", "parameters": [], - "src": "5360:2:19" + "src": "5978:2:25" }, "returnParameters": { - "id": 28845, + "id": 45571, "nodeType": "ParameterList", "parameters": [], - "src": "5380:0:19" + "src": "5998:0:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "payable", "virtual": false, "visibility": "external" }, { - "id": 28867, + "id": 45602, "nodeType": "FunctionDefinition", - "src": "5436:111:19", + "src": "6054:192:25", "nodes": [], "body": { - "id": 28866, + "id": 45601, "nodeType": "Block", - "src": "5485:62:19", + "src": "6103:143:25", "nodes": [], "statements": [ { - "expression": { + "assignments": [ + 45581, + null + ], + "declarations": [ + { + "constant": false, + "id": 45581, + "mutability": "mutable", + "name": "sent", + "nameLocation": "6119:4:25", + "nodeType": "VariableDeclaration", + "scope": 45601, + "src": "6114:9:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 45580, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6114:4:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 45595, + "initialValue": { "arguments": [ { + "hexValue": "", + "id": 45593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6178:2:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], "expression": { "arguments": [ { - "id": 28861, - "name": "this", + "id": 45584, + "name": "addr", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "5526:4:19", + "referencedDeclaration": 45575, + "src": "6137:4:25", "typeDescriptions": { - "typeIdentifier": "t_contract$_FeeRewardsManager_$28868", - "typeString": "contract FeeRewardsManager" + "typeIdentifier": "t_address", + "typeString": "address" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_FeeRewardsManager_$28868", - "typeString": "contract FeeRewardsManager" + "typeIdentifier": "t_address", + "typeString": "address" } ], - "id": 28860, + "id": 45583, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5518:7:19", + "src": "6129:8:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" }, "typeName": { - "id": 28859, + "id": 45582, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5518:7:19", + "src": "6129:8:25", + "stateMutability": "payable", "typeDescriptions": {} } }, - "id": 28862, + "id": 45585, "isConstant": false, "isLValue": false, "isPure": false, @@ -5242,108 +5989,193 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5518:13:19", + "src": "6129:13:25", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 28863, + "id": 45586, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5532:7:19", - "memberName": "balance", + "memberLocation": "6143:4:25", + "memberName": "call", "nodeType": "MemberAccess", - "src": "5518:21:19", + "src": "6129:18:25", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } + }, + "id": 45592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" ], - "expression": { - "arguments": [ - { - "id": 28856, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28849, - "src": "5503:4:19", + "nodeType": "FunctionCallOptions", + "options": [ + { + "expression": { + "arguments": [ + { + "id": 45589, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6163:4:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_FeeRewardsManager_$45603", + "typeString": "contract FeeRewardsManager" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_FeeRewardsManager_$45603", + "typeString": "contract FeeRewardsManager" + } + ], + "id": 45588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6155:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 45587, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6155:7:25", + "typeDescriptions": {} + } + }, + "id": 45590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6155:13:25", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 28855, + }, + "id": 45591, "isConstant": false, "isLValue": false, - "isPure": true, + "isPure": false, "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5495:8:19", + "memberLocation": "6169:7:25", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "6155:21:25", "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_payable_$", - "typeString": "type(address payable)" - }, - "typeName": { - "id": 28854, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5495:8:19", - "stateMutability": "payable", - "typeDescriptions": {} + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - }, - "id": 28857, + } + ], + "src": "6129:48:25", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 45594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6129:52:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6113:68:25" + }, + { + "expression": { + "arguments": [ + { + "id": 45597, + "name": "sent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45581, + "src": "6199:4:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4661696c656420746f20676574204574682066726f6d20636f6e7472616374", + "id": 45598, "isConstant": false, "isLValue": false, - "isPure": false, - "kind": "typeConversion", + "isPure": true, + "kind": "string", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5495:13:19", - "tryCall": false, + "nodeType": "Literal", + "src": "6205:33:25", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_stringliteral_8c9e1bc01c53198c13f02662e46b3f43779d18c92c24524f8d1ca6ac73abd841", + "typeString": "literal_string \"Failed to get Eth from contract\"" + }, + "value": "Failed to get Eth from contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c9e1bc01c53198c13f02662e46b3f43779d18c92c24524f8d1ca6ac73abd841", + "typeString": "literal_string \"Failed to get Eth from contract\"" } - }, - "id": 28858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "5509:8:19", - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "5495:22:19", + ], + "id": 45596, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6191:7:25", "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 28864, + "id": 45599, "isConstant": false, "isLValue": false, "isPure": false, @@ -5352,16 +6184,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5495:45:19", + "src": "6191:48:25", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 28865, + "id": 45600, "nodeType": "ExpressionStatement", - "src": "5495:45:19" + "src": "6191:48:25" } ] }, @@ -5370,37 +6202,37 @@ "kind": "function", "modifiers": [ { - "id": 28852, + "id": 45578, "kind": "modifierInvocation", "modifierName": { - "id": 28851, + "id": 45577, "name": "onlyOwner", "nameLocations": [ - "5475:9:19" + "6093:9:25" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 31, - "src": "5475:9:19" + "referencedDeclaration": 58, + "src": "6093:9:25" }, "nodeType": "ModifierInvocation", - "src": "5475:9:19" + "src": "6093:9:25" } ], "name": "getEth", - "nameLocation": "5445:6:19", + "nameLocation": "6063:6:25", "parameters": { - "id": 28850, + "id": 45576, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28849, + "id": 45575, "mutability": "mutable", "name": "addr", - "nameLocation": "5460:4:19", + "nameLocation": "6078:4:25", "nodeType": "VariableDeclaration", - "scope": 28867, - "src": "5452:12:19", + "scope": 45602, + "src": "6070:12:25", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5408,10 +6240,10 @@ "typeString": "address" }, "typeName": { - "id": 28848, + "id": 45574, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5452:7:19", + "src": "6070:7:25", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5421,15 +6253,15 @@ "visibility": "internal" } ], - "src": "5451:14:19" + "src": "6069:14:25" }, "returnParameters": { - "id": 28853, + "id": 45579, "nodeType": "ParameterList", "parameters": [], - "src": "5485:0:19" + "src": "6103:0:25" }, - "scope": 28868, + "scope": 45603, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" @@ -5439,42 +6271,47 @@ "baseContracts": [ { "baseName": { - "id": 28651, - "name": "Ownable", + "id": 45351, + "name": "Ownable2Step", "nameLocations": [ - "2918:7:19" + "3219:12:25" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 112, - "src": "2918:7:19" + "referencedDeclaration": 233, + "src": "3219:12:25" }, - "id": 28652, + "id": 45352, "nodeType": "InheritanceSpecifier", - "src": "2918:7:19" + "src": "3219:12:25" } ], "canonicalName": "FeeRewardsManager", "contractDependencies": [ - 28650 + 45350 ], "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ - 28868, - 112, - 134 + 45603, + 233, + 147, + 263 ], "name": "FeeRewardsManager", - "nameLocation": "2897:17:19", - "scope": 28869, - "usedErrors": [], - "usedEvents": [ + "nameLocation": "3198:17:25", + "scope": 45604, + "usedErrors": [ 13, - 28670 + 18 + ], + "usedEvents": [ + 24, + 162, + 45381 ] } ], - "license": "BSD-3-Clause" + "license": "Apache License 2.0" }, - "id": 19 + "id": 25 } \ No newline at end of file From a38ed25c7b3f4e4ba6e1bdf29780ae9a67a410a8 Mon Sep 17 00:00:00 2001 From: Fynn Date: Thu, 7 Mar 2024 16:15:31 +0000 Subject: [PATCH 4/5] Add retry for `deploy_compiled_contract` --- eth_possim/contracts.py | 43 +++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/eth_possim/contracts.py b/eth_possim/contracts.py index a3dcd2a..a6724a8 100644 --- a/eth_possim/contracts.py +++ b/eth_possim/contracts.py @@ -6,10 +6,25 @@ import re import time from typing import List, Tuple +from web3.types import TxReceipt, HexStr logger = logging.getLogger(__name__) +def wait_for_transaction_receipt(w3: web3.Web3, signed_txn_hash: HexStr) -> TxReceipt: + for _ in range(1, 10): + try: + tx_receipt = w3.eth.wait_for_transaction_receipt(signed_txn_hash) + return tx_receipt + except ValueError as exc: + if exc.args[0]["message"] == "transaction indexing is in progress": + logger.info( + "Failed to get transaction receipt due to indexing, will retry" + ) + time.sleep(5) + continue + else: + raise def deploy_compiled_contract( cfg: dict, @@ -54,12 +69,9 @@ def deploy_compiled_contract( private_key=cfg["el"]["funder"]["private_key"], ) w3.eth.send_raw_transaction(signed_txn.rawTransaction) - tx_receipt = w3.eth.wait_for_transaction_receipt(signed_txn.hash) - - logger.info( - f"Contract from '{foundry_json_path}' was published at address '{tx_receipt['contractAddress']}' [block: {tx_receipt['blockNumber']}]" - ) + tx_receipt = wait_for_transaction_receipt(w3, signed_txn.hash) + logger.info(f"Contract from '{foundry_json_path}' was published at address '{tx_receipt['contractAddress']}' [block: {tx_receipt['blockNumber']}]") return tx_receipt["contractAddress"] @@ -105,21 +117,10 @@ def deploy_contract_onchain( private_key=cfg["el"]["funder"]["private_key"], ) w3.eth.send_raw_transaction(signed_txn.rawTransaction) - for _ in range(1, 10): - try: - tx_receipt = w3.eth.wait_for_transaction_receipt(signed_txn.hash) - except ValueError as exc: - if exc.args[0]["message"] == "transaction indexing is in progress": - logger.info( - "Failed to get transaction receipt due to indexing, will retry" - ) - time.sleep(5) - continue - else: - raise + tx_receipt = wait_for_transaction_receipt(w3, signed_txn.hash) - logger.info( - f"Contract from '{path}' was published at address '{tx_receipt['contractAddress']}' [block: {tx_receipt['blockNumber']}]" - ) + logger.info( + f"Contract from '{path}' was published at address '{tx_receipt['contractAddress']}' [block: {tx_receipt['blockNumber']}]" + ) - return tx_receipt["contractAddress"] + return tx_receipt["contractAddress"] From 7a5e97f75c01fcbfb76f5d16b7e36e4583338113 Mon Sep 17 00:00:00 2001 From: Maksym Kulish Date: Thu, 7 Mar 2024 19:17:14 +0200 Subject: [PATCH 5/5] Bump number of retries when deploying contract --- eth_possim/contracts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth_possim/contracts.py b/eth_possim/contracts.py index a6724a8..7f295be 100644 --- a/eth_possim/contracts.py +++ b/eth_possim/contracts.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) def wait_for_transaction_receipt(w3: web3.Web3, signed_txn_hash: HexStr) -> TxReceipt: - for _ in range(1, 10): + for _ in range(1, 100): try: tx_receipt = w3.eth.wait_for_transaction_receipt(signed_txn_hash) return tx_receipt