From 74c25062927480d768d350125e3865d7914afb8c Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Mon, 30 Sep 2024 20:18:40 +0200 Subject: [PATCH 01/12] POC: Adding minimal AA smart contract, missing tests --- .github/workflows/ci.yml | 8 +- contracts/accounts/SmartAccount.sol | 108 +++++++++++++++++++++ contracts/libraries/BaseRouterStorage.sol | 2 +- contracts/router/BaseRouter.sol | 2 +- contracts/router/ExtensionManager.sol | 2 +- contracts/router/Router.sol | 110 +++++++++++----------- foundry.toml | 2 +- hardhat.config.ts | 2 +- package.json | 3 +- pnpm-lock.yaml | 51 ++++++++++ remappings.txt | 1 + 11 files changed, 226 insertions(+), 65 deletions(-) create mode 100644 contracts/accounts/SmartAccount.sol diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fbf4c92..981d4cf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,14 +14,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18.18.0 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 name: Install pnpm with: version: 8 @@ -32,7 +32,7 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Setup pnpm cache with: path: ${{ env.STORE_PATH }} diff --git a/contracts/accounts/SmartAccount.sol b/contracts/accounts/SmartAccount.sol new file mode 100644 index 00000000..faaf6e30 --- /dev/null +++ b/contracts/accounts/SmartAccount.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; +import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import { SIG_VALIDATION_SUCCESS, SIG_VALIDATION_FAILED } from "@account-abstraction/contracts/core/Helpers.sol"; +import { IEntryPoint } from "@account-abstraction/contracts/interfaces/IEntryPoint.sol"; +import { IAccount } from "@account-abstraction/contracts/interfaces/IAccount.sol"; +import { PackedUserOperation } from "@account-abstraction/contracts/interfaces/PackedUserOperation.sol"; + +contract CitizenAccount is IAccount, Ownable { + /*////////////////////////////////////////////////////////////// + STATE VARS + //////////////////////////////////////////////////////////////*/ + IEntryPoint private immutable i_entryPoint; + + + /*////////////////////////////////////////////////////////////// + ERRORS + //////////////////////////////////////////////////////////////*/ + error InvalidSignature(); + error NotFromEntryPoint(); + error NotFromEntryPointOrOwner(); + error CallFailed(bytes); + + /*////////////////////////////////////////////////////////////// + MODIFIERS + //////////////////////////////////////////////////////////////*/ + modifier requireFromEntryPoint() { + if(msg.sender != address(i_entryPoint)) { + revert NotFromEntryPoint(); + } + _; + } + + modifier requireFromEntryPointOrOwner() { + if(msg.sender != address(i_entryPoint) && msg.sender != owner()) { + revert NotFromEntryPointOrOwner(); + } + _; + } + + /*////////////////////////////////////////////////////////////// + FUNCTIONS + //////////////////////////////////////////////////////////////*/ + constructor(address entryPoint) Ownable(msg.sender) { + i_entryPoint = IEntryPoint(entryPoint); + } + + receive() external payable {} + + + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + // EIP-191 version of the signed hash + function _validateSignature(PackedUserOperation calldata userOp, bytes32 userOpHash) + internal + view + returns (uint256 validationData) + { + + bytes32 ethSignedMessageHash = MessageHashUtils.toEthSignedMessageHash(userOpHash); + address signer = ECDSA.recover(ethSignedMessageHash, userOp.signature); + if(signer != owner()) { + return SIG_VALIDATION_FAILED; + } + + return SIG_VALIDATION_SUCCESS; + } + + function _payPrefund(uint256 missingAccountFunds) internal { + if(missingAccountFunds != 0) { + (bool success, ) = payable(msg.sender).call{value: missingAccountFunds, gas: type(uint256).max}(""); + (success); + } + } + + /*////////////////////////////////////////////////////////////// + GETTERS + //////////////////////////////////////////////////////////////*/ + function getEntryPoint() external view returns (address) { + return address(i_entryPoint); + } + + /*////////////////////////////////////////////////////////////// + EXTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + function execute(address dest, uint256 value, bytes calldata functionData) external requireFromEntryPoint { + (bool success, bytes memory result) = dest.call{value: value}(functionData); + if(!success) { + revert CallFailed(result); + } + + } + + // A signature is valid, if its the minimal account owner + function validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds) + external + requireFromEntryPoint + returns (uint256 validationData) + { + uint256 validationData = _validateSignature(userOp, userOpHash); + _payPrefund(missingAccountFunds); + } +} diff --git a/contracts/libraries/BaseRouterStorage.sol b/contracts/libraries/BaseRouterStorage.sol index 5fc27270..5fd975b9 100644 --- a/contracts/libraries/BaseRouterStorage.sol +++ b/contracts/libraries/BaseRouterStorage.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.20; +pragma solidity 0.8.24; /// @title BaseRouterStorage /// @notice Defined storage for base router diff --git a/contracts/router/BaseRouter.sol b/contracts/router/BaseRouter.sol index 17c19752..c4c9298c 100644 --- a/contracts/router/BaseRouter.sol +++ b/contracts/router/BaseRouter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.20; +pragma solidity 0.8.24; import { Router, IRouter } from "./Router.sol"; import { IRouterState } from "../interfaces/IRouterState.sol"; diff --git a/contracts/router/ExtensionManager.sol b/contracts/router/ExtensionManager.sol index ae501001..b4efc07b 100644 --- a/contracts/router/ExtensionManager.sol +++ b/contracts/router/ExtensionManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.20; +pragma solidity 0.8.24; import "../interfaces/IExtensionManager.sol"; import "../interfaces/IRouterState.sol"; diff --git a/contracts/router/Router.sol b/contracts/router/Router.sol index 928966b7..94425b83 100644 --- a/contracts/router/Router.sol +++ b/contracts/router/Router.sol @@ -1,57 +1,57 @@ - // SPDX-License-Identifier: MIT - pragma solidity 0.8.20; - - import { IRouter } from "../interfaces/IRouter.sol"; - - /// @title ERC-7504 Dynamic Contracts: Router. - /// @author omar@game7.io (@ogarciarevett) - /// @notice Routes an incoming call to an appropriate implementation address. - - abstract contract Router is IRouter { - - /** - * @notice delegateCalls the appropriate implementation address for the given incoming function call. - * @dev The implementation address to delegateCall MUST be retrieved from calling `getImplementationForFunction` with the - * incoming call's function selector. - */ - fallback() external payable virtual { - if(msg.data.length == 0) return; - - address implementation = getImplementationForFunction(msg.sig); - require(implementation != address(0), "Router: function does not exist."); - _delegate(implementation); - } - - /// @dev delegateCalls an `implementation` smart contract. - function _delegate(address implementation) internal virtual { - assembly { - // Copy msg.data. We take full control of memory in this inline assembly - // block because it will not return to Solidity code. We overwrite the - // Solidity scratch pad at memory position 0. - calldatacopy(0, 0, calldatasize()) - - // Call the implementation. - // out and outsize are 0 because we don't know the size yet. - let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) - - // Copy the returned data. - returndatacopy(0, 0, returndatasize()) - - switch result - // delegatecall returns 0 on error. - case 0 { - revert(0, returndatasize()) - } - default { - return(0, returndatasize()) - } +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import { IRouter } from "../interfaces/IRouter.sol"; + +/// @title ERC-7504 Dynamic Contracts: Router. +/// @author omar@game7.io (@ogarciarevett) +/// @notice Routes an incoming call to an appropriate implementation address. + +abstract contract Router is IRouter { + + /** + * @notice delegateCalls the appropriate implementation address for the given incoming function call. + * @dev The implementation address to delegateCall MUST be retrieved from calling `getImplementationForFunction` with the + * incoming call's function selector. + */ + fallback() external payable virtual { + if(msg.data.length == 0) return; + + address implementation = getImplementationForFunction(msg.sig); + require(implementation != address(0), "Router: function does not exist."); + _delegate(implementation); + } + + /// @dev delegateCalls an `implementation` smart contract. + function _delegate(address implementation) internal virtual { + assembly { + // Copy msg.data. We take full control of memory in this inline assembly + // block because it will not return to Solidity code. We overwrite the + // Solidity scratch pad at memory position 0. + calldatacopy(0, 0, calldatasize()) + + // Call the implementation. + // out and outsize are 0 because we don't know the size yet. + let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) + + // Copy the returned data. + returndatacopy(0, 0, returndatasize()) + + switch result + // delegatecall returns 0 on error. + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) } } - - /** - * @notice Returns the implementation address to delegateCall for the given function selector. - * @param _functionSelector The function selector to get the implementation address for. - * @return implementation The implementation address to delegateCall for the given function selector. - */ - function getImplementationForFunction(bytes4 _functionSelector) public view virtual returns (address implementation); - } \ No newline at end of file + } + + /** + * @notice Returns the implementation address to delegateCall for the given function selector. + * @param _functionSelector The function selector to get the implementation address for. + * @return implementation The implementation address to delegateCall for the given function selector. + */ + function getImplementationForFunction(bytes4 _functionSelector) public view virtual returns (address implementation); +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 54a563fa..a8958094 100644 --- a/foundry.toml +++ b/foundry.toml @@ -3,6 +3,6 @@ src = 'contracts' out = 'out' libs = ['lib'] test = 'test' -solc = '0.8.20' +solc = '0.8.24' cache_path = 'cache_forge' viaIR = true \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index b5b96b21..96c4ed15 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -25,7 +25,7 @@ if (!PRIVATE_KEY) { const config: HardhatUserConfig = { solidity: { - version: '0.8.20', + version: '0.8.24', settings: { optimizer: { enabled: true, diff --git a/package.json b/package.json index b339f63b..03f24601 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@achievo/contracts", + "name": "@summon/contracts", "version": "0.25.0", "private": true, "description": "Smart contracts for achievo.xyz", @@ -85,6 +85,7 @@ "typescript": "^5.4.5" }, "dependencies": { + "@account-abstraction/contracts": "^0.7.0", "@chainlink/contracts": "^1.1.1", "@nomicfoundation/hardhat-chai-matchers": "^2.0.7", "@nomicfoundation/hardhat-network-helpers": "^1.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7932b609..c4f1a77d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@account-abstraction/contracts': + specifier: ^0.7.0 + version: 0.7.0 '@chainlink/contracts': specifier: ^1.1.1 version: 1.1.1(ethers@6.13.2) @@ -147,6 +150,9 @@ importers: packages: + '@account-abstraction/contracts@0.7.0': + resolution: {integrity: sha512-Bt/66ilu3u8I9+vFZ9fTd+cWs55fdb9J5YKfrhsrFafH1drkzwuCSL/xEot1GGyXXNJLQuXbMRztQPyelNbY1A==} + '@adraffy/ens-normalize@1.10.0': resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} @@ -620,6 +626,9 @@ packages: peerDependencies: '@openzeppelin/contracts': 5.0.2 + '@openzeppelin/contracts@3.4.2-solc-0.7': + resolution: {integrity: sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==} + '@openzeppelin/contracts@4.9.3': resolution: {integrity: sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==} @@ -984,6 +993,22 @@ packages: resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} engines: {node: ^18.18.0 || >=20.0.0} + '@uniswap/lib@4.0.1-alpha': + resolution: {integrity: sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA==} + engines: {node: '>=10'} + + '@uniswap/v2-core@1.0.1': + resolution: {integrity: sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==} + engines: {node: '>=10'} + + '@uniswap/v3-core@1.0.1': + resolution: {integrity: sha512-7pVk4hEm00j9tc71Y9+ssYpO6ytkeI0y7WE9P6UcmNzhxPePwyAxImuhVsTqWK9YFvzgtvzJHi64pBl4jUzKMQ==} + engines: {node: '>=10'} + + '@uniswap/v3-periphery@1.4.4': + resolution: {integrity: sha512-S4+m+wh8HbWSO3DKk4LwUCPZJTpCugIsHrWR86m/OrUyvSqGDTXKFfc2sMuGXCZrD1ZqO3rhQsKgdWg3Hbb2Kw==} + engines: {node: '>=10'} + abbrev@1.0.9: resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} @@ -1198,6 +1223,9 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + base64-sol@1.0.1: + resolution: {integrity: sha512-ld3cCNMeXt4uJXmLZBHFGMvVpK9KsLVEhPpFRXnvSVAqABKbuNZg/+dsq3NuM+wxFLb/UrVkz7m1ciWmkMfTbg==} + bech32@1.1.4: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} @@ -3831,6 +3859,11 @@ packages: snapshots: + '@account-abstraction/contracts@0.7.0': + dependencies: + '@openzeppelin/contracts': 5.0.2 + '@uniswap/v3-periphery': 1.4.4 + '@adraffy/ens-normalize@1.10.0': {} '@adraffy/ens-normalize@1.10.1': {} @@ -4655,6 +4688,8 @@ snapshots: dependencies: '@openzeppelin/contracts': 5.0.2 + '@openzeppelin/contracts@3.4.2-solc-0.7': {} + '@openzeppelin/contracts@4.9.3': {} '@openzeppelin/contracts@5.0.2': {} @@ -5090,6 +5125,20 @@ snapshots: '@typescript-eslint/types': 7.13.1 eslint-visitor-keys: 3.4.3 + '@uniswap/lib@4.0.1-alpha': {} + + '@uniswap/v2-core@1.0.1': {} + + '@uniswap/v3-core@1.0.1': {} + + '@uniswap/v3-periphery@1.4.4': + dependencies: + '@openzeppelin/contracts': 3.4.2-solc-0.7 + '@uniswap/lib': 4.0.1-alpha + '@uniswap/v2-core': 1.0.1 + '@uniswap/v3-core': 1.0.1 + base64-sol: 1.0.1 + abbrev@1.0.9: {} abitype@1.0.0(typescript@5.4.5): @@ -5319,6 +5368,8 @@ snapshots: base64-js@1.5.1: {} + base64-sol@1.0.1: {} + bech32@1.1.4: {} better-path-resolve@1.0.0: diff --git a/remappings.txt b/remappings.txt index 913f9d63..7508dca8 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,3 +1,4 @@ @openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ @openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ @chainlink/contracts/=node_modules/@chainlink/contracts/ +@account-abstraction/contracts/=node_modules/@account-abstraction/contracts/ From e94b9febd004a486fb6b74ef72ff5c08e3425d6f Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Tue, 1 Oct 2024 13:17:38 +0200 Subject: [PATCH 02/12] Chore: Add contracts from wb team(staking) --- .../{staker => staking}/PositionMetadata.sol | 17 +++--- .../governance/{staker => staking}/Staker.sol | 56 ++++++++++--------- .../governance/{staker => staking}/data.sol | 36 ++++++------ contracts/interfaces/IStaker.sol | 17 +++--- .../MiddlewareStakerNativeTokenV1.sol | 2 +- package.json | 3 +- scripts/deployStaker.ts | 33 +++++++++++ 7 files changed, 105 insertions(+), 59 deletions(-) rename contracts/governance/{staker => staking}/PositionMetadata.sol (87%) rename contracts/governance/{staker => staking}/Staker.sol (92%) rename contracts/governance/{staker => staking}/data.sol (73%) create mode 100644 scripts/deployStaker.ts diff --git a/contracts/governance/staker/PositionMetadata.sol b/contracts/governance/staking/PositionMetadata.sol similarity index 87% rename from contracts/governance/staker/PositionMetadata.sol rename to contracts/governance/staking/PositionMetadata.sol index 7404baff..ce5a04b4 100644 --- a/contracts/governance/staker/PositionMetadata.sol +++ b/contracts/governance/staking/PositionMetadata.sol @@ -1,11 +1,14 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.20; +pragma solidity ^0.8.24; import { Base64 } from "@openzeppelin/contracts/utils/Base64.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { StakingPool, Position } from "./data.sol"; +/* +* @notice Built by the Game7 World Builder team: worldbuilder - at - game7.io +*/ contract PositionMetadata { function metadataBytes( uint256 positionTokenID, @@ -67,10 +70,10 @@ contract PositionMetadata { ) public pure returns (string memory) { return string( - abi.encodePacked( - "data:application/json;base64,", - Base64.encode(metadataBytes(positionTokenID, position, pool)) - ) - ); + abi.encodePacked( + "data:application/json;base64,", + Base64.encode(metadataBytes(positionTokenID, position, pool)) + ) + ); } -} \ No newline at end of file +} diff --git a/contracts/governance/staker/Staker.sol b/contracts/governance/staking/Staker.sol similarity index 92% rename from contracts/governance/staker/Staker.sol rename to contracts/governance/staking/Staker.sol index af59e74a..a343029a 100644 --- a/contracts/governance/staker/Staker.sol +++ b/contracts/governance/staking/Staker.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.20; +pragma solidity ^0.8.24; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; @@ -11,7 +11,6 @@ import { ERC721Enumerable } from "@openzeppelin/contracts/token/ERC721/extension import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; - import { StakingPool, Position } from "./data.sol"; import { PositionMetadata } from "./PositionMetadata.sol"; @@ -242,7 +241,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { /** * @notice Allows anyone to open a position under a staking pool for native tokens. */ - function stakeNative(uint256 poolID) external payable nonReentrant returns (uint256 positionTokenID) { + function stakeNative(address positionHolder, uint256 poolID) external payable nonReentrant returns (uint256 positionTokenID) { StakingPool storage pool = Pools[poolID]; if (pool.tokenType != NATIVE_TOKEN_TYPE) { revert IncorrectTokenType(poolID, pool.tokenType, NATIVE_TOKEN_TYPE); @@ -253,7 +252,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { } positionTokenID = TotalPositions++; - _mint(msg.sender, positionTokenID); + _mint(positionHolder, positionTokenID); Positions[positionTokenID] = Position({ poolID: poolID, @@ -265,7 +264,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { CurrentAmountInPool[poolID] += msg.value; CurrentPositionsInPool[poolID]++; - emit Staked(positionTokenID, msg.sender, poolID, msg.value); + emit Staked(positionTokenID, positionHolder, poolID, msg.value); } /** @@ -278,12 +277,14 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { * `amount` tokens from their account. This can typically be done by calling the `approve` method on the * ERC20 contract. */ - function stakeERC20(uint256 poolID, uint256 amount) external nonReentrant returns (uint256 positionTokenID) { + function stakeERC20(address positionHolder, uint256 poolID, uint256 amount) external nonReentrant returns (uint256 positionTokenID) { + StakingPool storage pool = Pools[poolID]; if (pool.tokenType != ERC20_TOKEN_TYPE) { revert IncorrectTokenType(poolID, pool.tokenType, ERC20_TOKEN_TYPE); } + if (amount == 0) { revert NothingToStake(); } @@ -291,7 +292,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { IERC20(pool.tokenAddress).safeTransferFrom(msg.sender, address(this), amount); positionTokenID = TotalPositions++; - _mint(msg.sender, positionTokenID); + _mint(positionHolder, positionTokenID); Positions[positionTokenID] = Position({ poolID: poolID, @@ -303,7 +304,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { CurrentAmountInPool[poolID] += amount; CurrentPositionsInPool[poolID]++; - emit Staked(positionTokenID, msg.sender, poolID, amount); + emit Staked(positionTokenID, positionHolder, poolID, amount); } /** @@ -315,7 +316,8 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { * the token with the given `tokenID` from their account. This can typically be done by calling the `approve` * or `setApprovalForAll` methods on the ERC721 contract. */ - function stakeERC721(uint256 poolID, uint256 tokenID) external nonReentrant returns (uint256 positionTokenID) { + function stakeERC721(address positionHolder, uint256 poolID, uint256 tokenID) external nonReentrant returns (uint256 positionTokenID) { + StakingPool storage pool = Pools[poolID]; if (pool.tokenType != ERC721_TOKEN_TYPE) { revert IncorrectTokenType(poolID, pool.tokenType, ERC721_TOKEN_TYPE); @@ -324,7 +326,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { IERC721(pool.tokenAddress).safeTransferFrom(msg.sender, address(this), tokenID); positionTokenID = TotalPositions++; - _mint(msg.sender, positionTokenID); + _mint(positionHolder, positionTokenID); Positions[positionTokenID] = Position({ poolID: poolID, @@ -336,7 +338,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { CurrentAmountInPool[poolID]++; CurrentPositionsInPool[poolID]++; - emit Staked(positionTokenID, msg.sender, poolID, tokenID); + emit Staked(positionTokenID, positionHolder, poolID, tokenID); } /** @@ -346,7 +348,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { * `amount` tokens with the given `tokenId` from their account. This can typically be done by calling * the `setApprovalForAll` method on the ERC1155 contract. */ - function stakeERC1155(uint256 poolID, uint256 amount) external nonReentrant returns (uint256 positionTokenID) { + function stakeERC1155(address positionHolder, uint256 poolID, uint256 amount) external nonReentrant returns (uint256 positionTokenID) { StakingPool storage pool = Pools[poolID]; if (pool.tokenType != ERC1155_TOKEN_TYPE) { revert IncorrectTokenType(poolID, pool.tokenType, ERC1155_TOKEN_TYPE); @@ -359,7 +361,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { IERC1155(pool.tokenAddress).safeTransferFrom(msg.sender, address(this), pool.tokenID, amount, ""); positionTokenID = TotalPositions++; - _mint(msg.sender, positionTokenID); + _mint(positionHolder, positionTokenID); Positions[positionTokenID] = Position({ poolID: poolID, @@ -371,7 +373,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { CurrentAmountInPool[poolID] += amount; CurrentPositionsInPool[poolID]++; - emit Staked(positionTokenID, msg.sender, poolID, amount); + emit Staked(positionTokenID, positionHolder, poolID, amount); } /** @@ -388,13 +390,14 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { */ function initiateUnstake(uint256 positionTokenID) external nonReentrant { address positionOwner = ownerOf(positionTokenID); - if (positionOwner != msg.sender) { - revert UnauthorizedForPosition(positionOwner, msg.sender); - } - Position storage position = Positions[positionTokenID]; + StakingPool storage pool = Pools[position.poolID]; + if (positionOwner != msg.sender && pool.administrator != msg.sender) { + revert UnauthorizedForPosition(positionOwner, msg.sender); + } + // Enforce lockup period if (block.timestamp < position.stakeTimestamp + pool.lockupSeconds) { revert LockupNotExpired(position.stakeTimestamp + pool.lockupSeconds); @@ -402,7 +405,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { if (position.unstakeInitiatedAt == 0) { position.unstakeInitiatedAt = block.timestamp; - emit UnstakeInitiated(positionTokenID, msg.sender); + emit UnstakeInitiated(positionTokenID, positionOwner); } } @@ -414,16 +417,15 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { * expire before calling this method. */ function unstake(uint256 positionTokenID) external nonReentrant { - { - address positionOwner = ownerOf(positionTokenID); - if (positionOwner != msg.sender) { - revert UnauthorizedForPosition(positionOwner, msg.sender); - } - } - Position storage position = Positions[positionTokenID]; StakingPool storage pool = Pools[position.poolID]; + address positionOwner = ownerOf(positionTokenID); + + if (positionOwner != msg.sender && pool.administrator != msg.sender) { + revert UnauthorizedForPosition(positionOwner, msg.sender); + } + // Enforce cooldown, but only if the pool has a cooldown period. if (pool.cooldownSeconds > 0) { // This branch doesn't enforce the lockup period as that has already been enforced in `initiateUnstake`. @@ -449,7 +451,7 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { // Delete position data and burn the position token uint256 amountOrTokenID = position.amountOrTokenID; - emit Unstaked(positionTokenID, msg.sender, position.poolID, amountOrTokenID); + emit Unstaked(positionTokenID, positionOwner, position.poolID, amountOrTokenID); delete Positions[positionTokenID]; _burn(positionTokenID); diff --git a/contracts/governance/staker/data.sol b/contracts/governance/staking/data.sol similarity index 73% rename from contracts/governance/staker/data.sol rename to contracts/governance/staking/data.sol index 7999b587..5c3df388 100644 --- a/contracts/governance/staker/data.sol +++ b/contracts/governance/staking/data.sol @@ -1,5 +1,9 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.20; +pragma solidity ^0.8.24; + +/* +* @notice Built by the Game7 World Builder team: worldbuilder - at - game7.io +*/ /** * @notice StakingPool represents a staking position that users can adopt. @@ -13,15 +17,15 @@ pragma solidity ^0.8.20; * the lockup period for positions staked under that pool, and the length of the cooldown period for * withdrawals for positions staked under that pool. */ - struct StakingPool { - address administrator; - uint256 tokenType; - address tokenAddress; - uint256 tokenID; - bool transferable; - uint256 lockupSeconds; - uint256 cooldownSeconds; - } +struct StakingPool { + address administrator; + uint256 tokenType; + address tokenAddress; + uint256 tokenID; + bool transferable; + uint256 lockupSeconds; + uint256 cooldownSeconds; +} /** * @notice Position represents the parameters of a staking position: @@ -33,9 +37,9 @@ pragma solidity ^0.8.20; * @notice The address of the depositor is the owner of the ERC721 token representing this deposit, and * is not stored within this struct. */ - struct Position { - uint256 poolID; - uint256 amountOrTokenID; - uint256 stakeTimestamp; - uint256 unstakeInitiatedAt; - } \ No newline at end of file +struct Position { + uint256 poolID; + uint256 amountOrTokenID; + uint256 stakeTimestamp; + uint256 unstakeInitiatedAt; +} diff --git a/contracts/interfaces/IStaker.sol b/contracts/interfaces/IStaker.sol index 665dda5e..8cc26da7 100644 --- a/contracts/interfaces/IStaker.sol +++ b/contracts/interfaces/IStaker.sol @@ -1,10 +1,13 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.20; +pragma solidity ^0.8.24; -import { StakingPool, Position } from "../governance/staker/data.sol"; -import { PositionMetadata } from "../governance/staker/PositionMetadata.sol"; +import { StakingPool, Position } from "../governance/staking/data.sol"; +import { PositionMetadata } from "../governance/staking/PositionMetadata.sol"; +/* +* @notice Built by the Game7 World Builder team: worldbuilder - at - game7.io +*/ interface IStaker { function positionMetadataAddress() external view returns (address); @@ -86,13 +89,13 @@ interface IStaker { function transferPoolAdministration(uint256 poolID, address newAdministrator) external; - function stakeNative(uint256 poolID) external payable returns (uint256 positionTokenID); + function stakeNative(address user, uint256 poolID) external payable returns (uint256 positionTokenID); - function stakeERC20(uint256 poolID, uint256 amount) external returns (uint256 positionTokenID); + function stakeERC20(address user, uint256 poolID, uint256 amount) external returns (uint256 positionTokenID); - function stakeERC721(uint256 poolID, uint256 tokenID) external returns (uint256 positionTokenID); + function stakeERC721(address user, uint256 poolID, uint256 tokenID) external returns (uint256 positionTokenID); - function stakeERC1155(uint256 poolID, uint256 amount) external returns (uint256 positionTokenID); + function stakeERC1155(address user, uint256 poolID, uint256 amount) external returns (uint256 positionTokenID); function initiateUnstake(uint256 positionTokenID) external; diff --git a/contracts/upgradeables/governance/MiddlewareStakerNativeTokenV1.sol b/contracts/upgradeables/governance/MiddlewareStakerNativeTokenV1.sol index ad273072..71de144c 100644 --- a/contracts/upgradeables/governance/MiddlewareStakerNativeTokenV1.sol +++ b/contracts/upgradeables/governance/MiddlewareStakerNativeTokenV1.sol @@ -71,7 +71,7 @@ contract MiddlewareStakerNativeTokenV1 is Initializable, AccessControlUpgradeabl revert PoolDoesNotExist(poolID); } - uint256 positionTokenID = stakerContract.stakeNative{value: msg.value}(poolID); + uint256 positionTokenID = stakerContract.stakeNative{value: msg.value}(playerAddress, poolID); // Retrieve pool data ( diff --git a/package.json b/package.json index 03f24601..2b7812ba 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "format:check": "prettier -c ./deploy/**/*.ts ./tasks/**/*.ts ./tests/**/*.ts ./helpers/**/*.ts ./contracts/**/*.sol ", "coverage": "TS_NODE_TRANSPILE_ONLY=true SOLIDITY_COVERAGE=true hardhat coverage --solcoverjs .solcover.ts", "coverage:foundry": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage", - "generate:types": "pnpm dlx hardhat typechain" + "generate:types": "pnpm dlx hardhat typechain", + "deleteme": "npx hardhat run scripts/deployStaker.ts --network game7Testnet --config g7.config.ts" }, "repository": { "type": "git", diff --git a/scripts/deployStaker.ts b/scripts/deployStaker.ts new file mode 100644 index 00000000..80ee6e6b --- /dev/null +++ b/scripts/deployStaker.ts @@ -0,0 +1,33 @@ +import { log } from '@helpers/logger'; +import { ethers } from 'hardhat'; +import { PositionMetadata, Staker } from 'typechain-types'; + +async function main() { + const { PRIVATE_KEY } = process.env; + + if (!PRIVATE_KEY) { + throw new Error('PRIVATE_KEY env required'); + } + + const provider = ethers.provider; + const signer = new ethers.Wallet(PRIVATE_KEY, provider); + + const positionMetadataFactory = await ethers.getContractFactory('PositionMetadata', signer); + const positionMetadataContract = (await positionMetadataFactory.deploy()) as unknown as PositionMetadata; + await positionMetadataContract.waitForDeployment(); + const positionMetadataContractAddress = await positionMetadataContract.getAddress(); + + log('PositionMetadata deployed:', positionMetadataContractAddress); + + const stakerFactory = await ethers.getContractFactory('Staker', signer); + const stakerContract = (await stakerFactory.deploy(positionMetadataContractAddress)) as unknown as Staker; + await stakerContract.waitForDeployment(); + const stakerContractAddress = await stakerContract.getAddress(); + + log('Staker deployed:', stakerContractAddress); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); From 5a17c041a5dc5bb885b8cb49704f7149a3043d91 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Tue, 1 Oct 2024 13:38:19 +0200 Subject: [PATCH 03/12] Chore: Update constructor params --- constants/constructor-args.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/constructor-args.ts b/constants/constructor-args.ts index 294cebc1..6dd1d67d 100644 --- a/constants/constructor-args.ts +++ b/constants/constructor-args.ts @@ -422,7 +422,7 @@ export const MiddlewareNativeTokenStakerArgs = { admin: 'DEPLOYER_WALLET', }, TESTNET: { - stakerContract: '0xa6B0461b7E54Fa342Be6320D4938295A81f82Cd3', + stakerContract: '0xE7e669769Bb409b31540ff5dB6F15af3307928b1', admin: 'DEPLOYER_WALLET', }, }; From 6ba03c926feb3ab99a5b15648f5f7a01444d673d Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 16:54:53 +0200 Subject: [PATCH 04/12] Chore: Improving gas by the hardhat runner and fixing middleware stake tests --- contracts/accounts/Forwarder.sol | 108 ++++++++++++++++++++ contracts/governance/staking/Staker.sol | 7 +- contracts/interfaces/IForwarder.sol | 21 ++++ hardhat.config.ts | 2 +- test/hardhatTests/forwarder.test.ts | 38 +++++++ test/hardhatTests/middlewareStaker.test.ts | 111 ++++++--------------- 6 files changed, 202 insertions(+), 85 deletions(-) create mode 100644 contracts/accounts/Forwarder.sol create mode 100644 contracts/interfaces/IForwarder.sol create mode 100644 test/hardhatTests/forwarder.test.ts diff --git a/contracts/accounts/Forwarder.sol b/contracts/accounts/Forwarder.sol new file mode 100644 index 00000000..1d2acdcd --- /dev/null +++ b/contracts/accounts/Forwarder.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; +import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol"; + +/** + * @title Forwarder + * @dev Contract that automatically forwards any incoming native tokens to the parent address + * and allows flushing of ERC20 tokens. It also includes withdraw functions for admin. + */ +contract Forwarder is + AccessControl, + Pausable, + ReentrancyGuard +{ + using SafeERC20 for IERC20; + + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + address public parentAddress; + + event ForwarderDeposited(address indexed from, uint256 value); + event ERC20TokensFlushed(address indexed token, uint256 amount); + event ParentAddressUpdated(address newParentAddress); + event WithdrawnERC20(address indexed token, address indexed to, uint256 amount); + + error OnlyParentAllowed(); + error ForwardFailed(); + error InvalidParentAddress(); + error WithdrawFailed(); + + constructor(address _parentAddress, address _admin) { + if (_parentAddress == address(0)) revert InvalidParentAddress(); + parentAddress = _parentAddress; + + _grantRole(DEFAULT_ADMIN_ROLE, _admin); + _grantRole(ADMIN_ROLE, _admin); + _grantRole(PAUSER_ROLE, _admin); + } + + /** + * @dev Modifier that only allows the parent address to call the function + */ + modifier onlyParent() { + if (msg.sender != parentAddress) revert OnlyParentAllowed(); + _; + } + + /** + * @dev Fallback function to receive native tokens and forward them + */ + receive() external payable { + _forwardNativeToken(msg.value); + } + + /** + * @dev Internal function to forward native tokens to the parent address + */ + function _forwardNativeToken(uint256 value) internal { + if (value > 0) { + (bool success, ) = parentAddress.call{value: value}(""); + if (!success) revert ForwardFailed(); + emit ForwarderDeposited(msg.sender, value); + } + } + + /** + * @dev Function to update the parent address + * @param newParentAddress The new parent address + */ + function updateParentAddress(address newParentAddress) external onlyRole(ADMIN_ROLE) { + if (newParentAddress == address(0)) revert InvalidParentAddress(); + parentAddress = newParentAddress; + emit ParentAddressUpdated(newParentAddress); + } + + /** + * @dev Pauses the contract + */ + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + /** + * @dev Unpauses the contract + */ + function unpause() external onlyRole(PAUSER_ROLE) { + _unpause(); + } + + /** + * @dev Withdraws ERC20 tokens from the contract + * @param erc20TokenAddress The address of the ERC20 token contract + * @param to The address to send the tokens to + * @param amount The amount of tokens to withdraw + */ + function withdrawERC20(address erc20TokenAddress, address to, uint256 amount) external onlyRole(ADMIN_ROLE) nonReentrant { + IERC20 erc20Token = IERC20(erc20TokenAddress); + if (erc20Token.balanceOf(address(this)) < amount) revert WithdrawFailed(); + erc20Token.safeTransfer(to, amount); + emit WithdrawnERC20(erc20TokenAddress, to, amount); + } +} \ No newline at end of file diff --git a/contracts/governance/staking/Staker.sol b/contracts/governance/staking/Staker.sol index a343029a..8cecbfc0 100644 --- a/contracts/governance/staking/Staker.sol +++ b/contracts/governance/staking/Staker.sol @@ -13,6 +13,7 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s import { StakingPool, Position } from "./data.sol"; import { PositionMetadata } from "./PositionMetadata.sol"; +import "hardhat/console.sol"; /** * @notice The Staker contract allows users to permissionlessly create staking pools by specifying various parameters @@ -422,8 +423,12 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { address positionOwner = ownerOf(positionTokenID); + console.log("positionOwner: %s", positionOwner); + console.log("msg.sender: %s", msg.sender); + console.log("pool.administrator: %s", pool.administrator); + if (positionOwner != msg.sender && pool.administrator != msg.sender) { - revert UnauthorizedForPosition(positionOwner, msg.sender); + revert UnauthorizedForPosition(pool.administrator, msg.sender); } // Enforce cooldown, but only if the pool has a cooldown period. diff --git a/contracts/interfaces/IForwarder.sol b/contracts/interfaces/IForwarder.sol new file mode 100644 index 00000000..218cb048 --- /dev/null +++ b/contracts/interfaces/IForwarder.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +interface IForwarder { + event ForwarderDeposited(address indexed from, uint256 value); + event ERC20TokensFlushed(address indexed token, uint256 amount); + event ParentAddressUpdated(address newParentAddress); + + function parentAddress() external view returns (address); + function flushERC20Tokens(address tokenAddress) external; + function updateParentAddress(address newParentAddress) external; + function pause() external; + function unpause() external; + + // AccessControl functions + function hasRole(bytes32 role, address account) external view returns (bool); + function getRoleAdmin(bytes32 role) external view returns (bytes32); + function grantRole(bytes32 role, address account) external; + function revokeRole(bytes32 role, address account) external; + function renounceRole(bytes32 role, address account) external; +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 96c4ed15..a6334a01 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -29,7 +29,7 @@ const config: HardhatUserConfig = { settings: { optimizer: { enabled: true, - runs: 1, + runs: 1000, details: { yul: true, }, diff --git a/test/hardhatTests/forwarder.test.ts b/test/hardhatTests/forwarder.test.ts new file mode 100644 index 00000000..5f02da88 --- /dev/null +++ b/test/hardhatTests/forwarder.test.ts @@ -0,0 +1,38 @@ +import { ethers } from 'hardhat'; +import { expect } from 'chai'; +import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers'; + +export async function setupFixture() { + const [motherWallet, admin, user, user2, user3] = await ethers.getSigners(); + + const Forwarder = await ethers.getContractFactory('Forwarder'); + const forwarder = await Forwarder.deploy(motherWallet, admin); + + const ERC20 = await ethers.getContractFactory('MockERC20'); + const erc20 = await ERC20.deploy('ERC20TEST', 'TERC20'); + + const provider = ethers.provider; + + return { motherWallet, erc20, admin, user, user2, user3, forwarder, provider }; +} + +describe('Forwarder', function () { + it('Should deploy successfully a forwarder contract', async function () { + const { forwarder } = await loadFixture(setupFixture); + expect(await forwarder.getAddress()).to.be.properAddress; + }); + + it('Every deposit of native tokens should be transferred to the motherWallet', async function () { + const { forwarder, motherWallet, user, provider } = await loadFixture(setupFixture); + expect(await forwarder.parentAddress()).to.equal(motherWallet.address); + + const initialBalance = await provider.getBalance(await motherWallet.getAddress()); + + const amount = ethers.parseEther('1'); + const tx = await user.sendTransaction({ to: forwarder.target, value: amount }); + await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user.address, amount); + await tx.wait(); + const finalBalance = await provider.getBalance(await motherWallet.getAddress()); + expect(finalBalance).to.equal(amount + initialBalance); + }); +}); diff --git a/test/hardhatTests/middlewareStaker.test.ts b/test/hardhatTests/middlewareStaker.test.ts index f6fa4bce..e18f3704 100644 --- a/test/hardhatTests/middlewareStaker.test.ts +++ b/test/hardhatTests/middlewareStaker.test.ts @@ -41,7 +41,8 @@ describe('MiddlewareStakerNativeTokenV1', function () { const PAUSER_ROLE = await middlewareStaker.PAUSER_ROLE(); await middlewareStaker.connect(owner).grantRole(PAUSER_ROLE, await pauserRole.getAddress()); - await mockStaker.createPool(1, ZeroAddress, 0, false, 1, 1); + await mockStaker.connect(stakerRole).createPool(1, ZeroAddress, 0, false, 1, 1); + await mockStaker.connect(stakerRole).transferPoolAdministration(0, middlewareStaker.target); poolId = 0; }); @@ -54,7 +55,10 @@ describe('MiddlewareStakerNativeTokenV1', function () { lockupSeconds: number, cooldownSeconds: number ) { - await mockStaker.createPool(tokenType, tokenAddress, tokenID, transferable, lockupSeconds, cooldownSeconds); + const tx = await mockStaker + .connect(stakerRole) + .createPool(tokenType, tokenAddress, tokenID, transferable, lockupSeconds, cooldownSeconds); + await tx.wait(); } async function stakePosition(playerAddress: string, stakeAmount: BigNumber = ethers.parseEther('1.0')) { @@ -156,22 +160,29 @@ describe('MiddlewareStakerNativeTokenV1', function () { .withArgs(await user.getAddress(), await middlewareStaker.STAKER_ROLE()); }); - it('Should initiateUnstake successfully when called by STAKER_ROLE', async function () { + it('Should unstake successfully when called by STAKER_ROLE', async function () { const playerAddress = await user.getAddress(); const positionTokenID = await stakePosition(playerAddress); - const tx = await middlewareStaker.connect(stakerRole).initiateUnstake(positionTokenID, playerAddress); - const receipt = await tx.wait(); + const initiateUnstakeTx = await middlewareStaker + .connect(stakerRole) + .initiateUnstake(positionTokenID, playerAddress); + await initiateUnstakeTx.wait(); - // Parse logs using the contract interface - const events = receipt.logs - .filter((log) => log.address === middlewareStaker.target) - .map((log) => middlewareStaker.interface.parseLog(log)); + const tx = await middlewareStaker.connect(stakerRole).unstake(positionTokenID, playerAddress); + await expect(tx) + .to.emit(middlewareStaker, 'Unstaked') + .withArgs(playerAddress, positionTokenID, ethers.parseEther('1.0'), await stakerRole.getAddress()); + }); - const event = events.find((e) => e.name === 'UnstakeInitiated'); - expect(event).to.not.be.undefined; - expect(event!.args.user).to.equal(playerAddress); - expect(event!.args.positionTokenID).to.equal(positionTokenID); + it('Should initiateUnstake successfully when called by STAKER_ROLE', async function () { + const playerAddress = await user.getAddress(); + const positionTokenID = await stakePosition(playerAddress); + + const tx = await middlewareStaker.connect(stakerRole).initiateUnstake(positionTokenID, playerAddress); + await expect(tx) + .to.emit(middlewareStaker, 'UnstakeInitiated') + .withArgs(playerAddress, positionTokenID, await stakerRole.getAddress()); }); it('Should revert when pause called by non-PAUSER_ROLE', async function () { @@ -219,6 +230,10 @@ describe('MiddlewareStakerNativeTokenV1', function () { seventyTwoHoursInSeconds ); + // transfer owner of staking to the middleware + await mockStaker.connect(stakerRole).transferPoolAdministration(1, middlewareStaker.target); + await mockStaker.connect(stakerRole).transferPoolAdministration(2, middlewareStaker.target); + // Verify total pools const totalPools = await mockStaker.TotalPools(); expect(totalPools).to.equal(3); // 2 here and 1 created in beforeEach @@ -277,74 +292,4 @@ describe('MiddlewareStakerNativeTokenV1', function () { // Attempt to unstake before cooldown period (should fail due to cooldown) await expect(middlewareStaker.connect(stakerRole).unstake(positionTokenID1, playerAddress)).to.be.reverted; }); - - it.skip('Should allow transferring positionTokenID if pool is transferable', async function () { - const NATIVE_TOKEN_TYPE = await mockStaker.NATIVE_TOKEN_TYPE(); - - // Create a transferable pool - await createPool(Number(NATIVE_TOKEN_TYPE), ZeroAddress, 0, true, 1, 1); - - const poolID = 1; - const stakeAmount = ethers.parseEther('1.0'); - const playerAddress = await user.getAddress(); - - // Stake into the transferable pool - const tx = await middlewareStaker - .connect(stakerRole) - .stakeNative(poolID, playerAddress, { value: stakeAmount }); - const receipt = await tx.wait(); - - // Parse logs to get positionTokenID - const events = receipt?.logs - .filter((log) => log.address === middlewareStaker.target) - .map((log) => middlewareStaker.interface.parseLog(log)); - - const event = events?.find((e) => e?.name === 'Staked'); - expect(event).to.not.be.undefined; - const positionTokenID = event!.args.positionTokenID; - - const currentOwner = await mockStaker.ownerOf(positionTokenID); - - expect(currentOwner).to.not.equal(middlewareStaker.target); - - // Transfer the positionTokenID from playerAddress to otherUser - await mockStaker - .connect(stakerRole) - .transferFrom(await stakerRole.getAddress(), await otherUser.getAddress(), positionTokenID); - - // Verify new owner - const newOwner = await mockStaker.ownerOf(positionTokenID); - expect(newOwner).to.equal(await otherUser.getAddress()); - }); - - it.skip('Should prevent transferring positionTokenID if pool is not transferable', async function () { - const NATIVE_TOKEN_TYPE = await mockStaker.NATIVE_TOKEN_TYPE(); - - // Create a non-transferable pool - await createPool(Number(NATIVE_TOKEN_TYPE), ZeroAddress, 0, false, 0, 0); - - const poolID = 0; - const stakeAmount = ethers.parseEther('1.0'); - const playerAddress = await user.getAddress(); - - // Stake into the non-transferable pool - const tx = await middlewareStaker - .connect(stakerRole) - .stakeNative(poolID, playerAddress, { value: stakeAmount }); - const receipt = await tx.wait(); - - // Parse logs to get positionTokenID - const events = receipt?.logs - .filter((log) => log.address === middlewareStaker.target) - .map((log) => middlewareStaker.interface.parseLog(log)); - - const event = events?.find((e) => e?.name === 'Staked'); - expect(event).to.not.be.undefined; - const positionTokenID = event!.args.positionTokenID; - - // Attempt to transfer the positionTokenID from playerAddress to otherUser - await expect( - mockStaker.connect(stakerRole).transferFrom(stakerRole, await otherUser.getAddress(), positionTokenID) - ).to.be.revertedWith('PositionNotTransferable'); - }); }); From 42c9d41815b494591cc4b6fe96e42f16abd9d9a7 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 20:28:41 +0200 Subject: [PATCH 05/12] Feat: Adding deposit functions --- contracts/accounts/Forwarder.sol | 113 ++++++++++++------------ contracts/governance/staking/Staker.sol | 5 -- test/hardhatTests/forwarder.test.ts | 51 ++++++++--- 3 files changed, 95 insertions(+), 74 deletions(-) diff --git a/contracts/accounts/Forwarder.sol b/contracts/accounts/Forwarder.sol index 1d2acdcd..098f6d46 100644 --- a/contracts/accounts/Forwarder.sol +++ b/contracts/accounts/Forwarder.sol @@ -1,39 +1,41 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol"; -/** - * @title Forwarder - * @dev Contract that automatically forwards any incoming native tokens to the parent address - * and allows flushing of ERC20 tokens. It also includes withdraw functions for admin. - */ +/// @title Forwarder +/// @notice This contract handles deposits and withdrawals of native tokens, forwarding deposits to a parent address contract Forwarder is AccessControl, Pausable, ReentrancyGuard { - using SafeERC20 for IERC20; - + /*////////////////////////////////////////////////////////////// + STATE-VARS + //////////////////////////////////////////////////////////////*/ bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - address public parentAddress; - event ForwarderDeposited(address indexed from, uint256 value); - event ERC20TokensFlushed(address indexed token, uint256 amount); + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + event ForwarderDeposited(address indexed user, address indexed payer, uint256 value); event ParentAddressUpdated(address newParentAddress); - event WithdrawnERC20(address indexed token, address indexed to, uint256 amount); - error OnlyParentAllowed(); + /*////////////////////////////////////////////////////////////// + ERRORS + //////////////////////////////////////////////////////////////*/ error ForwardFailed(); error InvalidParentAddress(); - error WithdrawFailed(); + error InsufficientBalance(); + error InvalidAmount(); + /// @notice Constructs the Forwarder contract + /// @param _parentAddress The address to which deposits will be forwarded + /// @param _admin The address that will be granted admin roles constructor(address _parentAddress, address _admin) { if (_parentAddress == address(0)) revert InvalidParentAddress(); parentAddress = _parentAddress; @@ -43,66 +45,61 @@ contract Forwarder is _grantRole(PAUSER_ROLE, _admin); } - /** - * @dev Modifier that only allows the parent address to call the function - */ - modifier onlyParent() { - if (msg.sender != parentAddress) revert OnlyParentAllowed(); - _; - } - - /** - * @dev Fallback function to receive native tokens and forward them - */ - receive() external payable { - _forwardNativeToken(msg.value); + /*////////////////////////////////////////////////////////////// + EXTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + /// @notice Allows a user to withdraw their balance + function deposit() external payable nonReentrant whenNotPaused { + if(msg.value == 0) revert InvalidAmount(); + _handleDeposit(msg.sender, msg.value); } - /** - * @dev Internal function to forward native tokens to the parent address - */ - function _forwardNativeToken(uint256 value) internal { - if (value > 0) { - (bool success, ) = parentAddress.call{value: value}(""); - if (!success) revert ForwardFailed(); - emit ForwarderDeposited(msg.sender, value); - } + /// @notice Allows a user to withdraw their balance + /// @param user The address of the user that will receive the deposit + function depositTo(address user) external payable nonReentrant whenNotPaused { + if(msg.value == 0) revert InvalidAmount(); + _handleDeposit(user, msg.value); } - /** - * @dev Function to update the parent address - * @param newParentAddress The new parent address - */ + /// @notice Updates the parent address to which deposits are forwarded + /// @param newParentAddress The new parent address function updateParentAddress(address newParentAddress) external onlyRole(ADMIN_ROLE) { if (newParentAddress == address(0)) revert InvalidParentAddress(); parentAddress = newParentAddress; emit ParentAddressUpdated(newParentAddress); } - /** - * @dev Pauses the contract - */ + /// @notice Pauses the contract function pause() external onlyRole(PAUSER_ROLE) { _pause(); } - /** - * @dev Unpauses the contract - */ + /// @notice Unpauses the contract function unpause() external onlyRole(PAUSER_ROLE) { _unpause(); } - /** - * @dev Withdraws ERC20 tokens from the contract - * @param erc20TokenAddress The address of the ERC20 token contract - * @param to The address to send the tokens to - * @param amount The amount of tokens to withdraw - */ - function withdrawERC20(address erc20TokenAddress, address to, uint256 amount) external onlyRole(ADMIN_ROLE) nonReentrant { - IERC20 erc20Token = IERC20(erc20TokenAddress); - if (erc20Token.balanceOf(address(this)) < amount) revert WithdrawFailed(); - erc20Token.safeTransfer(to, amount); - emit WithdrawnERC20(erc20TokenAddress, to, amount); + /// @notice Handles incoming native token transfers + receive() external payable whenNotPaused { + if(msg.value == 0) revert InvalidAmount(); + _handleDeposit(msg.sender, msg.value); + } + + /// @notice Allows deposits on behalf of a specified user + fallback() external payable whenNotPaused { + if(msg.value == 0) revert InvalidAmount(); + _handleDeposit(msg.sender, msg.value); + } + + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + /// @notice Handles deposits, updating balances and forwarding funds + /// @param user that will receive the deposit + /// @param amount The amount of native tokens being deposited + function _handleDeposit(address user, uint256 amount) internal { + (bool success, ) = parentAddress.call{value: amount}(""); + if (!success) revert ForwardFailed(); + emit ForwarderDeposited(user, msg.sender, amount); } } \ No newline at end of file diff --git a/contracts/governance/staking/Staker.sol b/contracts/governance/staking/Staker.sol index 8cecbfc0..fe428633 100644 --- a/contracts/governance/staking/Staker.sol +++ b/contracts/governance/staking/Staker.sol @@ -13,7 +13,6 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s import { StakingPool, Position } from "./data.sol"; import { PositionMetadata } from "./PositionMetadata.sol"; -import "hardhat/console.sol"; /** * @notice The Staker contract allows users to permissionlessly create staking pools by specifying various parameters @@ -423,10 +422,6 @@ contract Staker is ERC721Enumerable, ReentrancyGuard { address positionOwner = ownerOf(positionTokenID); - console.log("positionOwner: %s", positionOwner); - console.log("msg.sender: %s", msg.sender); - console.log("pool.administrator: %s", pool.administrator); - if (positionOwner != msg.sender && pool.administrator != msg.sender) { revert UnauthorizedForPosition(pool.administrator, msg.sender); } diff --git a/test/hardhatTests/forwarder.test.ts b/test/hardhatTests/forwarder.test.ts index 5f02da88..1399f886 100644 --- a/test/hardhatTests/forwarder.test.ts +++ b/test/hardhatTests/forwarder.test.ts @@ -1,38 +1,67 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers'; +import { Forwarder } from '../../typechain-types'; export async function setupFixture() { - const [motherWallet, admin, user, user2, user3] = await ethers.getSigners(); + const [parentWallet, admin, user, user2, user3] = await ethers.getSigners(); const Forwarder = await ethers.getContractFactory('Forwarder'); - const forwarder = await Forwarder.deploy(motherWallet, admin); + const forwarder: Forwarder = await Forwarder.deploy(parentWallet, admin); + + await forwarder.waitForDeployment(); const ERC20 = await ethers.getContractFactory('MockERC20'); const erc20 = await ERC20.deploy('ERC20TEST', 'TERC20'); const provider = ethers.provider; - return { motherWallet, erc20, admin, user, user2, user3, forwarder, provider }; + const forwarderWithAdmin = forwarder.connect(admin); + + return { parentWallet, erc20, admin, user, user2, user3, forwarder, provider, forwarderWithAdmin }; } -describe('Forwarder', function () { +describe.only('Forwarder', function () { it('Should deploy successfully a forwarder contract', async function () { const { forwarder } = await loadFixture(setupFixture); expect(await forwarder.getAddress()).to.be.properAddress; }); - it('Every deposit of native tokens should be transferred to the motherWallet', async function () { - const { forwarder, motherWallet, user, provider } = await loadFixture(setupFixture); - expect(await forwarder.parentAddress()).to.equal(motherWallet.address); - - const initialBalance = await provider.getBalance(await motherWallet.getAddress()); + it('Every transfer of native tokens should be transferred without use the deposit function to the motherWallet', async function () { + const { forwarder, parentWallet, user, provider } = await loadFixture(setupFixture); const amount = ethers.parseEther('1'); + const initialBalance = await provider.getBalance(await parentWallet.getAddress()); const tx = await user.sendTransaction({ to: forwarder.target, value: amount }); - await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user.address, amount); + await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user.address, user.address, amount); + await tx.wait(); + const finalBalance = await provider.getBalance(await parentWallet.getAddress()); + expect(finalBalance).to.equal(amount + initialBalance); + }); + + it('Call the deposit function must forward the money to the parent wallet if I call it as user correctly', async function () { + const { forwarder, parentWallet, user, provider } = await loadFixture(setupFixture); + + const forwarderWithUser = forwarder.connect(user); + const amount = ethers.parseEther('1'); + const initialBalance = await provider.getBalance(await parentWallet.getAddress()); + const tx = await forwarderWithUser.deposit({ value: amount }); + await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user.address, user.address, amount); + await tx.wait(); + const finalBalance = await provider.getBalance(await parentWallet.getAddress()); + expect(finalBalance).to.equal(amount + initialBalance); + }); + + it('Call the depositTo function must work if I do it as an external payer', async function () { + const { forwarder, parentWallet, user, provider, user2 } = await loadFixture(setupFixture); + + const forwarderWithUser1 = forwarder.connect(user); + const amount = ethers.parseEther('1'); + const initialBalance = await provider.getBalance(await parentWallet.getAddress()); + const tx = await forwarderWithUser1.depositTo(user2, { value: amount }); + await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user2.address, user.address, amount); await tx.wait(); - const finalBalance = await provider.getBalance(await motherWallet.getAddress()); + const finalBalance = await provider.getBalance(await parentWallet.getAddress()); expect(finalBalance).to.equal(amount + initialBalance); }); }); From 6d3ebbfad3ea9d3fe435c528142edd9244fb3b22 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 20:53:44 +0200 Subject: [PATCH 06/12] Tests: Adding more unit tests to our forwarder and improving checks --- contracts/accounts/Forwarder.sol | 38 +++++++--- test/hardhatTests/forwarder.test.ts | 104 ++++++++++++++++++++++++++-- 2 files changed, 127 insertions(+), 15 deletions(-) diff --git a/contracts/accounts/Forwarder.sol b/contracts/accounts/Forwarder.sol index 098f6d46..073df8c6 100644 --- a/contracts/accounts/Forwarder.sol +++ b/contracts/accounts/Forwarder.sol @@ -6,7 +6,7 @@ import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.s import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol"; /// @title Forwarder -/// @notice This contract handles deposits and withdrawals of native tokens, forwarding deposits to a parent address +/// @notice This contract handles deposits of native tokens, forwarding deposits to a parent address contract Forwarder is AccessControl, Pausable, @@ -18,12 +18,23 @@ contract Forwarder is bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); address public parentAddress; + mapping(address => uint256) public deposits; + uint256 public minDeposit = 0.00001 ether; /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ - event ForwarderDeposited(address indexed user, address indexed payer, uint256 value); + event ForwarderDeposited(address indexed user, address indexed payer, uint256 value, address indexed parentAddress); event ParentAddressUpdated(address newParentAddress); + event MinDepositUpdated(uint256 newMinDeposit); + + /*////////////////////////////////////////////////////////////// + MODIFIERS + //////////////////////////////////////////////////////////////*/ + modifier validDeposit() { + if(msg.value < minDeposit) revert InvalidAmount(); + _; + } /*////////////////////////////////////////////////////////////// ERRORS @@ -32,6 +43,7 @@ contract Forwarder is error InvalidParentAddress(); error InsufficientBalance(); error InvalidAmount(); + error InvalidMinDeposit(); /// @notice Constructs the Forwarder contract /// @param _parentAddress The address to which deposits will be forwarded @@ -49,15 +61,13 @@ contract Forwarder is EXTERNAL FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice Allows a user to withdraw their balance - function deposit() external payable nonReentrant whenNotPaused { - if(msg.value == 0) revert InvalidAmount(); + function deposit() external payable nonReentrant whenNotPaused validDeposit { _handleDeposit(msg.sender, msg.value); } /// @notice Allows a user to withdraw their balance /// @param user The address of the user that will receive the deposit - function depositTo(address user) external payable nonReentrant whenNotPaused { - if(msg.value == 0) revert InvalidAmount(); + function depositTo(address user) external payable nonReentrant whenNotPaused validDeposit { _handleDeposit(user, msg.value); } @@ -69,6 +79,14 @@ contract Forwarder is emit ParentAddressUpdated(newParentAddress); } + /// @notice Updates the minimum deposit amount + /// @param newMinDeposit The new minimum deposit amount + function updateMinDeposit(uint256 newMinDeposit) external onlyRole(ADMIN_ROLE) { + if (newMinDeposit == 0) revert InvalidMinDeposit(); + minDeposit = newMinDeposit; + emit MinDepositUpdated(newMinDeposit); + } + /// @notice Pauses the contract function pause() external onlyRole(PAUSER_ROLE) { _pause(); @@ -80,14 +98,12 @@ contract Forwarder is } /// @notice Handles incoming native token transfers - receive() external payable whenNotPaused { - if(msg.value == 0) revert InvalidAmount(); + receive() external payable whenNotPaused validDeposit { _handleDeposit(msg.sender, msg.value); } /// @notice Allows deposits on behalf of a specified user - fallback() external payable whenNotPaused { - if(msg.value == 0) revert InvalidAmount(); + fallback() external payable whenNotPaused validDeposit { _handleDeposit(msg.sender, msg.value); } @@ -100,6 +116,6 @@ contract Forwarder is function _handleDeposit(address user, uint256 amount) internal { (bool success, ) = parentAddress.call{value: amount}(""); if (!success) revert ForwardFailed(); - emit ForwarderDeposited(user, msg.sender, amount); + emit ForwarderDeposited(user, msg.sender, amount, parentAddress); } } \ No newline at end of file diff --git a/test/hardhatTests/forwarder.test.ts b/test/hardhatTests/forwarder.test.ts index 1399f886..27ba2e90 100644 --- a/test/hardhatTests/forwarder.test.ts +++ b/test/hardhatTests/forwarder.test.ts @@ -21,7 +21,7 @@ export async function setupFixture() { return { parentWallet, erc20, admin, user, user2, user3, forwarder, provider, forwarderWithAdmin }; } -describe.only('Forwarder', function () { +describe('Forwarder', function () { it('Should deploy successfully a forwarder contract', async function () { const { forwarder } = await loadFixture(setupFixture); expect(await forwarder.getAddress()).to.be.properAddress; @@ -33,7 +33,9 @@ describe.only('Forwarder', function () { const amount = ethers.parseEther('1'); const initialBalance = await provider.getBalance(await parentWallet.getAddress()); const tx = await user.sendTransaction({ to: forwarder.target, value: amount }); - await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user.address, user.address, amount); + await expect(tx) + .to.emit(forwarder, 'ForwarderDeposited') + .withArgs(user.address, user.address, amount, parentWallet); await tx.wait(); const finalBalance = await provider.getBalance(await parentWallet.getAddress()); expect(finalBalance).to.equal(amount + initialBalance); @@ -46,7 +48,9 @@ describe.only('Forwarder', function () { const amount = ethers.parseEther('1'); const initialBalance = await provider.getBalance(await parentWallet.getAddress()); const tx = await forwarderWithUser.deposit({ value: amount }); - await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user.address, user.address, amount); + await expect(tx) + .to.emit(forwarder, 'ForwarderDeposited') + .withArgs(user.address, user.address, amount, parentWallet); await tx.wait(); const finalBalance = await provider.getBalance(await parentWallet.getAddress()); expect(finalBalance).to.equal(amount + initialBalance); @@ -59,9 +63,101 @@ describe.only('Forwarder', function () { const amount = ethers.parseEther('1'); const initialBalance = await provider.getBalance(await parentWallet.getAddress()); const tx = await forwarderWithUser1.depositTo(user2, { value: amount }); - await expect(tx).to.emit(forwarder, 'ForwarderDeposited').withArgs(user2.address, user.address, amount); + await expect(tx) + .to.emit(forwarder, 'ForwarderDeposited') + .withArgs(user2.address, user.address, amount, parentWallet); await tx.wait(); const finalBalance = await provider.getBalance(await parentWallet.getAddress()); expect(finalBalance).to.equal(amount + initialBalance); }); + + it('Should revert when trying to deposit 0 amount', async function () { + const { forwarder, user } = await loadFixture(setupFixture); + const forwarderWithUser = forwarder.connect(user); + await expect(forwarderWithUser.deposit({ value: 0 })).to.be.revertedWithCustomError(forwarder, 'InvalidAmount'); + }); + + it('Should revert when trying to depositTo with 0 amount', async function () { + const { forwarder, user, user2 } = await loadFixture(setupFixture); + const forwarderWithUser = forwarder.connect(user); + await expect(forwarderWithUser.depositTo(user2.address, { value: 0 })).to.be.revertedWithCustomError( + forwarder, + 'InvalidAmount' + ); + }); + + it('Should allow admin to update parent address', async function () { + const { forwarderWithAdmin, user } = await loadFixture(setupFixture); + const newParentAddress = user.address; + await expect(forwarderWithAdmin.updateParentAddress(newParentAddress)) + .to.emit(forwarderWithAdmin, 'ParentAddressUpdated') + .withArgs(newParentAddress); + expect(await forwarderWithAdmin.parentAddress()).to.equal(newParentAddress); + }); + + it('Should revert when non-admin tries to update parent address', async function () { + const { forwarder, user } = await loadFixture(setupFixture); + const forwarderWithUser = forwarder.connect(user); + await expect(forwarderWithUser.updateParentAddress(user.address)).to.be.reverted; + }); + + it('Should revert when trying to update parent address to zero address', async function () { + const { forwarderWithAdmin } = await loadFixture(setupFixture); + await expect(forwarderWithAdmin.updateParentAddress(ethers.ZeroAddress)).to.be.revertedWithCustomError( + forwarderWithAdmin, + 'InvalidParentAddress' + ); + }); + + it('Should allow pauser to pause the contract', async function () { + const { forwarderWithAdmin } = await loadFixture(setupFixture); + await expect(forwarderWithAdmin.pause()).to.not.be.reverted; + expect(await forwarderWithAdmin.paused()).to.be.true; + }); + + it('Should allow pauser to unpause the contract', async function () { + const { forwarderWithAdmin } = await loadFixture(setupFixture); + await forwarderWithAdmin.pause(); + await expect(forwarderWithAdmin.unpause()).to.not.be.reverted; + expect(await forwarderWithAdmin.paused()).to.be.false; + }); + + it('Should revert when non-pauser tries to pause the contract', async function () { + const { forwarder, user } = await loadFixture(setupFixture); + const forwarderWithUser = forwarder.connect(user); + await expect(forwarderWithUser.pause()).to.be.reverted; + }); + + it('Should revert deposits when contract is paused', async function () { + const { forwarderWithAdmin, user } = await loadFixture(setupFixture); + await forwarderWithAdmin.pause(); + const forwarderWithUser = forwarderWithAdmin.connect(user); + await expect(forwarderWithUser.deposit({ value: ethers.parseEther('1') })).to.be.revertedWithCustomError( + forwarderWithUser, + 'EnforcedPause' + ); + }); + + it('Should handle receive function correctly', async function () { + const { forwarder, user, parentWallet, provider } = await loadFixture(setupFixture); + const amount = ethers.parseEther('1'); + const initialBalance = await provider.getBalance(parentWallet.address); + await expect(user.sendTransaction({ to: forwarder.target, value: amount })) + .to.emit(forwarder, 'ForwarderDeposited') + .withArgs(user.address, user.address, amount, parentWallet); + const finalBalance = await provider.getBalance(parentWallet.address); + expect(finalBalance).to.equal(initialBalance + amount); + }); + + it('Should handle fallback function correctly', async function () { + const { forwarder, user, parentWallet, provider } = await loadFixture(setupFixture); + const amount = ethers.parseEther('1'); + const initialBalance = await provider.getBalance(parentWallet.address); + const data = '0x1234'; // Some non-empty calldata + await expect(user.sendTransaction({ to: forwarder.target, value: amount, data })) + .to.emit(forwarder, 'ForwarderDeposited') + .withArgs(user.address, user.address, amount, parentWallet); + const finalBalance = await provider.getBalance(parentWallet.address); + expect(finalBalance).to.equal(initialBalance + amount); + }); }); From 1c800f3907cf73ffb7a6501e969be18cba6a1914 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 21:04:13 +0200 Subject: [PATCH 07/12] Chore: Adding mocha types to the eslint env --- .eslintrc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index d0e8903c..dec0c7a1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,6 +15,7 @@ module.exports = { browser: true, es6: true, node: true, + mocha: true, }, extends: [ 'plugin:import/errors', @@ -39,7 +40,10 @@ module.exports = { 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'warn', 'unused-imports/no-unused-imports-ts': 'warn', - 'unused-imports/no-unused-vars-ts': ['error', { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }], + 'unused-imports/no-unused-vars-ts': [ + 'error', + { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }, + ], '@typescript-eslint/no-use-before-define': ['error'], '@typescript-eslint/no-unsafe-member-access': 0, '@typescript-eslint/no-unsafe-assignment': 0, From f0625242f62b4df74ac90ab9d95f73247d7d605d Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 21:35:25 +0200 Subject: [PATCH 08/12] Chore: Updating ascii logos --- constants/constructor-args.ts | 11 +++++ constants/contract.ts | 3 ++ .../deployments/deployments-g7-testnet.ts | 14 +++++++ contracts/Tokens/Martins.sol | 38 +++++++++-------- contracts/accounts/Forwarder.sol | 20 +++++++++ contracts/accounts/SmartAccount.sol | 21 ++++++++++ contracts/airdrops/FreeMint.sol | 42 ++++++++++--------- contracts/bridges/ERC20Bridge.sol | 40 +++++++++--------- contracts/ercs/AchievoProxy.sol | 2 - contracts/ercs/ERCWhitelistSignature.sol | 38 ++++++++--------- .../ercs/extensions/Achievo1155Soulbound.sol | 32 +++++++------- .../ercs/extensions/Achievo721Soulbound.sol | 32 +++++++------- contracts/games/AvatarBound.sol | 36 ++++++++-------- contracts/games/GameSummary.sol | 36 ++++++++-------- contracts/games/LevelsBound.sol | 38 +++++++++-------- contracts/governance/Whitelist.sol | 36 ++++++++-------- contracts/interfaces/IItemBound.sol | 32 +++++++------- contracts/interfaces/IMarketplace.sol | 36 ++++++++-------- contracts/interfaces/IOpenMint.sol | 32 +++++++------- contracts/interfaces/ISoulbound1155.sol | 32 +++++++------- contracts/libraries/LibGameSummary.sol | 32 +++++++------- contracts/libraries/LibItems.sol | 32 +++++++------- contracts/libraries/LibSoulbound1155.sol | 32 +++++++------- contracts/mocks/Mock1155Soulbound.sol | 32 +++++++------- contracts/mocks/Mock721Soulbound.sol | 32 +++++++------- contracts/mocks/MockERC1155Receiver.sol | 32 +++++++------- contracts/mocks/MockERC721Receiver.sol | 32 +++++++------- contracts/mocks/MockErc1155.sol | 32 +++++++------- contracts/mocks/MockErc20.sol | 38 +++++++++-------- contracts/mocks/MockErc721.sol | 32 +++++++------- contracts/mocks/MockRoyaltyEngineV1.sol | 32 +++++++------- contracts/mocks/MockUSDC.sol | 32 +++++++------- .../soulbounds/AdminERC1155Soulbound.sol | 38 +++++++++-------- .../soulbounds/ERC1155RoyaltiesSoulbound.sol | 38 +++++++++-------- contracts/soulbounds/ERC1155Soulbound.sol | 38 +++++++++-------- contracts/soulbounds/ERC721Soulbound.sol | 36 ++++++++-------- contracts/soulbounds/LootDrop.sol | 38 +++++++++-------- .../upgradeables/bridges/ERC20BridgeV1.sol | 38 +++++++++-------- .../ercs/ERCWhitelistSignatureUpgradeable.sol | 38 +++++++++-------- .../Achievo1155SoulboundUpgradeable.sol | 38 +++++++++-------- .../Achievo721SoulboundUpgradeable.sol | 38 +++++++++-------- .../upgradeables/games/AvatarBoundV1.sol | 38 +++++++++-------- .../upgradeables/games/LevelsBoundV1.sol | 38 +++++++++-------- .../upgradeables/games/LevelsBoundV2.sol | 38 +++++++++-------- .../upgradeables/governance/ERC20StakeV1.sol | 32 +++++++------- .../marketplace/entrypoint/Marketplace.sol | 32 +++++++------- .../ERC1155RoyaltiesSoulboundV1.sol | 36 ++++++++-------- .../ERC1155RoyaltiesSoulboundV2.sol | 36 ++++++++-------- .../soulbounds/ERC1155SoulboundV1.sol | 38 +++++++++-------- .../soulbounds/ERC721SoulboundV1.sol | 38 +++++++++-------- .../upgradeables/tokens/BurnableTokenV1.sol | 32 +++++++------- 51 files changed, 922 insertions(+), 737 deletions(-) diff --git a/constants/constructor-args.ts b/constants/constructor-args.ts index 6dd1d67d..42c231e4 100644 --- a/constants/constructor-args.ts +++ b/constants/constructor-args.ts @@ -427,6 +427,17 @@ export const MiddlewareNativeTokenStakerArgs = { }, }; +export const ForwarderArgs = { + MAINNET: { + parentWallet: 'DEPLOYER_WALLET', + admin: 'DEPLOYER_WALLET', + }, + TESTNET: { + parentWallet: 'DEPLOYER_WALLET', + admin: 'DEPLOYER_WALLET', + }, +}; + export const EnglishAuctionsExtensionArgs = { MAINNET: { // _nativeTokenWrapper: 'FILL_ME', diff --git a/constants/contract.ts b/constants/contract.ts index 242d5dda..527209f9 100644 --- a/constants/contract.ts +++ b/constants/contract.ts @@ -21,6 +21,7 @@ export enum CONTRACT_TYPE { EnglishAuctionsExtension = 'EnglishAuctionsExtension', OffersExtension = 'OffersExtension', DirectListingsAddonExtension = 'DirectListingsAddonExtension', + Forwarder = 'Forwarder', } export enum PROXY_CONTRACT_TYPE { @@ -60,6 +61,7 @@ export enum CONTRACT_FILE_NAME { OffersExtension = 'OffersLogic', DirectListingsAddonExtension = 'DirectListingsAddon', Martins = 'Martins', + Forwarder = 'Forwarder', } export enum CONTRACT_UPGRADABLE_FILE_NAME { @@ -106,6 +108,7 @@ export enum CONTRACT_NAME { DirectListingsAddonExtension = 'DirectListingsAddonExtension', Staker = 'Staker', MiddlewareStaker = 'MiddlewareStakerG7', + Forwarder = 'Forwarder', } export enum CONTRACT_UPGRADABLE_NAME { diff --git a/constants/deployments/deployments-g7-testnet.ts b/constants/deployments/deployments-g7-testnet.ts index ce9c2a6c..9dadb706 100644 --- a/constants/deployments/deployments-g7-testnet.ts +++ b/constants/deployments/deployments-g7-testnet.ts @@ -2,6 +2,7 @@ import { AvatarBoundArgs, AvatarBoundV1Args, ERC20Args, + ForwarderArgs, ItemBoundArgs, LevelsBoundArgs, LevelsBoundV1Args, @@ -224,4 +225,17 @@ export const G7_TESTNET_CONTRACTS: DeploymentContract[] = [ functionCalls: [], args: MiddlewareNativeTokenStakerArgs.TESTNET, }, + { + contractFileName: CONTRACT_FILE_NAME.Forwarder, + type: CONTRACT_TYPE.Forwarder, + name: CONTRACT_NAME.Forwarder, + chain, + networkType, + tenants: [TENANT.Game7], + verify: true, + upgradable: false, + dependencies: [], + functionCalls: [], + args: ForwarderArgs.TESTNET, + }, ]; diff --git a/contracts/Tokens/Martins.sol b/contracts/Tokens/Martins.sol index e3caaf7f..02555158 100644 --- a/contracts/Tokens/Martins.sol +++ b/contracts/Tokens/Martins.sol @@ -2,24 +2,26 @@ ///@notice This contract is for mock for WETH token. pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; diff --git a/contracts/accounts/Forwarder.sol b/contracts/accounts/Forwarder.sol index 073df8c6..1f3311ce 100644 --- a/contracts/accounts/Forwarder.sol +++ b/contracts/accounts/Forwarder.sol @@ -5,6 +5,26 @@ import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol" import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol"; +// @author summon Team - https://summon.xyz +// @contributors: [@ogarciarevett] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... + + /// @title Forwarder /// @notice This contract handles deposits of native tokens, forwarding deposits to a parent address contract Forwarder is diff --git a/contracts/accounts/SmartAccount.sol b/contracts/accounts/SmartAccount.sol index faaf6e30..626eb852 100644 --- a/contracts/accounts/SmartAccount.sol +++ b/contracts/accounts/SmartAccount.sol @@ -9,6 +9,27 @@ import { IEntryPoint } from "@account-abstraction/contracts/interfaces/IEntryPoi import { IAccount } from "@account-abstraction/contracts/interfaces/IAccount.sol"; import { PackedUserOperation } from "@account-abstraction/contracts/interfaces/PackedUserOperation.sol"; + +// @author summon Team - https://summon.xyz +// @contributors: [@ogarciarevett] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... + + contract CitizenAccount is IAccount, Ownable { /*////////////////////////////////////////////////////////////// STATE VARS diff --git a/contracts/airdrops/FreeMint.sol b/contracts/airdrops/FreeMint.sol index 88473ac4..74d554c0 100644 --- a/contracts/airdrops/FreeMint.sol +++ b/contracts/airdrops/FreeMint.sol @@ -1,25 +1,27 @@ // SPDX-License-Identifier: MIT // To check the terms and conditions look for the file with hash QmW1YKgTAZmm92WUcPS9XzMAYXtFVUvDCNGNfEFJQJ1hBv on any IPFS node -pragma solidity ^0.8.17; - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ +pragma solidity ^0.8.24; + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... + + import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; diff --git a/contracts/bridges/ERC20Bridge.sol b/contracts/bridges/ERC20Bridge.sol index 74f9dd5a..50777026 100644 --- a/contracts/bridges/ERC20Bridge.sol +++ b/contracts/bridges/ERC20Bridge.sol @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; - -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +pragma solidity ^0.8.24; + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "../interfaces/IERC20Decimals.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; diff --git a/contracts/ercs/AchievoProxy.sol b/contracts/ercs/AchievoProxy.sol index f15406a1..a6828aef 100644 --- a/contracts/ercs/AchievoProxy.sol +++ b/contracts/ercs/AchievoProxy.sol @@ -1,8 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.17; -/// @author omar@game7.io - import "@openzeppelin/contracts/proxy/Proxy.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/StorageSlot.sol"; diff --git a/contracts/ercs/ERCWhitelistSignature.sol b/contracts/ercs/ERCWhitelistSignature.sol index 90e9680d..7821d2ca 100644 --- a/contracts/ercs/ERCWhitelistSignature.sol +++ b/contracts/ercs/ERCWhitelistSignature.sol @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; diff --git a/contracts/ercs/extensions/Achievo1155Soulbound.sol b/contracts/ercs/extensions/Achievo1155Soulbound.sol index 09d20e4a..ad0408bd 100644 --- a/contracts/ercs/extensions/Achievo1155Soulbound.sol +++ b/contracts/ercs/extensions/Achievo1155Soulbound.sol @@ -5,20 +5,24 @@ pragma solidity ^0.8.17; * Author: Achievo Team - (https://achievo.xyz/) */ -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... contract Achievo1155Soulbound { mapping(address => bool) internal _soulboundAddresses; // mid gas usage diff --git a/contracts/ercs/extensions/Achievo721Soulbound.sol b/contracts/ercs/extensions/Achievo721Soulbound.sol index 645f5ea0..4efd6ac2 100644 --- a/contracts/ercs/extensions/Achievo721Soulbound.sol +++ b/contracts/ercs/extensions/Achievo721Soulbound.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... /* * Author: Achievo Team - (https://achievo.xyz/) diff --git a/contracts/games/AvatarBound.sol b/contracts/games/AvatarBound.sol index 1189c59d..93599f48 100644 --- a/contracts/games/AvatarBound.sol +++ b/contracts/games/AvatarBound.sol @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { ERC721URIStorage } from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; diff --git a/contracts/games/GameSummary.sol b/contracts/games/GameSummary.sol index 6d66e2c1..755ef32d 100644 --- a/contracts/games/GameSummary.sol +++ b/contracts/games/GameSummary.sol @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/games/LevelsBound.sol b/contracts/games/LevelsBound.sol index 3dbe015c..a336865b 100644 --- a/contracts/games/LevelsBound.sol +++ b/contracts/games/LevelsBound.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... + + import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/contracts/governance/Whitelist.sol b/contracts/governance/Whitelist.sol index dd0fd1c9..04d555db 100644 --- a/contracts/governance/Whitelist.sol +++ b/contracts/governance/Whitelist.sol @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; diff --git a/contracts/interfaces/IItemBound.sol b/contracts/interfaces/IItemBound.sol index 8fef9759..22a9014b 100644 --- a/contracts/interfaces/IItemBound.sol +++ b/contracts/interfaces/IItemBound.sol @@ -1,19 +1,23 @@ // SPDX-License-Identifier: UNLICENSED -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... pragma solidity ^0.8.17; import "../libraries/LibItems.sol"; diff --git a/contracts/interfaces/IMarketplace.sol b/contracts/interfaces/IMarketplace.sol index 0d87c57a..aab9dcc7 100644 --- a/contracts/interfaces/IMarketplace.sol +++ b/contracts/interfaces/IMarketplace.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... interface IDirectListingsAddon { /// @notice Emitted when NFTs are bought from a listing. diff --git a/contracts/interfaces/IOpenMint.sol b/contracts/interfaces/IOpenMint.sol index a699452c..fbe937e3 100644 --- a/contracts/interfaces/IOpenMint.sol +++ b/contracts/interfaces/IOpenMint.sol @@ -1,19 +1,23 @@ // SPDX-License-Identifier: MIT -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... pragma solidity ^0.8.17; diff --git a/contracts/interfaces/ISoulbound1155.sol b/contracts/interfaces/ISoulbound1155.sol index 71da6a36..f2a5066a 100644 --- a/contracts/interfaces/ISoulbound1155.sol +++ b/contracts/interfaces/ISoulbound1155.sol @@ -1,19 +1,23 @@ // SPDX-License-Identifier: MIT -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... pragma solidity ^0.8.17; diff --git a/contracts/libraries/LibGameSummary.sol b/contracts/libraries/LibGameSummary.sol index 093520e8..1656ce09 100644 --- a/contracts/libraries/LibGameSummary.sol +++ b/contracts/libraries/LibGameSummary.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... library LibGameSummary { struct GameSummaryCreate { diff --git a/contracts/libraries/LibItems.sol b/contracts/libraries/LibItems.sol index 5dbd3e7b..09be7b32 100644 --- a/contracts/libraries/LibItems.sol +++ b/contracts/libraries/LibItems.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... library LibItems { struct Tier { diff --git a/contracts/libraries/LibSoulbound1155.sol b/contracts/libraries/LibSoulbound1155.sol index adfad17e..f86c80a8 100644 --- a/contracts/libraries/LibSoulbound1155.sol +++ b/contracts/libraries/LibSoulbound1155.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... library LibSoulbound1155 { struct TokenCreate { diff --git a/contracts/mocks/Mock1155Soulbound.sol b/contracts/mocks/Mock1155Soulbound.sol index 7edf5b37..db38f8dc 100644 --- a/contracts/mocks/Mock1155Soulbound.sol +++ b/contracts/mocks/Mock1155Soulbound.sol @@ -2,20 +2,24 @@ ///@notice This contract is for mock for 1155Soulbound token. pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/mocks/Mock721Soulbound.sol b/contracts/mocks/Mock721Soulbound.sol index f6cfe8d4..815ee633 100644 --- a/contracts/mocks/Mock721Soulbound.sol +++ b/contracts/mocks/Mock721Soulbound.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { Achievo721Soulbound } from "../ercs/extensions/Achievo721Soulbound.sol"; diff --git a/contracts/mocks/MockERC1155Receiver.sol b/contracts/mocks/MockERC1155Receiver.sol index 9196eddd..f238646d 100644 --- a/contracts/mocks/MockERC1155Receiver.sol +++ b/contracts/mocks/MockERC1155Receiver.sol @@ -4,19 +4,23 @@ pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... contract MockERC1155Receiver is ERC1155Holder {} diff --git a/contracts/mocks/MockERC721Receiver.sol b/contracts/mocks/MockERC721Receiver.sol index 77d5bbf2..c83125c9 100644 --- a/contracts/mocks/MockERC721Receiver.sol +++ b/contracts/mocks/MockERC721Receiver.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; diff --git a/contracts/mocks/MockErc1155.sol b/contracts/mocks/MockErc1155.sol index 27dbcf65..a3ccfa90 100644 --- a/contracts/mocks/MockErc1155.sol +++ b/contracts/mocks/MockErc1155.sol @@ -2,20 +2,24 @@ ///@notice This contract is for mock for ERC1155 token. pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/mocks/MockErc20.sol b/contracts/mocks/MockErc20.sol index 4d68033e..a57ed57e 100644 --- a/contracts/mocks/MockErc20.sol +++ b/contracts/mocks/MockErc20.sol @@ -2,24 +2,26 @@ ///@notice This contract is for mock for WETH token. pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; diff --git a/contracts/mocks/MockErc721.sol b/contracts/mocks/MockErc721.sol index d2fba48b..d44492b1 100644 --- a/contracts/mocks/MockErc721.sol +++ b/contracts/mocks/MockErc721.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; diff --git a/contracts/mocks/MockRoyaltyEngineV1.sol b/contracts/mocks/MockRoyaltyEngineV1.sol index adde99aa..3bc2e3cd 100644 --- a/contracts/mocks/MockRoyaltyEngineV1.sol +++ b/contracts/mocks/MockRoyaltyEngineV1.sol @@ -1,20 +1,24 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import {IRoyaltyEngineV1} from "../interfaces/IRoyaltyEngineV1.sol"; diff --git a/contracts/mocks/MockUSDC.sol b/contracts/mocks/MockUSDC.sol index 94f62942..acfa22e5 100644 --- a/contracts/mocks/MockUSDC.sol +++ b/contracts/mocks/MockUSDC.sol @@ -2,20 +2,24 @@ pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/contracts/soulbounds/AdminERC1155Soulbound.sol b/contracts/soulbounds/AdminERC1155Soulbound.sol index 295e3342..8b53f4c1 100644 --- a/contracts/soulbounds/AdminERC1155Soulbound.sol +++ b/contracts/soulbounds/AdminERC1155Soulbound.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol b/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol index 0bdae6b3..c49fcf44 100644 --- a/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol +++ b/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/soulbounds/ERC1155Soulbound.sol b/contracts/soulbounds/ERC1155Soulbound.sol index aa9b2deb..0864779b 100644 --- a/contracts/soulbounds/ERC1155Soulbound.sol +++ b/contracts/soulbounds/ERC1155Soulbound.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/soulbounds/ERC721Soulbound.sol b/contracts/soulbounds/ERC721Soulbound.sol index 4d28b92d..1b2c1a38 100644 --- a/contracts/soulbounds/ERC721Soulbound.sol +++ b/contracts/soulbounds/ERC721Soulbound.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { ERC721URIStorage } from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; diff --git a/contracts/soulbounds/LootDrop.sol b/contracts/soulbounds/LootDrop.sol index 619129de..831f3613 100644 --- a/contracts/soulbounds/LootDrop.sol +++ b/contracts/soulbounds/LootDrop.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; diff --git a/contracts/upgradeables/bridges/ERC20BridgeV1.sol b/contracts/upgradeables/bridges/ERC20BridgeV1.sol index be098847..fad77bf3 100644 --- a/contracts/upgradeables/bridges/ERC20BridgeV1.sol +++ b/contracts/upgradeables/bridges/ERC20BridgeV1.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "../../interfaces/IERC20Decimals.sol"; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; diff --git a/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol b/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol index b1247b6d..10461d4c 100644 --- a/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol +++ b/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; diff --git a/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol b/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol index a09809ee..6095377f 100644 --- a/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol +++ b/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol b/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol index 19478549..df2a0a46 100644 --- a/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol +++ b/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/contracts/upgradeables/games/AvatarBoundV1.sol b/contracts/upgradeables/games/AvatarBoundV1.sol index 53a31869..6df6b75d 100644 --- a/contracts/upgradeables/games/AvatarBoundV1.sol +++ b/contracts/upgradeables/games/AvatarBoundV1.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import { ERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; diff --git a/contracts/upgradeables/games/LevelsBoundV1.sol b/contracts/upgradeables/games/LevelsBoundV1.sol index 1a79ffa1..130e53a1 100644 --- a/contracts/upgradeables/games/LevelsBoundV1.sol +++ b/contracts/upgradeables/games/LevelsBoundV1.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { ERC1155Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; diff --git a/contracts/upgradeables/games/LevelsBoundV2.sol b/contracts/upgradeables/games/LevelsBoundV2.sol index ce7d7348..42498629 100644 --- a/contracts/upgradeables/games/LevelsBoundV2.sol +++ b/contracts/upgradeables/games/LevelsBoundV2.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { ERC1155Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; diff --git a/contracts/upgradeables/governance/ERC20StakeV1.sol b/contracts/upgradeables/governance/ERC20StakeV1.sol index 3af78272..6186ff8b 100644 --- a/contracts/upgradeables/governance/ERC20StakeV1.sol +++ b/contracts/upgradeables/governance/ERC20StakeV1.sol @@ -6,20 +6,24 @@ pragma solidity ^0.8.17; * Co-Authors: */ -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "../../interfaces/IERC20Decimals.sol"; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; diff --git a/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol b/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol index 10b33769..cdcf7bf4 100644 --- a/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol +++ b/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol @@ -3,20 +3,24 @@ pragma solidity ^0.8.17; /// @author omar@game7.io -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... // ====== External imports ====== import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; diff --git a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol index d299079d..c273ce87 100644 --- a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol @@ -1,26 +1,28 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ + //TODO: This contract is deprecated USE THE ERC1155SoulboundV1.sol -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { ERC1155Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; diff --git a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol index 98c60da5..f46135c6 100644 --- a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol +++ b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol @@ -1,26 +1,28 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ + //TODO: This contract is deprecated USE THE ERC1155SoulboundV1.sol -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { ERC1155Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; diff --git a/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol index 968b6edc..806cf676 100644 --- a/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { ERC1155Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; diff --git a/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol index 43204a5c..8353c569 100644 --- a/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol @@ -1,24 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -/** - * Author: Achievo Team - (https://achievo.xyz/) - */ - -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/contracts/upgradeables/tokens/BurnableTokenV1.sol b/contracts/upgradeables/tokens/BurnableTokenV1.sol index 00a41af5..20a6f29c 100644 --- a/contracts/upgradeables/tokens/BurnableTokenV1.sol +++ b/contracts/upgradeables/tokens/BurnableTokenV1.sol @@ -2,20 +2,24 @@ pragma solidity ^0.8.17; -// MMMMNkc. .,oKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MWXd,. .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// Wx' .cKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// x. ;KMMMMMMMMMMMMWKxlcclxKWMMMMMMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkccxWMWKdccccccccccccoKMM0l:l0MMMMMMMMMWkc:dXMMMXkoc::::::clxKW -// ' lNMMMMMMMMMMNd. .. .dNMMMMMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .''''''''';OMMX: ,0MMMMMMMWk. oNMWk' ........ .o -// . :XMMMMMMMMMWd. .o00l. .dWMMMMWx. .o0KKXKKXXXXNMMM0' oNWWWWWWWk. .kMMN: :NMNc .kNNNNNNNNNNWMMM0, :XMMMMMM0, cXMMO. c0KKKKXK0o. -// , .lkxo. ;dkx, oWMMMMMMMMWk. oNMMNo. .kWMMMWl ;KMMMMMMMMMMMMMM0' .',',,,,,. .kMMN: :NMNc ,:;;;;;;dXMMMMMMO. lNMMMMK: ;KMMMd. .OMMMMMMMMX; -// : :KWX: .xMWx. .kMMMMMMMMM0' cXMMMMXc ,0MMMWl ;KMMMMMMMMMMMMMM0' .',,'',,,. .kMMN: :NMNc ',,;;,;;oXMMMMMMWx. .dWMMNc 'OMMMMd. .OMMMMMMMMX; -// l ,0WO:oXWd. .OMMMMMMMMK; ;KMMMMMMK; :KMMWd. .o0KKXXKKKXXNMMM0' oNWWWWWWWx. .kMMN: :XMNc .kNNNNNNNNWWWMMMMMNo. .dK0l. .xWMMMMO. .c0KKKXXK0o. -// o dWMWWMK, '0MMMMMMMXc 'OMMMMMMMMO' cNMMNd. ..........oWMM0' oWMMMMMMMk. .kMMN: :XMNl .,,,,,,,,,:0MMMMMMNo. .. 'xWMMMMMWx' ....... .o -// O' :XMMMMk. cXMMMMMMMKo:cOWMMMMMMMMWOc:oKMMMWKxlc::::::::ckWMMXd:cOMMMMMMMMKo:oKMMWkc:xWMWKoc:::::::::::lKMMMMMMMWKdlcclxXWMMMMMMMMXkoc::::::clxKW -// WO; 'OMMMWl .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMNx'.dWMMK;.:0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -// MMMM0cdNMM0cdNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM +// @author summon Team - https://summon.xyz +// @contributors: [ @ogarciarevett, @vasinl124] +//.................................................................................................................................................... +//....................&&&&&&.......................................................................................................................... +//..................&&&&&&&&&&&....................................................................................................................... +//..............X.....&&&&&&&&&&&&.................................................................................................................... +//............&&&&&&.....&&&&&&&&&&&.................................................................................................................. +//............&&&&&&&&&.....&&&&&..................................................................................................................... +//............&&&&&&&&&&&&.........&.............&&&&&&&&&&&&..&&&&....&&&&.&&&&&&&&..&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&&&&&.&&&&&....&&&&........... +//...............&&&&&&&&&&&&.....&&$............&&&&..........&&&&....&&&&.&&&&&&&&.&&&&&&&&..&&&&&&&&.&&&&&&&&.&&&&&&&&&&&&.&&&&&&&..&&&&........... +//............&.....&&&&&&&&&&&&..................&&&&&&&&&&&..&&&&....&&&&.&&&&..&&&&&&.&&&&..&&&&.&&&&&&..&&&&.&&&&....&&&&.&&&&.&&&&&&&&........... +//............&&.......&&&&&&&&&&&&......................&&&&..&&&&&&&&&&&&.&&&&..&&&&&..&&&&..&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&...&&&&&&........... +//................&&&.....&&&&&&&&&&+............&&&&&&&&&&&&...&&&&&&&&&&..&&&&...&&&&..&&&&.&&&&&..&&&&...&&&&.&&&&&&&&&&&&.&&&&....&&&&&........... +//.............&&&&&&&&&.....&&&&&&&.................................................................................................................. +//.............&&&&&&&&&&&&.....&&&................................................................................................................... +//.................&&&&&&&&&&&........................................................................................................................ +//....................&&&&&&&......................................................................................................................... +//.................................................................................................................................................... import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; From b136e154ce1fc4134af8fbc60b8317c82ed8b0c9 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 21:37:59 +0200 Subject: [PATCH 09/12] Chore: Updating pragma solidity contracts --- contracts/Tokens/Martins.sol | 2 +- contracts/ercs/AchievoProxy.sol | 2 +- contracts/ercs/extensions/Achievo1155Soulbound.sol | 2 +- contracts/ercs/extensions/Achievo721Soulbound.sol | 2 +- contracts/ercs/extensions/RoyaltyPayments.sol | 2 +- contracts/games/AvatarBound.sol | 2 +- contracts/games/GameSummary.sol | 2 +- contracts/games/LevelsBound.sol | 2 +- contracts/governance/Whitelist.sol | 2 +- contracts/interfaces/IERC20Burnable.sol | 2 +- contracts/interfaces/IERC20Decimals.sol | 2 +- contracts/interfaces/IExtension.sol | 2 +- contracts/interfaces/IExtensionManager.sol | 2 +- contracts/interfaces/IItemBound.sol | 2 +- contracts/interfaces/IMarketplace.sol | 2 +- contracts/interfaces/IOpenMint.sol | 2 +- contracts/interfaces/IRouter.sol | 2 +- contracts/interfaces/IRouterState.sol | 2 +- contracts/interfaces/IRouterStateGetters.sol | 2 +- contracts/interfaces/ISoulbound1155.sol | 2 +- contracts/libraries/ExtensionManagerStorage.sol | 2 +- contracts/libraries/LibGameSummary.sol | 2 +- contracts/libraries/LibItems.sol | 2 +- contracts/libraries/LibSoulbound1155.sol | 2 +- contracts/mocks/Mock1155Soulbound.sol | 2 +- contracts/mocks/Mock721Soulbound.sol | 2 +- contracts/mocks/MockERC1155Receiver.sol | 2 +- contracts/mocks/MockERC721Receiver.sol | 2 +- contracts/mocks/MockErc1155.sol | 2 +- contracts/mocks/MockErc20.sol | 2 +- contracts/mocks/MockErc721.sol | 2 +- contracts/mocks/MockRoyaltyEngineV1.sol | 2 +- contracts/mocks/MockUSDC.sol | 2 +- contracts/soulbounds/AdminERC1155Soulbound.sol | 2 +- contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol | 2 +- contracts/soulbounds/ERC1155Soulbound.sol | 2 +- contracts/soulbounds/ERC721Soulbound.sol | 2 +- contracts/soulbounds/LootDrop.sol | 2 +- contracts/storage/SSTORE2.sol | 2 +- contracts/upgradeables/bridges/ERC20BridgeV1.sol | 2 +- .../upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol | 2 +- .../ercs/extensions/Achievo1155SoulboundUpgradeable.sol | 2 +- .../ercs/extensions/Achievo721SoulboundUpgradeable.sol | 2 +- contracts/upgradeables/games/AvatarBoundV1.sol | 2 +- contracts/upgradeables/games/LevelsBoundV1.sol | 2 +- contracts/upgradeables/games/LevelsBoundV2.sol | 2 +- contracts/upgradeables/governance/ERC20StakeV1.sol | 2 +- contracts/upgradeables/legacies/LegacyAvatarUpgradeableV1.sol | 2 +- contracts/upgradeables/legacies/LegacyAvatarUpgradeableV2.sol | 2 +- contracts/upgradeables/marketplace/entrypoint/Marketplace.sol | 2 +- .../upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol | 2 +- .../upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol | 2 +- contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol | 2 +- contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol | 2 +- contracts/upgradeables/tokens/BurnableTokenV1.sol | 2 +- contracts/utils/Bytecode.sol | 2 +- contracts/utils/HelloWorld.sol | 2 +- contracts/utils/StringSet.sol | 2 +- test/AvatarBound.t.sol | 2 +- test/AvatarBoundV1.t.sol | 2 +- test/BaseTest.sol | 2 +- test/ItemBound.t.sol | 2 +- test/ItemBoundV1.t.sol | 2 +- test/LootDropHQ/LootDrop.t.sol | 2 +- test/LootDropHQ/LootDropAddToken.t.sol | 2 +- test/LootDropHQ/LootDropBurn.t.sol | 2 +- test/LootDropHQ/LootDropClaim.t.sol | 2 +- test/LootDropHQ/LootDropMint.t.sol | 2 +- test/LootDropHQ/LootDropTransfer.t.sol | 2 +- test/LootDropHQ/LootDropWithdraw.t.sol | 2 +- test/games/GameSummary.t.sol | 2 +- 71 files changed, 71 insertions(+), 71 deletions(-) diff --git a/contracts/Tokens/Martins.sol b/contracts/Tokens/Martins.sol index 02555158..917a85f9 100644 --- a/contracts/Tokens/Martins.sol +++ b/contracts/Tokens/Martins.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for WETH token. -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/ercs/AchievoProxy.sol b/contracts/ercs/AchievoProxy.sol index a6828aef..b0808645 100644 --- a/contracts/ercs/AchievoProxy.sol +++ b/contracts/ercs/AchievoProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "@openzeppelin/contracts/proxy/Proxy.sol"; import "@openzeppelin/contracts/utils/Address.sol"; diff --git a/contracts/ercs/extensions/Achievo1155Soulbound.sol b/contracts/ercs/extensions/Achievo1155Soulbound.sol index ad0408bd..a8fffdf9 100644 --- a/contracts/ercs/extensions/Achievo1155Soulbound.sol +++ b/contracts/ercs/extensions/Achievo1155Soulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /* * Author: Achievo Team - (https://achievo.xyz/) diff --git a/contracts/ercs/extensions/Achievo721Soulbound.sol b/contracts/ercs/extensions/Achievo721Soulbound.sol index 4efd6ac2..392644aa 100644 --- a/contracts/ercs/extensions/Achievo721Soulbound.sol +++ b/contracts/ercs/extensions/Achievo721Soulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/ercs/extensions/RoyaltyPayments.sol b/contracts/ercs/extensions/RoyaltyPayments.sol index 421db925..fefb8349 100644 --- a/contracts/ercs/extensions/RoyaltyPayments.sol +++ b/contracts/ercs/extensions/RoyaltyPayments.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /// @author omar@game7.io diff --git a/contracts/games/AvatarBound.sol b/contracts/games/AvatarBound.sol index 93599f48..c2b89830 100644 --- a/contracts/games/AvatarBound.sol +++ b/contracts/games/AvatarBound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/games/GameSummary.sol b/contracts/games/GameSummary.sol index 755ef32d..94c15769 100644 --- a/contracts/games/GameSummary.sol +++ b/contracts/games/GameSummary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/games/LevelsBound.sol b/contracts/games/LevelsBound.sol index a336865b..4a2a980b 100644 --- a/contracts/games/LevelsBound.sol +++ b/contracts/games/LevelsBound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/governance/Whitelist.sol b/contracts/governance/Whitelist.sol index 04d555db..e1206262 100644 --- a/contracts/governance/Whitelist.sol +++ b/contracts/governance/Whitelist.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/interfaces/IERC20Burnable.sol b/contracts/interfaces/IERC20Burnable.sol index 9f54b4c7..cf0cbef6 100644 --- a/contracts/interfaces/IERC20Burnable.sol +++ b/contracts/interfaces/IERC20Burnable.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /** * @dev Interface of the ERC20 standard as defined in the EIP with minting and burning. diff --git a/contracts/interfaces/IERC20Decimals.sol b/contracts/interfaces/IERC20Decimals.sol index d6dbddd5..66314b48 100644 --- a/contracts/interfaces/IERC20Decimals.sol +++ b/contracts/interfaces/IERC20Decimals.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/contracts/interfaces/IExtension.sol b/contracts/interfaces/IExtension.sol index e38bdba9..bb82dcb4 100644 --- a/contracts/interfaces/IExtension.sol +++ b/contracts/interfaces/IExtension.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /// @title IExtension diff --git a/contracts/interfaces/IExtensionManager.sol b/contracts/interfaces/IExtensionManager.sol index 5cd4144d..3fbb85ab 100644 --- a/contracts/interfaces/IExtensionManager.sol +++ b/contracts/interfaces/IExtensionManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "./IExtension.sol"; diff --git a/contracts/interfaces/IItemBound.sol b/contracts/interfaces/IItemBound.sol index 22a9014b..5327da21 100644 --- a/contracts/interfaces/IItemBound.sol +++ b/contracts/interfaces/IItemBound.sol @@ -18,7 +18,7 @@ //.................&&&&&&&&&&&........................................................................................................................ //....................&&&&&&&......................................................................................................................... //.................................................................................................................................................... -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "../libraries/LibItems.sol"; diff --git a/contracts/interfaces/IMarketplace.sol b/contracts/interfaces/IMarketplace.sol index aab9dcc7..8bc67f01 100644 --- a/contracts/interfaces/IMarketplace.sol +++ b/contracts/interfaces/IMarketplace.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/interfaces/IOpenMint.sol b/contracts/interfaces/IOpenMint.sol index fbe937e3..2668dce2 100644 --- a/contracts/interfaces/IOpenMint.sol +++ b/contracts/interfaces/IOpenMint.sol @@ -19,7 +19,7 @@ //....................&&&&&&&......................................................................................................................... //.................................................................................................................................................... -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; diff --git a/contracts/interfaces/IRouter.sol b/contracts/interfaces/IRouter.sol index 6be2e504..52a55744 100644 --- a/contracts/interfaces/IRouter.sol +++ b/contracts/interfaces/IRouter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /// @title ERC-7504 Dynamic Contracts: IRouter. /// @author omar@game7.io diff --git a/contracts/interfaces/IRouterState.sol b/contracts/interfaces/IRouterState.sol index e971b802..8ed139aa 100644 --- a/contracts/interfaces/IRouterState.sol +++ b/contracts/interfaces/IRouterState.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "./IExtension.sol"; diff --git a/contracts/interfaces/IRouterStateGetters.sol b/contracts/interfaces/IRouterStateGetters.sol index d7ff6422..04a04a6a 100644 --- a/contracts/interfaces/IRouterStateGetters.sol +++ b/contracts/interfaces/IRouterStateGetters.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "./IExtension.sol"; diff --git a/contracts/interfaces/ISoulbound1155.sol b/contracts/interfaces/ISoulbound1155.sol index f2a5066a..e3553832 100644 --- a/contracts/interfaces/ISoulbound1155.sol +++ b/contracts/interfaces/ISoulbound1155.sol @@ -19,7 +19,7 @@ //....................&&&&&&&......................................................................................................................... //.................................................................................................................................................... -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; interface ISoulbound1155 { // From ERC1155 diff --git a/contracts/libraries/ExtensionManagerStorage.sol b/contracts/libraries/ExtensionManagerStorage.sol index 354bdad1..89c993e7 100644 --- a/contracts/libraries/ExtensionManagerStorage.sol +++ b/contracts/libraries/ExtensionManagerStorage.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "../utils/StringSet.sol"; import "../interfaces/IExtension.sol"; diff --git a/contracts/libraries/LibGameSummary.sol b/contracts/libraries/LibGameSummary.sol index 1656ce09..266db441 100644 --- a/contracts/libraries/LibGameSummary.sol +++ b/contracts/libraries/LibGameSummary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/libraries/LibItems.sol b/contracts/libraries/LibItems.sol index 09be7b32..73969466 100644 --- a/contracts/libraries/LibItems.sol +++ b/contracts/libraries/LibItems.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/libraries/LibSoulbound1155.sol b/contracts/libraries/LibSoulbound1155.sol index f86c80a8..7600237e 100644 --- a/contracts/libraries/LibSoulbound1155.sol +++ b/contracts/libraries/LibSoulbound1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/Mock1155Soulbound.sol b/contracts/mocks/Mock1155Soulbound.sol index db38f8dc..19e782ab 100644 --- a/contracts/mocks/Mock1155Soulbound.sol +++ b/contracts/mocks/Mock1155Soulbound.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for 1155Soulbound token. -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/Mock721Soulbound.sol b/contracts/mocks/Mock721Soulbound.sol index 815ee633..a6f42a7c 100644 --- a/contracts/mocks/Mock721Soulbound.sol +++ b/contracts/mocks/Mock721Soulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/MockERC1155Receiver.sol b/contracts/mocks/MockERC1155Receiver.sol index f238646d..fa768de5 100644 --- a/contracts/mocks/MockERC1155Receiver.sol +++ b/contracts/mocks/MockERC1155Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; diff --git a/contracts/mocks/MockERC721Receiver.sol b/contracts/mocks/MockERC721Receiver.sol index c83125c9..03a30eb1 100644 --- a/contracts/mocks/MockERC721Receiver.sol +++ b/contracts/mocks/MockERC721Receiver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/MockErc1155.sol b/contracts/mocks/MockErc1155.sol index a3ccfa90..d3199759 100644 --- a/contracts/mocks/MockErc1155.sol +++ b/contracts/mocks/MockErc1155.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for ERC1155 token. -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/MockErc20.sol b/contracts/mocks/MockErc20.sol index a57ed57e..484fcaa6 100644 --- a/contracts/mocks/MockErc20.sol +++ b/contracts/mocks/MockErc20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for WETH token. -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/mocks/MockErc721.sol b/contracts/mocks/MockErc721.sol index d44492b1..bc4aff30 100644 --- a/contracts/mocks/MockErc721.sol +++ b/contracts/mocks/MockErc721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/MockRoyaltyEngineV1.sol b/contracts/mocks/MockRoyaltyEngineV1.sol index 3bc2e3cd..1e9e758d 100644 --- a/contracts/mocks/MockRoyaltyEngineV1.sol +++ b/contracts/mocks/MockRoyaltyEngineV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/mocks/MockUSDC.sol b/contracts/mocks/MockUSDC.sol index acfa22e5..8718a954 100644 --- a/contracts/mocks/MockUSDC.sol +++ b/contracts/mocks/MockUSDC.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/soulbounds/AdminERC1155Soulbound.sol b/contracts/soulbounds/AdminERC1155Soulbound.sol index 8b53f4c1..0a75bf4c 100644 --- a/contracts/soulbounds/AdminERC1155Soulbound.sol +++ b/contracts/soulbounds/AdminERC1155Soulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol b/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol index c49fcf44..069218db 100644 --- a/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol +++ b/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/soulbounds/ERC1155Soulbound.sol b/contracts/soulbounds/ERC1155Soulbound.sol index 0864779b..267b2c38 100644 --- a/contracts/soulbounds/ERC1155Soulbound.sol +++ b/contracts/soulbounds/ERC1155Soulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/soulbounds/ERC721Soulbound.sol b/contracts/soulbounds/ERC721Soulbound.sol index 1b2c1a38..f70fa667 100644 --- a/contracts/soulbounds/ERC721Soulbound.sol +++ b/contracts/soulbounds/ERC721Soulbound.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/soulbounds/LootDrop.sol b/contracts/soulbounds/LootDrop.sol index 831f3613..a635ced3 100644 --- a/contracts/soulbounds/LootDrop.sol +++ b/contracts/soulbounds/LootDrop.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/storage/SSTORE2.sol b/contracts/storage/SSTORE2.sol index 9c29de6c..fcd7dbc7 100644 --- a/contracts/storage/SSTORE2.sol +++ b/contracts/storage/SSTORE2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "../utils/Bytecode.sol"; diff --git a/contracts/upgradeables/bridges/ERC20BridgeV1.sol b/contracts/upgradeables/bridges/ERC20BridgeV1.sol index fad77bf3..d3a4c810 100644 --- a/contracts/upgradeables/bridges/ERC20BridgeV1.sol +++ b/contracts/upgradeables/bridges/ERC20BridgeV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol b/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol index 10461d4c..f6e3fe45 100644 --- a/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol +++ b/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol b/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol index 6095377f..52c5a5d4 100644 --- a/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol +++ b/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol b/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol index df2a0a46..34bc952b 100644 --- a/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol +++ b/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/games/AvatarBoundV1.sol b/contracts/upgradeables/games/AvatarBoundV1.sol index 6df6b75d..898367b3 100644 --- a/contracts/upgradeables/games/AvatarBoundV1.sol +++ b/contracts/upgradeables/games/AvatarBoundV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/games/LevelsBoundV1.sol b/contracts/upgradeables/games/LevelsBoundV1.sol index 130e53a1..a25c07bf 100644 --- a/contracts/upgradeables/games/LevelsBoundV1.sol +++ b/contracts/upgradeables/games/LevelsBoundV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/games/LevelsBoundV2.sol b/contracts/upgradeables/games/LevelsBoundV2.sol index 42498629..62c85a3d 100644 --- a/contracts/upgradeables/games/LevelsBoundV2.sol +++ b/contracts/upgradeables/games/LevelsBoundV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/governance/ERC20StakeV1.sol b/contracts/upgradeables/governance/ERC20StakeV1.sol index 6186ff8b..d3ea5a08 100644 --- a/contracts/upgradeables/governance/ERC20StakeV1.sol +++ b/contracts/upgradeables/governance/ERC20StakeV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /** * Author: Omar ogarciarevett(https://github.com/ogarciarevett) diff --git a/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV1.sol b/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV1.sol index 7b373d21..7392910b 100644 --- a/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV1.sol +++ b/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /** * Authors: Omar Garcia diff --git a/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV2.sol b/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV2.sol index f266c861..a2ac629a 100644 --- a/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV2.sol +++ b/contracts/upgradeables/legacies/LegacyAvatarUpgradeableV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /** * Authors: Omar Garcia diff --git a/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol b/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol index cdcf7bf4..ffd83d87 100644 --- a/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol +++ b/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; /// @author omar@game7.io diff --git a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol index c273ce87..9b040746 100644 --- a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol index f46135c6..b6f687d7 100644 --- a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol +++ b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol index 806cf676..fcf62134 100644 --- a/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol index 8353c569..0ac0daa9 100644 --- a/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; diff --git a/contracts/upgradeables/tokens/BurnableTokenV1.sol b/contracts/upgradeables/tokens/BurnableTokenV1.sol index 20a6f29c..506ba90d 100644 --- a/contracts/upgradeables/tokens/BurnableTokenV1.sol +++ b/contracts/upgradeables/tokens/BurnableTokenV1.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; // @author summon Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] diff --git a/contracts/utils/Bytecode.sol b/contracts/utils/Bytecode.sol index cb2c35fd..63fa137c 100644 --- a/contracts/utils/Bytecode.sol +++ b/contracts/utils/Bytecode.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; library Bytecode { error InvalidCodeAtRange(uint256 _size, uint256 _start, uint256 _end); diff --git a/contracts/utils/HelloWorld.sol b/contracts/utils/HelloWorld.sol index eddc8a3c..0b74b6b4 100644 --- a/contracts/utils/HelloWorld.sol +++ b/contracts/utils/HelloWorld.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; diff --git a/contracts/utils/StringSet.sol b/contracts/utils/StringSet.sol index 5dbe60dc..1ff66607 100644 --- a/contracts/utils/StringSet.sol +++ b/contracts/utils/StringSet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; library StringSet { struct Set { diff --git a/test/AvatarBound.t.sol b/test/AvatarBound.t.sol index 854861b9..7a8f3fd0 100644 --- a/test/AvatarBound.t.sol +++ b/test/AvatarBound.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import { Test, console } from "forge-std/Test.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; diff --git a/test/AvatarBoundV1.t.sol b/test/AvatarBoundV1.t.sol index 0408fc0a..362d93d7 100644 --- a/test/AvatarBoundV1.t.sol +++ b/test/AvatarBoundV1.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/BaseTest.sol b/test/BaseTest.sol index cc67c8b4..34a1b49e 100644 --- a/test/BaseTest.sol +++ b/test/BaseTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import { Test, console } from "forge-std/Test.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/ItemBound.t.sol b/test/ItemBound.t.sol index b381cdb8..add446df 100644 --- a/test/ItemBound.t.sol +++ b/test/ItemBound.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/ItemBoundV1.t.sol b/test/ItemBoundV1.t.sol index d82b1c21..c6f8332c 100644 --- a/test/ItemBoundV1.t.sol +++ b/test/ItemBoundV1.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDrop.t.sol b/test/LootDropHQ/LootDrop.t.sol index 3a9a5232..51ff6728 100644 --- a/test/LootDropHQ/LootDrop.t.sol +++ b/test/LootDropHQ/LootDrop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDropAddToken.t.sol b/test/LootDropHQ/LootDropAddToken.t.sol index 9aca8c66..c746640f 100644 --- a/test/LootDropHQ/LootDropAddToken.t.sol +++ b/test/LootDropHQ/LootDropAddToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDropBurn.t.sol b/test/LootDropHQ/LootDropBurn.t.sol index c5383b54..3a4c9e81 100644 --- a/test/LootDropHQ/LootDropBurn.t.sol +++ b/test/LootDropHQ/LootDropBurn.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDropClaim.t.sol b/test/LootDropHQ/LootDropClaim.t.sol index 56f4c80e..e50851aa 100644 --- a/test/LootDropHQ/LootDropClaim.t.sol +++ b/test/LootDropHQ/LootDropClaim.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDropMint.t.sol b/test/LootDropHQ/LootDropMint.t.sol index ae7d7a4c..45828c1f 100644 --- a/test/LootDropHQ/LootDropMint.t.sol +++ b/test/LootDropHQ/LootDropMint.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDropTransfer.t.sol b/test/LootDropHQ/LootDropTransfer.t.sol index eee4cce3..016d47ce 100644 --- a/test/LootDropHQ/LootDropTransfer.t.sol +++ b/test/LootDropHQ/LootDropTransfer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/LootDropHQ/LootDropWithdraw.t.sol b/test/LootDropHQ/LootDropWithdraw.t.sol index d567b24a..c67977cf 100644 --- a/test/LootDropHQ/LootDropWithdraw.t.sol +++ b/test/LootDropHQ/LootDropWithdraw.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; diff --git a/test/games/GameSummary.t.sol b/test/games/GameSummary.t.sol index eb8c1520..c30a5d07 100644 --- a/test/games/GameSummary.t.sol +++ b/test/games/GameSummary.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity ^0.8.24; import "forge-std/Test.sol"; import "forge-std/StdCheats.sol"; From 17ec12dd3cd22931fb2cf10d707008b62a31ce95 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 23:09:21 +0200 Subject: [PATCH 10/12] Chore: Clariying from where its that api-key of the local node of zkSync --- .env.example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 0c6aa64e..10b53622 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,9 @@ # TESTNET - MAINNET #PRIVATE_KEY="0xYourKey" - +# DEV - ZKSYNC - LOCAL PRIVATE_KEY="0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110" + POLYGON_PROVIDER_URL="https://endpoints.omniatech.io/v1/matic/mumbai/public" POLYGONSCAN_API_KEY="YOUR_API_KEY" ARBISCAN_API_KEY="YOUR_API_KEY" From 42205e2504ef9d37374095a4d319ec41650e5296 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Sat, 5 Oct 2024 23:42:25 +0200 Subject: [PATCH 11/12] Chore: Updating docs --- README.md | 44 ++++++++--------------------- contracts/accounts/Forwarder.sol | 1 - contracts/interfaces/IForwarder.sol | 21 -------------- package.json | 4 +-- 4 files changed, 14 insertions(+), 56 deletions(-) delete mode 100644 contracts/interfaces/IForwarder.sol diff --git a/README.md b/README.md index c6b9058b..087d3ef8 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@


- +

-

Achievo Contracts

+

Summon Contracts

-Build Status +Build Status


## Requirements -1. NodeJs >= 18 (use nvm pls) +1. NodeJs >= 21.13.1 (use nvm pls) 2. Fill the .env file with the correct values(see .env.example) 3. Install dependencies @@ -20,32 +20,12 @@ pnpm install ``` -## Scripts - -```json -{ - "deploy:create2": "pnpm compile && hardhat --config hardhat.config.ts deploy-create2", - "deploy:nonce": "pnpm compile && hardhat --config hardhat.config.ts deploy-nonce", - "deploy:proxy": "pnpm compile && hardhat --config hardhat.config.ts deploy-proxy", - "deploy:sepolia": "pnpm compile && hardhat --config hardhat.config.ts deploy --network sepolia", - "deploy:arbitrum:one": "pnpm compile && hardhat --config arbitrum.config.ts deploy --network arbitrumOne", - "deploy:arbitrum:sepolia": "pnpm compile && hardhat --config arbitrum.config.ts deploy --network arbitrumSepolia", - "deploy:base:mainnet": "pnpm compile && hardhat --config base.config.ts deploy --network base", - "deploy:base:sepolia": "pnpm compile && hardhat --config base.config.ts deploy --network baseSepolia", - "deploy:mantle:mainnet": "pnpm compile && hardhat --config mantle.config.ts deploy --network mantle", - "deploy:mantle:sepolia": "pnpm compile && hardhat --config mantle.config.ts deploy --network mantleSepolia", - "deploy:polygon:mainnet": "pnpm compile && hardhat --config polygon.config.ts deploy --network polygon", - "deploy:polygon:mumbai": "pnpm compile && hardhat --config polygon.config.ts deploy --network polygonMumbai", - "deploy:g7:testnet": "pnpm compile && hardhat --config g7.config.ts deploy --network game7Testnet", - "test:foundry": "forge test -vvv", - "test": "REPORT_GAS=true hardhat --config hardhat.config.ts test test/hardhatTests/*.ts --network hardhat", - "test:ci": "hardhat --config hardhat.config.ts test test/hardhatTests/*.ts --network hardhat", - "lint": "eslint --config ./.eslintrc.js --ignore-path ./.eslintignore ./test/**/*.ts", - "solhint": "solhint ./contracts/**/*.sol", - "format": "yarn prettier -w ./deploy/**/*.ts ./tasks/**/*.ts ./tests/**/*.ts ./helpers/**/*.ts contracts/**/*.sol ", - "format:check": "yarn prettier -c ./deploy/**/*.ts ./tasks/**/*.ts ./tests/**/*.ts ./helpers/**/*.ts ./contracts/**/*.sol ", - "coverage": "TS_NODE_TRANSPILE_ONLY=true SOLIDITY_COVERAGE=true hardhat coverage --solcoverjs .solcover.ts", - "coverage:foundry": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage", - "generate:types": "pnpm dlx hardhat typechain" -} +## Deployments + +How to deploy a specific contract using the hardhat tasks of this repo: + +```shell +pnpm deploy:g7:testnet --name Forwarder ``` + +You need to provide the **name** argument with the contract name you want to deploy. diff --git a/contracts/accounts/Forwarder.sol b/contracts/accounts/Forwarder.sol index 1f3311ce..d321fdad 100644 --- a/contracts/accounts/Forwarder.sol +++ b/contracts/accounts/Forwarder.sol @@ -38,7 +38,6 @@ contract Forwarder is bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); address public parentAddress; - mapping(address => uint256) public deposits; uint256 public minDeposit = 0.00001 ether; /*////////////////////////////////////////////////////////////// diff --git a/contracts/interfaces/IForwarder.sol b/contracts/interfaces/IForwarder.sol deleted file mode 100644 index 218cb048..00000000 --- a/contracts/interfaces/IForwarder.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.24; - -interface IForwarder { - event ForwarderDeposited(address indexed from, uint256 value); - event ERC20TokensFlushed(address indexed token, uint256 amount); - event ParentAddressUpdated(address newParentAddress); - - function parentAddress() external view returns (address); - function flushERC20Tokens(address tokenAddress) external; - function updateParentAddress(address newParentAddress) external; - function pause() external; - function unpause() external; - - // AccessControl functions - function hasRole(bytes32 role, address account) external view returns (bool); - function getRoleAdmin(bytes32 role) external view returns (bytes32); - function grantRole(bytes32 role, address account) external; - function revokeRole(bytes32 role, address account) external; - function renounceRole(bytes32 role, address account) external; -} \ No newline at end of file diff --git a/package.json b/package.json index 2b7812ba..0fb87708 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@summon/contracts", - "version": "0.25.0", + "version": "1.0.0", "private": true, - "description": "Smart contracts for achievo.xyz", + "description": "Smart contracts for summon.xyz", "scripts": { "localChain": "hardhat --config hardhat.config.ts node", "clean": "hardhat --config hardhat.config.ts clean", From c7abd6be69313638f80a75c9e6588e000452dc88 Mon Sep 17 00:00:00 2001 From: ogarciarevett Date: Mon, 7 Oct 2024 15:15:47 +0200 Subject: [PATCH 12/12] Chore: Resolving Max comments about @author and deprecated npm script --- contracts/Tokens/Martins.sol | 2 +- contracts/accounts/Forwarder.sol | 2 +- contracts/accounts/SmartAccount.sol | 2 +- contracts/airdrops/FreeMint.sol | 2 +- contracts/bridges/ERC20Bridge.sol | 2 +- contracts/ercs/ERCWhitelistSignature.sol | 2 +- contracts/ercs/extensions/Achievo1155Soulbound.sol | 2 +- contracts/ercs/extensions/Achievo721Soulbound.sol | 2 +- contracts/games/AvatarBound.sol | 2 +- contracts/games/GameSummary.sol | 2 +- contracts/games/LevelsBound.sol | 2 +- contracts/governance/Whitelist.sol | 2 +- contracts/interfaces/IItemBound.sol | 2 +- contracts/interfaces/IMarketplace.sol | 2 +- contracts/interfaces/IOpenMint.sol | 2 +- contracts/interfaces/ISoulbound1155.sol | 2 +- contracts/libraries/LibGameSummary.sol | 2 +- contracts/libraries/LibItems.sol | 2 +- contracts/libraries/LibSoulbound1155.sol | 2 +- contracts/mocks/Mock1155Soulbound.sol | 2 +- contracts/mocks/Mock721Soulbound.sol | 2 +- contracts/mocks/MockERC1155Receiver.sol | 2 +- contracts/mocks/MockERC721Receiver.sol | 2 +- contracts/mocks/MockErc1155.sol | 2 +- contracts/mocks/MockErc20.sol | 2 +- contracts/mocks/MockErc721.sol | 2 +- contracts/mocks/MockRoyaltyEngineV1.sol | 2 +- contracts/mocks/MockUSDC.sol | 2 +- contracts/soulbounds/AdminERC1155Soulbound.sol | 2 +- contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol | 2 +- contracts/soulbounds/ERC1155Soulbound.sol | 2 +- contracts/soulbounds/ERC721Soulbound.sol | 2 +- contracts/soulbounds/LootDrop.sol | 2 +- contracts/upgradeables/bridges/ERC20BridgeV1.sol | 2 +- .../upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol | 2 +- .../ercs/extensions/Achievo1155SoulboundUpgradeable.sol | 2 +- .../ercs/extensions/Achievo721SoulboundUpgradeable.sol | 2 +- contracts/upgradeables/games/AvatarBoundV1.sol | 2 +- contracts/upgradeables/games/LevelsBoundV1.sol | 2 +- contracts/upgradeables/games/LevelsBoundV2.sol | 2 +- contracts/upgradeables/governance/ERC20StakeV1.sol | 2 +- contracts/upgradeables/marketplace/entrypoint/Marketplace.sol | 2 +- .../upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol | 2 +- .../upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol | 2 +- contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol | 2 +- contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol | 2 +- contracts/upgradeables/tokens/BurnableTokenV1.sol | 2 +- package.json | 3 +-- 48 files changed, 48 insertions(+), 49 deletions(-) diff --git a/contracts/Tokens/Martins.sol b/contracts/Tokens/Martins.sol index 917a85f9..18b37fd9 100644 --- a/contracts/Tokens/Martins.sol +++ b/contracts/Tokens/Martins.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/accounts/Forwarder.sol b/contracts/accounts/Forwarder.sol index d321fdad..b6fba608 100644 --- a/contracts/accounts/Forwarder.sol +++ b/contracts/accounts/Forwarder.sol @@ -5,7 +5,7 @@ import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol" import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol"; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [@ogarciarevett] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/accounts/SmartAccount.sol b/contracts/accounts/SmartAccount.sol index 626eb852..27714830 100644 --- a/contracts/accounts/SmartAccount.sol +++ b/contracts/accounts/SmartAccount.sol @@ -10,7 +10,7 @@ import { IAccount } from "@account-abstraction/contracts/interfaces/IAccount.sol import { PackedUserOperation } from "@account-abstraction/contracts/interfaces/PackedUserOperation.sol"; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [@ogarciarevett] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/airdrops/FreeMint.sol b/contracts/airdrops/FreeMint.sol index 74d554c0..4bdd905f 100644 --- a/contracts/airdrops/FreeMint.sol +++ b/contracts/airdrops/FreeMint.sol @@ -2,7 +2,7 @@ // To check the terms and conditions look for the file with hash QmW1YKgTAZmm92WUcPS9XzMAYXtFVUvDCNGNfEFJQJ1hBv on any IPFS node pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/bridges/ERC20Bridge.sol b/contracts/bridges/ERC20Bridge.sol index 50777026..624e5de5 100644 --- a/contracts/bridges/ERC20Bridge.sol +++ b/contracts/bridges/ERC20Bridge.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/ercs/ERCWhitelistSignature.sol b/contracts/ercs/ERCWhitelistSignature.sol index 7821d2ca..d240977c 100644 --- a/contracts/ercs/ERCWhitelistSignature.sol +++ b/contracts/ercs/ERCWhitelistSignature.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/ercs/extensions/Achievo1155Soulbound.sol b/contracts/ercs/extensions/Achievo1155Soulbound.sol index a8fffdf9..3e535a40 100644 --- a/contracts/ercs/extensions/Achievo1155Soulbound.sol +++ b/contracts/ercs/extensions/Achievo1155Soulbound.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.24; * Author: Achievo Team - (https://achievo.xyz/) */ -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/ercs/extensions/Achievo721Soulbound.sol b/contracts/ercs/extensions/Achievo721Soulbound.sol index 392644aa..3b3660a4 100644 --- a/contracts/ercs/extensions/Achievo721Soulbound.sol +++ b/contracts/ercs/extensions/Achievo721Soulbound.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/games/AvatarBound.sol b/contracts/games/AvatarBound.sol index c2b89830..66dcb9c9 100644 --- a/contracts/games/AvatarBound.sol +++ b/contracts/games/AvatarBound.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/games/GameSummary.sol b/contracts/games/GameSummary.sol index 94c15769..497ec2b3 100644 --- a/contracts/games/GameSummary.sol +++ b/contracts/games/GameSummary.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/games/LevelsBound.sol b/contracts/games/LevelsBound.sol index 4a2a980b..fec935d4 100644 --- a/contracts/games/LevelsBound.sol +++ b/contracts/games/LevelsBound.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/governance/Whitelist.sol b/contracts/governance/Whitelist.sol index e1206262..f7b1a8cd 100644 --- a/contracts/governance/Whitelist.sol +++ b/contracts/governance/Whitelist.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/interfaces/IItemBound.sol b/contracts/interfaces/IItemBound.sol index 5327da21..386b9378 100644 --- a/contracts/interfaces/IItemBound.sol +++ b/contracts/interfaces/IItemBound.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/interfaces/IMarketplace.sol b/contracts/interfaces/IMarketplace.sol index 8bc67f01..936471cb 100644 --- a/contracts/interfaces/IMarketplace.sol +++ b/contracts/interfaces/IMarketplace.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/interfaces/IOpenMint.sol b/contracts/interfaces/IOpenMint.sol index 2668dce2..991e346c 100644 --- a/contracts/interfaces/IOpenMint.sol +++ b/contracts/interfaces/IOpenMint.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/interfaces/ISoulbound1155.sol b/contracts/interfaces/ISoulbound1155.sol index e3553832..f99fddf1 100644 --- a/contracts/interfaces/ISoulbound1155.sol +++ b/contracts/interfaces/ISoulbound1155.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/libraries/LibGameSummary.sol b/contracts/libraries/LibGameSummary.sol index 266db441..4982498f 100644 --- a/contracts/libraries/LibGameSummary.sol +++ b/contracts/libraries/LibGameSummary.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/libraries/LibItems.sol b/contracts/libraries/LibItems.sol index 73969466..3b5c90ad 100644 --- a/contracts/libraries/LibItems.sol +++ b/contracts/libraries/LibItems.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/libraries/LibSoulbound1155.sol b/contracts/libraries/LibSoulbound1155.sol index 7600237e..de77eeeb 100644 --- a/contracts/libraries/LibSoulbound1155.sol +++ b/contracts/libraries/LibSoulbound1155.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/Mock1155Soulbound.sol b/contracts/mocks/Mock1155Soulbound.sol index 19e782ab..78113605 100644 --- a/contracts/mocks/Mock1155Soulbound.sol +++ b/contracts/mocks/Mock1155Soulbound.sol @@ -2,7 +2,7 @@ ///@notice This contract is for mock for 1155Soulbound token. pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/Mock721Soulbound.sol b/contracts/mocks/Mock721Soulbound.sol index a6f42a7c..59254bd7 100644 --- a/contracts/mocks/Mock721Soulbound.sol +++ b/contracts/mocks/Mock721Soulbound.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockERC1155Receiver.sol b/contracts/mocks/MockERC1155Receiver.sol index fa768de5..a272c178 100644 --- a/contracts/mocks/MockERC1155Receiver.sol +++ b/contracts/mocks/MockERC1155Receiver.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockERC721Receiver.sol b/contracts/mocks/MockERC721Receiver.sol index 03a30eb1..d663d301 100644 --- a/contracts/mocks/MockERC721Receiver.sol +++ b/contracts/mocks/MockERC721Receiver.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockErc1155.sol b/contracts/mocks/MockErc1155.sol index d3199759..b548603a 100644 --- a/contracts/mocks/MockErc1155.sol +++ b/contracts/mocks/MockErc1155.sol @@ -2,7 +2,7 @@ ///@notice This contract is for mock for ERC1155 token. pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockErc20.sol b/contracts/mocks/MockErc20.sol index 484fcaa6..27c64a54 100644 --- a/contracts/mocks/MockErc20.sol +++ b/contracts/mocks/MockErc20.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockErc721.sol b/contracts/mocks/MockErc721.sol index bc4aff30..f6171e70 100644 --- a/contracts/mocks/MockErc721.sol +++ b/contracts/mocks/MockErc721.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockRoyaltyEngineV1.sol b/contracts/mocks/MockRoyaltyEngineV1.sol index 1e9e758d..7e6c0896 100644 --- a/contracts/mocks/MockRoyaltyEngineV1.sol +++ b/contracts/mocks/MockRoyaltyEngineV1.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/mocks/MockUSDC.sol b/contracts/mocks/MockUSDC.sol index 8718a954..b193af32 100644 --- a/contracts/mocks/MockUSDC.sol +++ b/contracts/mocks/MockUSDC.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/soulbounds/AdminERC1155Soulbound.sol b/contracts/soulbounds/AdminERC1155Soulbound.sol index 0a75bf4c..6a543d80 100644 --- a/contracts/soulbounds/AdminERC1155Soulbound.sol +++ b/contracts/soulbounds/AdminERC1155Soulbound.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol b/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol index 069218db..6ae10f4f 100644 --- a/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol +++ b/contracts/soulbounds/ERC1155RoyaltiesSoulbound.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/soulbounds/ERC1155Soulbound.sol b/contracts/soulbounds/ERC1155Soulbound.sol index 267b2c38..377f5ad0 100644 --- a/contracts/soulbounds/ERC1155Soulbound.sol +++ b/contracts/soulbounds/ERC1155Soulbound.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/soulbounds/ERC721Soulbound.sol b/contracts/soulbounds/ERC721Soulbound.sol index f70fa667..885f306c 100644 --- a/contracts/soulbounds/ERC721Soulbound.sol +++ b/contracts/soulbounds/ERC721Soulbound.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/soulbounds/LootDrop.sol b/contracts/soulbounds/LootDrop.sol index a635ced3..d9a9df4a 100644 --- a/contracts/soulbounds/LootDrop.sol +++ b/contracts/soulbounds/LootDrop.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/bridges/ERC20BridgeV1.sol b/contracts/upgradeables/bridges/ERC20BridgeV1.sol index d3a4c810..97cd7158 100644 --- a/contracts/upgradeables/bridges/ERC20BridgeV1.sol +++ b/contracts/upgradeables/bridges/ERC20BridgeV1.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol b/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol index f6e3fe45..1afaa8c2 100644 --- a/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol +++ b/contracts/upgradeables/ercs/ERCWhitelistSignatureUpgradeable.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol b/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol index 52c5a5d4..19ade461 100644 --- a/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol +++ b/contracts/upgradeables/ercs/extensions/Achievo1155SoulboundUpgradeable.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol b/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol index 34bc952b..0d5ed9bd 100644 --- a/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol +++ b/contracts/upgradeables/ercs/extensions/Achievo721SoulboundUpgradeable.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/games/AvatarBoundV1.sol b/contracts/upgradeables/games/AvatarBoundV1.sol index 898367b3..d9d45f8a 100644 --- a/contracts/upgradeables/games/AvatarBoundV1.sol +++ b/contracts/upgradeables/games/AvatarBoundV1.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/games/LevelsBoundV1.sol b/contracts/upgradeables/games/LevelsBoundV1.sol index a25c07bf..e8311bdc 100644 --- a/contracts/upgradeables/games/LevelsBoundV1.sol +++ b/contracts/upgradeables/games/LevelsBoundV1.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/games/LevelsBoundV2.sol b/contracts/upgradeables/games/LevelsBoundV2.sol index 62c85a3d..5b63299d 100644 --- a/contracts/upgradeables/games/LevelsBoundV2.sol +++ b/contracts/upgradeables/games/LevelsBoundV2.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/governance/ERC20StakeV1.sol b/contracts/upgradeables/governance/ERC20StakeV1.sol index d3ea5a08..9d712efb 100644 --- a/contracts/upgradeables/governance/ERC20StakeV1.sol +++ b/contracts/upgradeables/governance/ERC20StakeV1.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.24; * Co-Authors: */ -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol b/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol index ffd83d87..cd22856a 100644 --- a/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol +++ b/contracts/upgradeables/marketplace/entrypoint/Marketplace.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; /// @author omar@game7.io -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol index 9b040746..3bb1055c 100644 --- a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV1.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.24; //TODO: This contract is deprecated USE THE ERC1155SoulboundV1.sol -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol index b6f687d7..44792603 100644 --- a/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol +++ b/contracts/upgradeables/soulbounds/ERC1155RoyaltiesSoulboundV2.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.24; //TODO: This contract is deprecated USE THE ERC1155SoulboundV1.sol -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol index fcf62134..649722ba 100644 --- a/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC1155SoulboundV1.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol b/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol index 0ac0daa9..0f174a40 100644 --- a/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol +++ b/contracts/upgradeables/soulbounds/ERC721SoulboundV1.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/contracts/upgradeables/tokens/BurnableTokenV1.sol b/contracts/upgradeables/tokens/BurnableTokenV1.sol index 506ba90d..92fdb6d0 100644 --- a/contracts/upgradeables/tokens/BurnableTokenV1.sol +++ b/contracts/upgradeables/tokens/BurnableTokenV1.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.24; -// @author summon Team - https://summon.xyz +// @author Summon.xyz Team - https://summon.xyz // @contributors: [ @ogarciarevett, @vasinl124] //.................................................................................................................................................... //....................&&&&&&.......................................................................................................................... diff --git a/package.json b/package.json index 0fb87708..e1b55ad5 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,7 @@ "format:check": "prettier -c ./deploy/**/*.ts ./tasks/**/*.ts ./tests/**/*.ts ./helpers/**/*.ts ./contracts/**/*.sol ", "coverage": "TS_NODE_TRANSPILE_ONLY=true SOLIDITY_COVERAGE=true hardhat coverage --solcoverjs .solcover.ts", "coverage:foundry": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage", - "generate:types": "pnpm dlx hardhat typechain", - "deleteme": "npx hardhat run scripts/deployStaker.ts --network game7Testnet --config g7.config.ts" + "generate:types": "pnpm dlx hardhat typechain" }, "repository": { "type": "git",