diff --git a/foundry.toml b/foundry.toml index b0aca45..aa364fc 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,11 +1,11 @@ # Full reference # https://book.getfoundry.sh/reference/config.html -[default] +[profile.default] solc_version = "0.8.13" optimizer = true optimizer_runs = 20000 gas_reports = ["*"] -[ci] +[profile.ci] verbosity = 4 fuzz_runs = 65536 diff --git a/src/shrines/SnapshotShrine.sol b/src/shrines/SnapshotShrine.sol index d214954..9f792be 100644 --- a/src/shrines/SnapshotShrine.sol +++ b/src/shrines/SnapshotShrine.sol @@ -1,8 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.8.11; -import {MerkleProof} from "openzeppelin-contracts/utils/cryptography/MerkleProof.sol"; - import {ERC20, SafeTransferLib} from "@omniprotocol/libraries/SafeTransferLib.sol"; import {ReentrancyGuard} from "@omniprotocol/mixins/ReentrancyGuard.sol"; import {Stewarded} from "@omniprotocol/mixins/Stewarded.sol"; @@ -46,12 +44,11 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { /// Structs /// ----------------------------------------------------------------------- - /// @param snapshotId The Merkle treesnapshotId + /// @param snapshotId The snapshotId /// @param token The ERC-20 token to be claimed /// @param champion The Champion address. If the Champion rights /// have been transferred, the tokens will be sent to its owner. - /// @param shares The share amount of the Champion - /// @param merkleProof The Merkle proof showing the Champion is part of this Shrine's Merkle tree + struct ClaimInfo { uint256 snapshotId; ERC20 token; @@ -59,10 +56,8 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { } /// @param metaShrine The shrine to claim from - /// @param snapshotId The Merkle treesnapshotId + /// @param snapshotId The snapshotId /// @param token The ERC-20 token to be claimed - /// @param shares The share amount of the Champion - /// @param merkleProof The Merkle proof showing the Champion is part of this Shrine's Merkle tree struct MetaShrineClaimInfo { SnapshotShrine metaShrine; uint256 snapshotId; @@ -106,7 +101,7 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { /// User actions /// ----------------------------------------------------------------------- - /// @notice Offer ERC-20 tokens to the MerkleShrine and distribute them to Champions proportional + /// @notice Offer ERC-20 tokens to the SnapshotShrine and distribute them to Champions proportional /// to their shares in the Shrine. Callable by anyone. /// @param token The ERC-20 token being offered to the Shrine /// @param amount The amount of tokens to offer @@ -121,7 +116,6 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { /// @notice A Champion or the owner of a Champion may call this to /// claim their share of the tokens offered to this Shrine. - /// Requires a Merkle proof to prove that the Champion is part of this Shrine's Merkle tree. /// Only callable by the champion (if the right was never transferred) or the owner /// (that the original champion transferred their rights to) /// @param claimInfo The info of the claim @@ -164,7 +158,7 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { /// @notice A variant of {claim} that combines multiple claims for the /// same Champion & snapshotId into a single call. /// @dev This is more efficient than {claimMultiple} since - /// it only checks Champion ownership & verifies Merkle proof once. + /// it only checks Champion ownership once. function claimMultipleTokensForChampion( address recipient, uint256 snapshot, @@ -208,7 +202,7 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { } } - /// @notice If this MerkleShrine is a Champion of another MerkleShrine (MetaShrine), + /// @notice If this SnapshotShrine is a Champion of another SnapshotShrine (MetaShrine), /// calling this can claim the tokens /// from the MetaShrine and distribute them to this Shrine's Champions. Callable by anyone. /// @param claimInfo The info of the claim @@ -254,8 +248,7 @@ contract SnapshotShrine is Stewarded, ReentrancyGuard { /// ----------------------------------------------------------------------- /// @notice Computes the amount of a particular ERC-20 token claimable by a Champion from - /// a particular snapshotId of the Merkle tree. - /// @param snapshot The Merkle treesnapshotId + /// @param snapshot The snapshotId /// @param token The ERC-20 token to be claimed /// @param champion The Champion address /// @param shares The share amount of the Champion