Contract 0x741eFf3e4FD6bf088C55F88A14c7f32d43418e37 1

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xb774df1245d41b6b0e78346f6a4f50c4d1bc3d714f396e8426b5b79ec0f72692Follow With Sig ...434794082023-06-03 11:41:143 days 10 hrs ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.032984220389 147.747653447
0xddb6b957b519b6705d5c13079a6d2cbb07366f27c3a31d8b3eca9b29c72d9893Ranked Settle434793982023-06-03 11:40:523 days 10 hrs ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.066488895966 152.617181289
0xa91f265167db51846ad12a3433fa754821b859fc1ada748fe890e50607753d90Follow With Sig ...433419392023-05-30 21:04:597 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.009422705635 169.226587795
0x7ee795314336b14b2f0e9ad26f0b538dad11340bd272412c8917c6e9795cbbe7Follow With Sig ...433419242023-05-30 21:04:277 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.008279916095 148.702718975
0x7410d7e4741f8eb27a51509d023c6a519072355f2232e2f316e88c6a0214fc76Follow With Sig ...433419042023-05-30 21:03:457 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.032966655492 147.66897424
0xb7e5f0a7f2690e63e3b3f1ba973d1d01ef39bda8387fdee5763740cdc4f05f1dRanked Settle433418932023-05-30 21:03:217 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.042907023709 153.148575166
0xf91d777faf6019ce59efbcfce483c38d8b2a8ebe59d904a3bd9cdc2dcfac8c1cRanked Settle433418782023-05-30 21:02:497 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.025724535693 154.048360344
0x8b035c9309234203ebb9beb19cb6d1c522b9866e790d92f8ee16a3184515caccFollow With Sig ...433418652023-05-30 21:02:217 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.034669299762 155.304050721
0x7c3912aa5fbdb998307ff5981eb531155da4456bc5cbaa6b3cfef58ee5e93eedRanked Settle433418562023-05-30 21:02:037 days 1 hr ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.0436763957 155.901381743
0xff7e1aa4a0abc8989b600f597a7fd4eb531e0406f69c196fcd4eec61c2c7fe0eRanked Settle433045662023-05-29 22:22:127 days 23 hrs ago0x7f0408bc8dfe90c09072d8ccf3a1c544737bcdb6 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.092431087911 144.573117681
0x09547c84eef79ca2fb553b21291214bd776a00c74d2b44df4bff09d9fcb2a00eDeposit432913272023-05-29 14:22:168 days 7 hrs ago0x845a03aa4ec79df7f8a1d2fc013fd2f9034422c2 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.028764242375 179.827091217
0xb4f1dfffe79072dcbfe7cc3fe7cba2bfa7a76918bf5c6902254dc56975f4b1a9Deposit432614632023-05-28 20:01:549 days 2 hrs ago0x7f0408bc8dfe90c09072d8ccf3a1c544737bcdb6 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.02522819926 155.382412514
0x9b8d65787ec1e405c5b4d330fc611bdd4e2a49931fbfc25ebac90834f9fe810aCollect With Sig...432566152023-05-28 17:05:179 days 5 hrs ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.030111797133 141.106937463
0xcd5af1805d3ada4e29525ffc7022e5c6a1c9cf2fb90e6b3f55edc6f4fd2f0d59Follow With Sig ...432566052023-05-28 17:04:559 days 5 hrs ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.036555916856 161.726798313
0x6925554bffde8f8525ae6c385b08308544bfd2cbacd08113e79d863dc927c0dbMirror With Sig ...432565982023-05-28 17:04:419 days 5 hrs ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.019249401966 158.457375427
0xd8f40f12ecac9fa2a97f1bc0d138bafa9a1cec8cfe4b30d97376c4dd1d07e7baRanked Settle432565862023-05-28 17:04:159 days 5 hrs ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.039556631039 137.699878647
0xd07dfca7e960ba5f823e8bb73225b4348396470c57ab73d40b9b9fcaec31397eFollow With Sig ...431858342023-05-26 21:51:2611 days 14 mins ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.071725674075 145.617259266
0xd9ba2817f6e1f78e4388e3b23b34654c089ab12c4c777ffe81481db3b597b96aMirror With Sig ...431858242023-05-26 21:51:0611 days 15 mins ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.039129633269 140.989396942
0xf3c4bf2a7e837fc5e681997a99bc1c23f6307c6da33fa52d6d7de238e200162dRanked Settle431858142023-05-26 21:50:4411 days 15 mins ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.096973624817 151.824938654
0xfec9a7e7877fe1f1344ab83ffe9f09529b22a57e31738f69f89ad810041edf09Collect With Sig...431354772023-05-25 15:27:2412 days 6 hrs ago0xdc4471ee9dfca619ac5465fde7cf2634253a9dc6 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.053481894691 250.635680538
0x4a6cfdc4a841e80aaf192929f01a307e72237f1ace5f61b8a9255cdcf0372cbaFollow With Sig ...431319712023-05-25 13:20:0912 days 8 hrs ago0xeb2333935090de019e540afac0fa1826fd85650b IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.106370320409 215.762611962
0xe0c9ab0f53b4a0480081acd475857283f9229ab0529a786ce1b197d65bd8d121Ranked Settle431319672023-05-25 13:19:5912 days 8 hrs ago0xeb2333935090de019e540afac0fa1826fd85650b IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.264513318823 196.192877054
0x1bea369257fa3a3f7ee3e81e2e5bef60e04c5d600b7fca2905735dc6879620e1Close430169122023-05-22 14:58:2315 days 7 hrs ago0x7f0408bc8dfe90c09072d8ccf3a1c544737bcdb6 IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.008367685014159.357158089
0xc1633a9e39d4e608e86d99c6db3e5f1c52388d5bd911b298933d60e49bd685a7Mirror With Sig ...430097752023-05-22 10:10:4815 days 11 hrs ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.027410239455 225.658111237
0xdbc4a8f5599ccf7c95c04d71d183126c5706f2185ea804813309e467252fdf0fRanked Settle430097592023-05-22 10:10:1415 days 11 hrs ago0x45da50b5e5552ffd010e309d296c88e393d227ab IN  0x741eff3e4fd6bf088c55f88a14c7f32d43418e370 MATIC0.063623402574 231.395692294
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EscrowV3

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 7 : DataTypes.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

/**
 * @title DataTypes
 * @author Lens Protocol
 *
 * @notice A standard library of data types used throughout the Lens Protocol.
 */
library DataTypes {
    /**
     * @notice An enum containing the different states the protocol can be in, limiting certain actions.
     *
     * @param Unpaused The fully unpaused state.
     * @param PublishingPaused The state where only publication creation functions are paused.
     * @param Paused The fully paused state.
     */
    enum ProtocolState {
        Unpaused,
        PublishingPaused,
        Paused
    }

    /**
     * @notice An enum specifically used in a helper function to easily retrieve the publication type for integrations.
     *
     * @param Post A standard post, having a URI, a collect module but no pointer to another publication.
     * @param Comment A comment, having a URI, a collect module and a pointer to another publication.
     * @param Mirror A mirror, having a pointer to another publication, but no URI or collect module.
     * @param Nonexistent An indicator showing the queried publication does not exist.
     */
    enum PubType {
        Post,
        Comment,
        Mirror,
        Nonexistent
    }

    /**
     * @notice A struct containing the necessary information to reconstruct an EIP-712 typed data signature.
     *
     * @param v The signature's recovery parameter.
     * @param r The signature's r parameter.
     * @param s The signature's s parameter
     * @param deadline The signature's deadline
     */
    struct EIP712Signature {
        uint8 v;
        bytes32 r;
        bytes32 s;
        uint256 deadline;
    }

    /**
     * @notice A struct containing profile data.
     *
     * @param pubCount The number of publications made to this profile.
     * @param followModule The address of the current follow module in use by this profile, can be empty.
     * @param followNFT The address of the followNFT associated with this profile, can be empty..
     * @param handle The profile's associated handle.
     * @param imageURI The URI to be used for the profile's image.
     * @param followNFTURI The URI to be used for the follow NFT.
     */
    struct ProfileStruct {
        uint256 pubCount;
        address followModule;
        address followNFT;
        string handle;
        string imageURI;
        string followNFTURI;
    }

    /**
     * @notice A struct containing data associated with each new publication.
     *
     * @param profileIdPointed The profile token ID this publication points to, for mirrors and comments.
     * @param pubIdPointed The publication ID this publication points to, for mirrors and comments.
     * @param contentURI The URI associated with this publication.
     * @param referenceModule The address of the current reference module in use by this publication, can be empty.
     * @param collectModule The address of the collect module associated with this publication, this exists for all publication.
     * @param collectNFT The address of the collectNFT associated with this publication, if any.
     */
    struct PublicationStruct {
        uint256 profileIdPointed;
        uint256 pubIdPointed;
        string contentURI;
        address referenceModule;
        address collectModule;
        address collectNFT;
    }

    /**
     * @notice A struct containing the parameters required for the `createProfile()` function.
     *
     * @param to The address receiving the profile.
     * @param handle The handle to set for the profile, must be unique and non-empty.
     * @param imageURI The URI to set for the profile image.
     * @param followModule The follow module to use, can be the zero address.
     * @param followModuleInitData The follow module initialization data, if any.
     * @param followNFTURI The URI to use for the follow NFT.
     */
    struct CreateProfileData {
        address to;
        string handle;
        string imageURI;
        address followModule;
        bytes followModuleInitData;
        string followNFTURI;
    }

    /**
     * @notice A struct containing the parameters required for the `setDefaultProfileWithSig()` function. Parameters are
     * the same as the regular `setDefaultProfile()` function, with an added EIP712Signature.
     *
     * @param wallet The address of the wallet setting the default profile.
     * @param profileId The token ID of the profile which will be set as default, or zero.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct SetDefaultProfileWithSigData {
        address wallet;
        uint256 profileId;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `setFollowModuleWithSig()` function. Parameters are
     * the same as the regular `setFollowModule()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile to change the followModule for.
     * @param followModule The followModule to set for the given profile, must be whitelisted.
     * @param followModuleInitData The data to be passed to the followModule for initialization.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct SetFollowModuleWithSigData {
        uint256 profileId;
        address followModule;
        bytes followModuleInitData;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `setDispatcherWithSig()` function. Parameters are the same
     * as the regular `setDispatcher()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile to set the dispatcher for.
     * @param dispatcher The dispatcher address to set for the profile.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct SetDispatcherWithSigData {
        uint256 profileId;
        address dispatcher;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `setProfileImageURIWithSig()` function. Parameters are the same
     * as the regular `setProfileImageURI()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile to set the URI for.
     * @param imageURI The URI to set for the given profile image.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct SetProfileImageURIWithSigData {
        uint256 profileId;
        string imageURI;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `setFollowNFTURIWithSig()` function. Parameters are the same
     * as the regular `setFollowNFTURI()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile for which to set the followNFT URI.
     * @param followNFTURI The follow NFT URI to set.
     * @param sig The EIP712Signature struct containing the followNFT's associated profile owner's signature.
     */
    struct SetFollowNFTURIWithSigData {
        uint256 profileId;
        string followNFTURI;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `post()` function.
     *
     * @param profileId The token ID of the profile to publish to.
     * @param contentURI The URI to set for this new publication.
     * @param collectModule The collect module to set for this new publication.
     * @param collectModuleInitData The data to pass to the collect module's initialization.
     * @param referenceModule The reference module to set for the given publication, must be whitelisted.
     * @param referenceModuleInitData The data to be passed to the reference module for initialization.
     */
    struct PostData {
        uint256 profileId;
        string contentURI;
        address collectModule;
        bytes collectModuleInitData;
        address referenceModule;
        bytes referenceModuleInitData;
    }

    /**
     * @notice A struct containing the parameters required for the `postWithSig()` function. Parameters are the same as
     * the regular `post()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile to publish to.
     * @param contentURI The URI to set for this new publication.
     * @param collectModule The collectModule to set for this new publication.
     * @param collectModuleInitData The data to pass to the collectModule's initialization.
     * @param referenceModule The reference module to set for the given publication, must be whitelisted.
     * @param referenceModuleInitData The data to be passed to the reference module for initialization.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct PostWithSigData {
        uint256 profileId;
        string contentURI;
        address collectModule;
        bytes collectModuleInitData;
        address referenceModule;
        bytes referenceModuleInitData;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `comment()` function.
     *
     * @param profileId The token ID of the profile to publish to.
     * @param contentURI The URI to set for this new publication.
     * @param profileIdPointed The profile token ID to point the comment to.
     * @param pubIdPointed The publication ID to point the comment to.
     * @param referenceModuleData The data passed to the reference module.
     * @param collectModule The collect module to set for this new publication.
     * @param collectModuleInitData The data to pass to the collect module's initialization.
     * @param referenceModule The reference module to set for the given publication, must be whitelisted.
     * @param referenceModuleInitData The data to be passed to the reference module for initialization.
     */
    struct CommentData {
        uint256 profileId;
        string contentURI;
        uint256 profileIdPointed;
        uint256 pubIdPointed;
        bytes referenceModuleData;
        address collectModule;
        bytes collectModuleInitData;
        address referenceModule;
        bytes referenceModuleInitData;
    }

    /**
     * @notice A struct containing the parameters required for the `commentWithSig()` function. Parameters are the same as
     * the regular `comment()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile to publish to.
     * @param contentURI The URI to set for this new publication.
     * @param profileIdPointed The profile token ID to point the comment to.
     * @param pubIdPointed The publication ID to point the comment to.
     * @param referenceModuleData The data passed to the reference module.
     * @param collectModule The collectModule to set for this new publication.
     * @param collectModuleInitData The data to pass to the collectModule's initialization.
     * @param referenceModule The reference module to set for the given publication, must be whitelisted.
     * @param referenceModuleInitData The data to be passed to the reference module for initialization.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct CommentWithSigData {
        uint256 profileId;
        string contentURI;
        uint256 profileIdPointed;
        uint256 pubIdPointed;
        bytes referenceModuleData;
        address collectModule;
        bytes collectModuleInitData;
        address referenceModule;
        bytes referenceModuleInitData;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `mirror()` function.
     *
     * @param profileId The token ID of the profile to publish to.
     * @param profileIdPointed The profile token ID to point the mirror to.
     * @param pubIdPointed The publication ID to point the mirror to.
     * @param referenceModuleData The data passed to the reference module.
     * @param referenceModule The reference module to set for the given publication, must be whitelisted.
     * @param referenceModuleInitData The data to be passed to the reference module for initialization.
     */
    struct MirrorData {
        uint256 profileId;
        uint256 profileIdPointed;
        uint256 pubIdPointed;
        bytes referenceModuleData;
        address referenceModule;
        bytes referenceModuleInitData;
    }

    /**
     * @notice A struct containing the parameters required for the `mirrorWithSig()` function. Parameters are the same as
     * the regular `mirror()` function, with an added EIP712Signature.
     *
     * @param profileId The token ID of the profile to publish to.
     * @param profileIdPointed The profile token ID to point the mirror to.
     * @param pubIdPointed The publication ID to point the mirror to.
     * @param referenceModuleData The data passed to the reference module.
     * @param referenceModule The reference module to set for the given publication, must be whitelisted.
     * @param referenceModuleInitData The data to be passed to the reference module for initialization.
     * @param sig The EIP712Signature struct containing the profile owner's signature.
     */
    struct MirrorWithSigData {
        uint256 profileId;
        uint256 profileIdPointed;
        uint256 pubIdPointed;
        bytes referenceModuleData;
        address referenceModule;
        bytes referenceModuleInitData;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `followWithSig()` function. Parameters are the same
     * as the regular `follow()` function, with the follower's (signer) address and an EIP712Signature added.
     *
     * @param follower The follower which is the message signer.
     * @param profileIds The array of token IDs of the profiles to follow.
     * @param datas The array of arbitrary data to pass to the followModules if needed.
     * @param sig The EIP712Signature struct containing the follower's signature.
     */
    struct FollowWithSigData {
        address follower;
        uint256[] profileIds;
        bytes[] datas;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `collectWithSig()` function. Parameters are the same as
     * the regular `collect()` function, with the collector's (signer) address and an EIP712Signature added.
     *
     * @param collector The collector which is the message signer.
     * @param profileId The token ID of the profile that published the publication to collect.
     * @param pubId The publication to collect's publication ID.
     * @param data The arbitrary data to pass to the collectModule if needed.
     * @param sig The EIP712Signature struct containing the collector's signature.
     */
    struct CollectWithSigData {
        address collector;
        uint256 profileId;
        uint256 pubId;
        bytes data;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `setProfileMetadataWithSig()` function.
     *
     * @param profileId The profile ID for which to set the metadata.
     * @param metadata The metadata string to set for the profile and user.
     * @param sig The EIP712Signature struct containing the user's signature.
     */
    struct SetProfileMetadataWithSigData {
        uint256 profileId;
        string metadata;
        EIP712Signature sig;
    }

    /**
     * @notice A struct containing the parameters required for the `toggleFollowWithSig()` function.
     *
     * @param follower The follower which is the message signer.
     * @param profileIds The token ID array of the profiles.
     * @param enables The array of booleans to enable/disable follows.
     * @param sig The EIP712Signature struct containing the follower's signature.
     */
    struct ToggleFollowWithSigData {
        address follower;
        uint256[] profileIds;
        bool[] enables;
        EIP712Signature sig;
    }
}

File 2 of 7 : IMadSBT.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @notice IMadSBT interface
 */
interface IMadSBT {
  struct CollectionData {
    uint256 totalSupply; // total tokens minted for a given id
    uint256 availableSupply; // total tokens available for a given id
    uint256 totalRedeemed; // total tokens redeemed
    uint256 creatorId; // lens profile id, also the IDA index
    string uri; // metadata uri
  }

  enum Action {
    CREATE_COLLECTION,
    CREATE_BOUNTY,
    ACCEPTED_BID,
    MINTED_COLLECTION,
    COLLECTED_BID_POST
  }

  event CreateCollection(address creator, uint256 profileId, uint256 collectionId, uint256 availableSupply);
  event UpdateRewardUnits(uint256 collectionId, address subscriber, uint128 newUnits);

  function createCollection(address, uint256, uint256, string memory) external returns (uint256);

  function mint(address, uint256, uint256) external returns (bool);
  function burn(uint256) external;
  function handleRewardsUpdate(address, uint256, uint256, Action) external;
  function redeemInterimRewardUnits(uint256) external;

  function creatorProfileId(uint256) external view returns (uint256);
  function contractURI() external view returns (string memory);
  function hasMinted(address, uint256) external view returns (bool);
  function rewardUnitsOf(address, uint256) external view returns (uint128);


  // direct mapping to struct CollectionData
  function collectionData(uint256) external view returns (
    uint256,
    uint256,
    uint256,
    uint256,
    string memory
  );

  function tokenToCollection(uint256) external view returns (uint256);
  function actionToRewardUnits(Action) external view returns (uint128);
}

File 3 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev 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.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 5 of 7 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 6 of 7 : EscrowV3.sol
// SPDX-License-Identifier: MIT
/**
 * ______   ______   ______   ______   ______   __     __
 * /\  ___\ /\  ___\ /\  ___\ /\  == \ /\  __ \ /\ \  _ \ \
 * \ \  __\ \ \___  \\ \ \____\ \  __< \ \ \/\ \\ \ \/ ".\ \
 *  \ \_____\\/\_____\\ \_____\\ \_\ \_\\ \_____\\ \__/".~\_\
 *   \/_____/ \/_____/ \/_____/ \/_/ /_/ \/_____/ \/_/   \/_/
 */
pragma solidity ^0.8.10;

import "openzeppelin/token/ERC20/IERC20.sol";
import "openzeppelin/access/Ownable.sol";
import "madfi-protocol/interfaces/IMadSBT.sol";
import "./extensions/LensExtension.sol";

contract EscrowV3 is Ownable, LensExtension {
    uint256 public protocolFee; // basis points
    mapping(address => uint256) public feesEarned;

    uint256 internal count;
    mapping(uint256 => Bounty) public bounties;

    struct Bounty {
        uint256 amount;
        address sponsor;
        address token;
    }

    // MADSBT POINTS
    IMadSBT madSBT;
    uint collectionId;
    uint profileId;

    // EVENTS
    event BountyCreated(uint256 bountyId, Bounty bounty);
    event BountyPayments(
        uint256 bountyId,
        address[] recipients,
        uint256 amount
    );
    event BountyClosed(uint256 bountyId);
    event SetProtocolFee(uint256 protocolFee);

    // ERRORS
    error NotArbiter(address sender);
    error InvalidBidAmount(uint256 amount);
    error InvalidSplits(uint256 amount);

    // CONSTRUCTORS
    constructor(
        address _lensHub,
        uint256 _protocolFee,
        uint256 _startId
    ) Ownable() LensExtension(_lensHub) {
        protocolFee = _protocolFee;
        count = _startId;
    }

    // PUBLIC FUNCTIONS

    /**
     * @notice desposits tokens creating an open bounty
     * @param token token to deposit
     * @param amount amount of token to deposit
     */
    function deposit(
        address token,
        uint256 amount
    ) external returns (uint256 bountyId) {
        uint256 total = amount + calcFee(amount);
        Bounty memory newBounty = Bounty(total, _msgSender(), token);
        bounties[++count] = newBounty;

        IERC20(token).transferFrom(_msgSender(), address(this), total);

        madSBT.handleRewardsUpdate(
            _msgSender(),
            collectionId,
            profileId,
            IMadSBT.Action.CREATE_BOUNTY
        );

        emit BountyCreated(count, newBounty);
        return count;
    }

    /**
     * @notice disperse funds to recipeints and post to Lens
     * @param bountyId bounty to settle
     * @param recipients list of addresses to disperse to
     * @param splits list of split amounts to go to each recipient
     * @param posts PostWithSigData to post to Lens on recipients behalf
     */
    function rankedSettle(
        uint256 bountyId,
        address[] calldata recipients,
        uint256[] calldata splits,
        DataTypes.PostWithSigData[] calldata posts
    ) external {
        _rankedSettle(bountyId, recipients, splits);
        postWithSigBatch(posts);
    }

    function _rankedSettle(
        uint256 bountyId,
        address[] calldata recipients,
        uint256[] calldata splits
    ) internal {
        Bounty memory bounty = bounties[bountyId];
        if (_msgSender() != bounty.sponsor) {
            revert NotArbiter(_msgSender());
        }

        uint256 splitTotal;
        uint256 length = recipients.length;
        for (uint256 i = 0; i < length; ) {
            splitTotal += splits[i];
            unchecked {
                ++i;
            }
        }

        uint256 newFees = calcFee(splitTotal);
        uint256 total = newFees + splitTotal;
        if (total > bounty.amount) {
            revert InvalidSplits(total);
        }

        bounties[bountyId].amount -= total;
        feesEarned[bounty.token] += newFees;

        IERC20 token = IERC20(bounty.token);
        for (uint256 i = 0; i < length; ) {
            token.transfer(recipients[i], splits[i]);

            madSBT.handleRewardsUpdate(
                recipients[i],
                collectionId,
                profileId,
                IMadSBT.Action.ACCEPTED_BID
            );

            unchecked {
                ++i;
            }
        }

        emit BountyPayments(bountyId, recipients, splitTotal);
    }

    /**
     * @notice top up bounty with more tokens
     * @param bountyId bounty to top up
     * @param amount amount of tokens to add
     */
    function topUp(uint256 bountyId, uint256 amount) external {
        Bounty memory bounty = bounties[bountyId];
        uint256 total = amount + calcFee(amount);
        bounties[bountyId].amount += total;
        IERC20(bounty.token).transferFrom(_msgSender(), address(this), total);
    }

    /**
     * @notice can be called by owner or bounty creator to close bounty and refund
     * @param bountyId id of bounty to refund
     */
    function close(uint256 bountyId) external {
        if (_msgSender() != bounties[bountyId].sponsor) {
            revert NotArbiter(_msgSender());
        }
        address sponsor = bounties[bountyId].sponsor;
        uint256 amount = bounties[bountyId].amount;
        address token = bounties[bountyId].token;
        delete bounties[bountyId];
        IERC20(token).transfer(sponsor, amount);

        emit BountyClosed(bountyId);
    }

    /**
     * @notice calculates the fee to be paid on a token amount
     * @param amount token amount to calculate fee for
     */
    function calcFee(uint256 amount) public view returns (uint256) {
        return (amount * protocolFee) / 10_000;
    }

    // ADMIN FUNCTIONS

    /// @notice sets the protocol fee (in basis points). Close all outstanding bounties before calling
    function setProtocolFee(uint256 _protocolFee) external onlyOwner {
        protocolFee = _protocolFee;
        emit SetProtocolFee(_protocolFee);
    }

    /// @notice withdraws all accumulated fees
    function withdrawFees(address[] calldata _tokens) external onlyOwner {
        uint256 length = _tokens.length;
        for (uint256 i = 0; i < length; ) {
            uint256 contractBal = feesEarned[_tokens[i]];
            feesEarned[_tokens[i]] = 0;
            IERC20(_tokens[i]).transfer(owner(), contractBal);
            unchecked {
                ++i;
            }
        }
    }

    function setMadSBT(
        address _madSBT,
        uint _collectionId,
        uint _profileId
    ) external onlyOwner {
        madSBT = IMadSBT(_madSBT);
        collectionId = _collectionId;
        profileId = _profileId;
    }

    /// @notice fallback function to prevent accidental ether transfers
    receive() external payable {
        revert();
    }
}

File 7 of 7 : LensExtension.sol
// SPDX-License-Identifier: MIT

import "lens/libraries/DataTypes.sol";

pragma solidity ^0.8.10;

interface ILensHub {
    function postWithSig(DataTypes.PostWithSigData calldata vars) external returns (uint256);

    function mirrorWithSig(DataTypes.MirrorWithSigData calldata vars) external returns (uint256);

    function commentWithSig(DataTypes.CommentWithSigData calldata vars) external returns (uint256);

    function followWithSig(DataTypes.FollowWithSigData calldata vars) external returns (uint256);

    function collectWithSig(DataTypes.CollectWithSigData calldata vars) external returns (uint256);
}

contract LensExtension {
    ILensHub internal lensHub;

    constructor(address _lensHub) {
        lensHub = ILensHub(_lensHub);
    }

    function postWithSigBatch(DataTypes.PostWithSigData[] calldata data) public {
        uint256 length = data.length;
        for (uint256 i = 0; i < length;) {
            lensHub.postWithSig(data[i]);
            unchecked {
                ++i;
            }
        }
    }

    function mirrorWithSigBatch(DataTypes.MirrorWithSigData[] calldata data) public {
        uint256 length = data.length;
        for (uint256 i = 0; i < length;) {
            lensHub.mirrorWithSig(data[i]);
            unchecked {
                ++i;
            }
        }
    }

    function commentWithSigBatch(DataTypes.CommentWithSigData[] calldata data) public {
        uint256 length = data.length;
        for (uint256 i = 0; i < length;) {
            lensHub.commentWithSig(data[i]);
            unchecked {
                ++i;
            }
        }
    }

    function followWithSigBatch(DataTypes.FollowWithSigData[] calldata data) public {
        uint256 length = data.length;
        for (uint256 i = 0; i < length;) {
            lensHub.followWithSig(data[i]);
            unchecked {
                ++i;
            }
        }
    }

    function collectWithSigBatch(DataTypes.CollectWithSigData[] calldata data) public {
        uint256 length = data.length;
        for (uint256 i = 0; i < length;) {
            lensHub.collectWithSig(data[i]);
            unchecked {
                ++i;
            }
        }
    }
}

Settings
{
  "remappings": [
    "core/=lib/core/contracts/",
    "ds-test/=lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "lens/=lib/core/contracts/",
    "madfi-protocol-public/=lib/madfi-protocol-public/contracts/",
    "madfi-protocol/=lib/madfi-protocol-public/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_lensHub","type":"address"},{"internalType":"uint256","name":"_protocolFee","type":"uint256"},{"internalType":"uint256","name":"_startId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidBidAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidSplits","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"NotArbiter","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bountyId","type":"uint256"}],"name":"BountyClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bountyId","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"sponsor","type":"address"},{"internalType":"address","name":"token","type":"address"}],"indexed":false,"internalType":"struct EscrowV3.Bounty","name":"bounty","type":"tuple"}],"name":"BountyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bountyId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BountyPayments","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"SetProtocolFee","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bounties","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"sponsor","type":"address"},{"internalType":"address","name":"token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calcFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bountyId","type":"uint256"}],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.CollectWithSigData[]","name":"data","type":"tuple[]"}],"name":"collectWithSigBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.CommentWithSigData[]","name":"data","type":"tuple[]"}],"name":"commentWithSigBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"bountyId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feesEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"follower","type":"address"},{"internalType":"uint256[]","name":"profileIds","type":"uint256[]"},{"internalType":"bytes[]","name":"datas","type":"bytes[]"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.FollowWithSigData[]","name":"data","type":"tuple[]"}],"name":"followWithSigBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.MirrorWithSigData[]","name":"data","type":"tuple[]"}],"name":"mirrorWithSigBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.PostWithSigData[]","name":"data","type":"tuple[]"}],"name":"postWithSigBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"protocolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bountyId","type":"uint256"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"splits","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.PostWithSigData[]","name":"posts","type":"tuple[]"}],"name":"rankedSettle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_madSBT","type":"address"},{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_profileId","type":"uint256"}],"name":"setMadSBT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_protocolFee","type":"uint256"}],"name":"setProtocolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bountyId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"topUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620021c3380380620021c38339810160408190526200003491620000c0565b82620000403362000070565b600180546001600160a01b0319166001600160a01b03929092169190911790556002919091556004555062000105565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600060608486031215620000d657600080fd5b83516001600160a01b0381168114620000ee57600080fd5b602085015160409095015190969495509392505050565b6120ae80620001156000396000f3fe6080604052600436106101485760003560e01c8063787dce3d116100c0578063a697b8c711610074578063dc2f874411610059578063dc2f874414610379578063de643a7114610400578063f2fde38b1461042057600080fd5b8063a697b8c714610343578063b0e21e8a1461036357600080fd5b80639e3b7353116100a55780639e3b7353146102d6578063a42d9fa6146102f6578063a480f6501461031657600080fd5b8063787dce3d146102815780638da5cb5b146102a157600080fd5b8063307992de11610117578063714c6a2e116100fc578063714c6a2e1461022c578063715018a61461024c57806375dc7d8c1461026157600080fd5b8063307992de146101d957806347e7ef24146101f957600080fd5b80630aebeb4e1461015757806315b5311d1461017957806317dfa02a146101995780632003d949146101b957600080fd5b3661015257600080fd5b600080fd5b34801561016357600080fd5b50610177610172366004611542565b610440565b005b34801561018557600080fd5b506101776101943660046115a7565b6105fd565b3480156101a557600080fd5b506101776101b43660046115e9565b6106b9565b3480156101c557600080fd5b506101776101d43660046115a7565b6106d9565b3480156101e557600080fd5b506101776101f43660046116b6565b61078f565b34801561020557600080fd5b506102196102143660046116e9565b6107e5565b6040519081526020015b60405180910390f35b34801561023857600080fd5b506101776102473660046115a7565b610a8d565b34801561025857600080fd5b50610177610b43565b34801561026d57600080fd5b5061021961027c366004611542565b610b57565b34801561028d57600080fd5b5061017761029c366004611542565b610b7a565b3480156102ad57600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610223565b3480156102e257600080fd5b506101776102f13660046115a7565b610bbd565b34801561030257600080fd5b506101776103113660046115a7565b610c73565b34801561032257600080fd5b50610219610331366004611713565b60036020526000908152604090205481565b34801561034f57600080fd5b5061017761035e3660046115a7565b610d29565b34801561036f57600080fd5b5061021960025481565b34801561038557600080fd5b506103ce610394366004611542565b600560205260009081526040902080546001820154600290920154909173ffffffffffffffffffffffffffffffffffffffff908116911683565b6040805193845273ffffffffffffffffffffffffffffffffffffffff9283166020850152911690820152606001610223565b34801561040c57600080fd5b5061017761041b366004611735565b610efc565b34801561042c57600080fd5b5061017761043b366004611713565b61104a565b60008181526005602052604090206001015473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104d657335b6040517f720c75c200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024015b60405180910390fd5b6000818152600560205260408082206001810180548254600284018054969094557fffffffffffffffffffffffff000000000000000000000000000000000000000080831690935591851690925591517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820181905260248201849052939190911690819063a9059cbb906044016020604051808303816000875af115801561059f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611757565b506040518481527fff840b42647bf84c0308a1955e1858034ea0859a8b46b1ad7f0dc915e384a23d9060200160405180910390a150505050565b8060005b818110156106b35760015473ffffffffffffffffffffffffffffffffffffffff16638e4fd6a985858481811061063957610639611779565b905060200281019061064b91906117a8565b6040518263ffffffff1660e01b8152600401610667919061192e565b6020604051808303816000875af1158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611a65565b50600101610601565b50505050565b6106c68787878787611101565b6106d08282610a8d565b50505050505050565b8060005b818110156106b35760015473ffffffffffffffffffffffffffffffffffffffff1663df457c3485858481811061071557610715611779565b90506020028101906107279190611a7e565b6040518263ffffffff1660e01b81526004016107439190611ab2565b6020604051808303816000875af1158015610762573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107869190611a65565b506001016106dd565b61079761144c565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9490941693909317909255600755600855565b6000806107f183610b57565b6107fb9084611ba6565b9050600060405180606001604052808381526020016108173390565b73ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152509050806005600060046000815461086290611bbe565b91829055508152602080820192909252604090810160002083518155918301516001830180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff938416179091559390910151600290920180549093169181169190911790915585166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481018590526064016020604051808303816000875af1158015610961573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109859190611757565b506006546007546008546040517f8eaa80ac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90931692638eaa80ac926109e5923392600190600401611bf7565b600060405180830381600087803b1580156109ff57600080fd5b505af1158015610a13573d6000803e3d6000fd5b505060045460408051918252845160208084019190915285015173ffffffffffffffffffffffffffffffffffffffff9081168383015285820151166060830152517f14d33a926a614229d6de66968709c77bb82e62440c85470309f8a44b925d7f229350908190036080019150a150506004549392505050565b8060005b818110156106b35760015473ffffffffffffffffffffffffffffffffffffffff16633b508132858584818110610ac957610ac9611779565b9050602002810190610adb9190611a7e565b6040518263ffffffff1660e01b8152600401610af79190611c68565b6020604051808303816000875af1158015610b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3a9190611a65565b50600101610a91565b610b4b61144c565b610b5560006114cd565b565b600061271060025483610b6a9190611d47565b610b749190611d84565b92915050565b610b8261144c565b60028190556040518181527fdc0410a296e1e33943a772020d333d5f99319d7fcad932a484c53889f7aaa2b19060200160405180910390a150565b8060005b818110156106b35760015473ffffffffffffffffffffffffffffffffffffffff1663b48951e4858584818110610bf957610bf9611779565b9050602002810190610c0b9190611dbf565b6040518263ffffffff1660e01b8152600401610c279190611df3565b6020604051808303816000875af1158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a9190611a65565b50600101610bc1565b8060005b818110156106b35760015473ffffffffffffffffffffffffffffffffffffffff16637a375716858584818110610caf57610caf611779565b9050602002810190610cc19190611e68565b6040518263ffffffff1660e01b8152600401610cdd9190611e9c565b6020604051808303816000875af1158015610cfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d209190611a65565b50600101610c77565b610d3161144c565b8060005b818110156106b357600060036000868685818110610d5557610d55611779565b9050602002016020810190610d6a9190611713565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600060036000878786818110610dbf57610dbf611779565b9050602002016020810190610dd49190611713565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002055848483818110610e0d57610e0d611779565b9050602002016020810190610e229190611713565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610e5c60005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303816000875af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611757565b5050600101610d35565b6000828152600560209081526040808320815160608101835281548152600182015473ffffffffffffffffffffffffffffffffffffffff908116948201949094526002909101549092169082015290610f5483610b57565b610f5e9084611ba6565b600085815260056020526040812080549293508392909190610f81908490611ba6565b9091555050604082015173ffffffffffffffffffffffffffffffffffffffff166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481018490526064016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110439190611757565b5050505050565b61105261144c565b73ffffffffffffffffffffffffffffffffffffffff81166110f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104cd565b6110fe816114cd565b50565b600085815260056020908152604091829020825160608101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff90811693820184905260029092015490911692810192909252331461115e5733610486565b600084815b818110156111995785858281811061117d5761117d611779565b905060200201358361118f9190611ba6565b9250600101611163565b5060006111a583610b57565b905060006111b38483611ba6565b85519091508111156111f4576040517f28f853d8000000000000000000000000000000000000000000000000000000008152600481018290526024016104cd565b60008a81526005602052604081208054839290611212908490611ff4565b909155505060408086015173ffffffffffffffffffffffffffffffffffffffff16600090815260036020529081208054849290611250908490611ba6565b9091555050604085015160005b84811015611401578173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8c8c8481811061129357611293611779565b90506020020160208101906112a89190611713565b8b8b858181106112ba576112ba611779565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff909416600485015260200291909101356024830152506044016020604051808303816000875af1158015611333573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113579190611757565b5060065473ffffffffffffffffffffffffffffffffffffffff16638eaa80ac8c8c8481811061138857611388611779565b905060200201602081019061139d9190611713565b60075460085460026040518563ffffffff1660e01b81526004016113c49493929190611bf7565b600060405180830381600087803b1580156113de57600080fd5b505af11580156113f2573d6000803e3d6000fd5b5050505080600101905061125d565b507fadce6b1195e29450373d9c592f5ea6df74d8ca8cf18eab80fd8f29130992ff1c8b8b8b88604051611437949392919061200b565b60405180910390a15050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104cd565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561155457600080fd5b5035919050565b60008083601f84011261156d57600080fd5b50813567ffffffffffffffff81111561158557600080fd5b6020830191508360208260051b85010111156115a057600080fd5b9250929050565b600080602083850312156115ba57600080fd5b823567ffffffffffffffff8111156115d157600080fd5b6115dd8582860161155b565b90969095509350505050565b60008060008060008060006080888a03121561160457600080fd5b87359650602088013567ffffffffffffffff8082111561162357600080fd5b61162f8b838c0161155b565b909850965060408a013591508082111561164857600080fd5b6116548b838c0161155b565b909650945060608a013591508082111561166d57600080fd5b5061167a8a828b0161155b565b989b979a50959850939692959293505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116b157600080fd5b919050565b6000806000606084860312156116cb57600080fd5b6116d48461168d565b95602085013595506040909401359392505050565b600080604083850312156116fc57600080fd5b6117058361168d565b946020939093013593505050565b60006020828403121561172557600080fd5b61172e8261168d565b9392505050565b6000806040838503121561174857600080fd5b50508035926020909101359150565b60006020828403121561176957600080fd5b8151801515811461172e57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218336030181126117dc57600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261181b57600080fd5b830160208101925035905067ffffffffffffffff81111561183b57600080fd5b8060051b36038313156115a057600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126118cb57600080fd5b830160208101925035905067ffffffffffffffff8111156118eb57600080fd5b8036038313156115a057600080fd5b803560ff811680821461190c57600080fd5b8352506020818101359083015260408082013590830152606090810135910152565b6000602080835261010073ffffffffffffffffffffffffffffffffffffffff6119568661168d565b1682850152611967828601866117e6565b60e0604087015280838701526101207f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211156119a357600080fd5b8160051b9150818382890137600091870190810191825291506119c960408801886117e6565b87840390940160608801529083905261014080830193600581901b840190910191908160005b82811015611a47577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec0868603018752611a288285611896565b611a3387828461184d565b988a019896505050908701906001016119ef565b50505050611a5b60808701606089016118fa565b9695505050505050565b600060208284031215611a7757600080fd5b5051919050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec18336030181126117dc57600080fd5b602081528135602082015260208201356040820152604082013560608201526000611ae06060840184611896565b6101406080850152611af76101608501828461184d565b91505073ffffffffffffffffffffffffffffffffffffffff611b1b6080860161168d565b1660a0840152611b2e60a0850185611896565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08584030160c0860152611b6383828461184d565b9250505061172e60e0840160c086016118fa565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611bb957611bb9611b77565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611bf057611bf0611b77565b5060010190565b73ffffffffffffffffffffffffffffffffffffffff8516815260208101849052604081018390526080810160058310611c59577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82606083015295945050505050565b60208152813560208201526000611c826020840184611896565b6101406040850152611c996101608501828461184d565b915050611ca86040850161168d565b73ffffffffffffffffffffffffffffffffffffffff8082166060860152611cd26060870187611896565b92507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080878603016080880152611d0a85858461184d565b945082611d1960808a0161168d565b1660a0880152611d2c60a0890189611896565b94509250808786030160c08801525050611b6383838361184d565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d7f57611d7f611b77565b500290565b600082611dba577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018336030181126117dc57600080fd5b6020815273ffffffffffffffffffffffffffffffffffffffff611e158361168d565b16602082015260208201356040820152604082013560608201526000611e3e6060840184611896565b6101006080850152611e556101208501828461184d565b91505061172e60a08401608086016118fa565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe618336030181126117dc57600080fd5b60208152813560208201526000611eb66020840184611896565b6101a06040850152611ecd6101c08501828461184d565b9150506040840135606084015260608401356080840152611ef16080850185611896565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808685030160a0870152611f2784838561184d565b9350611f3560a0880161168d565b73ffffffffffffffffffffffffffffffffffffffff811660c08801529250611f6060c0880188611896565b93509150808685030160e0870152611f7984848461184d565b9350611f8760e0880161168d565b92506101009150611faf8287018473ffffffffffffffffffffffffffffffffffffffff169052565b611fbb82880188611896565b93509150610120818786030181880152611fd685858561184d565b9450611fe86101408801828a016118fa565b50929695505050505050565b60008282101561200657612006611b77565b500390565b84815260606020808301829052908201849052600090859060808401835b878110156120625773ffffffffffffffffffffffffffffffffffffffff61204f8561168d565b1682529282019290820190600101612029565b508093505050508260408301529594505050505056fea264697066735822122053867bb0683187f7d88338186c364e6470c349819073aa9c9c407156cea27d0d64736f6c634300080a0033000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000a

-----Decoded View---------------
Arg [0] : _lensHub (address): 0xdb46d1dc155634fbc732f92e853b10b288ad5a1d
Arg [1] : _protocolFee (uint256): 1000
Arg [2] : _startId (uint256): 10

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.