├── src ├── networks │ ├── arbitrum.json │ ├── goerli.json │ ├── kovan.json │ ├── mainnet.json │ ├── matic.json │ ├── mumbai.json │ ├── rinkeby.json │ ├── ropsten.json │ ├── arbitrum-testnet.json │ └── ganache.json ├── .gitignore ├── .npmignore ├── README.md ├── gen │ ├── adapter │ │ ├── commons.js │ │ ├── index.js │ │ └── factories │ │ │ ├── ILootExpansion__factory.js │ │ │ ├── MockExpansionNoFee__factory.js │ │ │ ├── MockExpansionNonCompliant__factory.js │ │ │ ├── Migrations__factory.js │ │ │ └── MockExpansion__factory.js │ └── typechain │ │ ├── commons.ts │ │ ├── index.ts │ │ ├── factories │ │ ├── ILootExpansion__factory.ts │ │ ├── MockExpansionNoFee__factory.ts │ │ ├── MockExpansionNonCompliant__factory.ts │ │ ├── Migrations__factory.ts │ │ ├── MockExpansion__factory.ts │ │ └── LootRegistry__factory.ts │ │ ├── MockExpansionNonCompliant.d.ts │ │ ├── MockExpansionNoFee.d.ts │ │ ├── ILootExpansion.d.ts │ │ ├── Migrations.d.ts │ │ └── MockExpansion.d.ts ├── artifacts │ ├── @openzeppelin │ │ └── contracts │ │ │ ├── utils │ │ │ ├── Context.sol │ │ │ │ └── Context.json │ │ │ ├── Address.sol │ │ │ │ └── Address.json │ │ │ ├── Strings.sol │ │ │ │ └── Strings.json │ │ │ ├── EnumerableMap.sol │ │ │ │ └── EnumerableMap.json │ │ │ └── EnumerableSet.sol │ │ │ │ └── EnumerableSet.json │ │ │ ├── math │ │ │ └── SafeMath.sol │ │ │ │ └── SafeMath.json │ │ │ ├── introspection │ │ │ ├── ERC165.sol │ │ │ │ └── ERC165.json │ │ │ └── IERC165.sol │ │ │ │ └── IERC165.json │ │ │ └── token │ │ │ └── ERC721 │ │ │ ├── IERC721Receiver.sol │ │ │ └── IERC721Receiver.json │ │ │ ├── IERC721.sol │ │ │ └── IERC721.json │ │ │ ├── IERC721Metadata.sol │ │ │ └── IERC721Metadata.json │ │ │ └── IERC721Enumerable.sol │ │ │ └── IERC721Enumerable.json │ └── contracts │ │ ├── interfaces │ │ └── ILootExpansion.sol │ │ │ └── ILootExpansion.json │ │ ├── mocks │ │ ├── MockExpansionNoFee.sol │ │ │ └── MockExpansionNoFee.json │ │ ├── MockExpansionNonCompliant.sol │ │ │ └── MockExpansionNonCompliant.json │ │ └── MockExpansion.sol │ │ │ └── MockExpansion.json │ │ └── migrations │ │ └── Migrations.sol │ │ └── Migrations.json ├── contracts │ ├── mocks │ │ ├── MockExpansionNonCompliant.sol │ │ ├── MockExpansionNoFee.sol │ │ └── MockExpansion.sol │ ├── migrations │ │ └── Migrations.sol │ ├── interfaces │ │ └── ILootExpansion.sol │ └── LootRegistry.sol └── package.json ├── .eslintignore ├── .gitattributes ├── .solcover.js ├── config └── PROD.env.sample ├── README.md ├── .prettierrc ├── .gitignore ├── tests ├── utils │ ├── helpers.ts │ └── index.ts └── LootRegistry.spec.ts ├── typings ├── truffle.d.ts ├── chai-bn.ts └── chai-bignumber.d.ts ├── .solhint.json ├── tsconfig.json ├── .eslintrc.js ├── hardhat.config.ts ├── utils ├── config-loader.ts └── deploy-contracts.ts └── package.json /src/networks/arbitrum.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/goerli.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/kovan.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/mainnet.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/matic.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/mumbai.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/rinkeby.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/ropsten.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /src/networks/arbitrum-testnet.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .eslintrc.js 2 | node_modules 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | cache 2 | artifacts/build-info 3 | artifacts/**/*.dbg.json 4 | -------------------------------------------------------------------------------- /src/.npmignore: -------------------------------------------------------------------------------- 1 | cache 2 | artifacts/build-info 3 | artifacts/**/*.dbg.json 4 | -------------------------------------------------------------------------------- /.solcover.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | skipFiles: ['mocks', 'migrations'] 3 | } 4 | -------------------------------------------------------------------------------- /config/PROD.env.sample: -------------------------------------------------------------------------------- 1 | ETH_MNEMONIC="" 2 | INFURA_API_KEY="" 3 | ETHERSCAN="" 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Loot Expansion Contracts 2 | =============================== 3 | 4 | 5 | ## LICENSE 6 | -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | lootproject/expansions-contracts 2 | ============================ 3 | 4 | ## LICENSE 5 | 6 | -------------------------------------------------------------------------------- /src/networks/ganache.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "contractName": "ExampleContract", 4 | "address": "0xc52Ae9dbAA394785177E20e25432aE67f76E4e15" 5 | } 6 | ] -------------------------------------------------------------------------------- /src/gen/adapter/commons.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* Autogenerated file. Do not edit manually. */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | exports.__esModule = true; 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false, 4 | "semi": false, 5 | "singleQuote": true, 6 | "trailingComma": "none", 7 | "arrowParens": "avoid", 8 | "printWidth": 130 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | node_modules/ 3 | 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | *.js.map 10 | build 11 | coverage 12 | coverage.json 13 | 14 | config/*.env 15 | -------------------------------------------------------------------------------- /tests/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | // Check if tx was Reverted with specified message 2 | export function RevertError(errorMessage?: string) { 3 | let prefix = 'VM Exception while processing transaction: revert' 4 | return errorMessage ? `${prefix + ' ' + errorMessage}` : prefix 5 | } -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Context", 4 | "sourceName": "@openzeppelin/contracts/utils/Context.sol", 5 | "abi": [], 6 | "bytecode": "0x", 7 | "deployedBytecode": "0x", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /typings/truffle.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'truffle' { 2 | import * as truffle from 'truffle-contract' 3 | 4 | interface ArtifactsGlobal { 5 | require(name: string): truffle.TruffleContract 6 | } 7 | 8 | global { 9 | function contract(name: string, callback: (accounts: Array) => void): void 10 | const artifacts: ArtifactsGlobal 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /typings/chai-bn.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | /// 3 | 4 | declare module 'chai-bn' { 5 | function chaiBN(bignumber: any): (chai: any, utils: any) => void 6 | 7 | namespace chaiBN {} 8 | 9 | export = chaiBN 10 | } 11 | 12 | declare namespace Chai { 13 | interface Equal { 14 | BN: any 15 | } 16 | interface NumberComparer { 17 | BN: any 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/contracts/mocks/MockExpansionNonCompliant.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.7.6; 2 | import "@openzeppelin/contracts/utils/Strings.sol"; 3 | 4 | contract MockExpansionNonCompliant { 5 | using Strings for uint256; 6 | 7 | // To signal being a loot Expansion contract 8 | function tokenUri(uint256 lootId) external pure returns (string memory) { 9 | return string(abi.encodePacked("https://baseURI.net/", lootId.toString())); 10 | } 11 | } -------------------------------------------------------------------------------- /src/contracts/mocks/MockExpansionNoFee.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.7.6; 2 | import "@openzeppelin/contracts/utils/Strings.sol"; 3 | 4 | contract MockExpansionNoFee { 5 | using Strings for uint256; 6 | 7 | // To signal being a loot Expansion contract 8 | function lootExpansionTokenUri(uint256 lootId) external view returns (string memory tokenUri) { 9 | return string(abi.encodePacked("https://baseURI.net/", lootId.toString())); 10 | } 11 | } -------------------------------------------------------------------------------- /typings/chai-bignumber.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module 'chai-bignumber' { 4 | function chaiBignumber(bignumber: any): (chai: any, utils: any) => void 5 | 6 | namespace chaiBignumber {} 7 | 8 | export = chaiBignumber 9 | } 10 | 11 | declare namespace Chai { 12 | // For BDD API 13 | interface Assertion extends LanguageChains, NumericComparison, TypeComparison { 14 | bignumber: Assertion 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "expansions-contracts", 3 | "version": "0.0.1", 4 | "description": "Loot Expansion Registry Contracts", 5 | "repository": "https://github.com/lootproject/expansions-contracts", 6 | "license": "Apache-2.0", 7 | "main": "gen/adapter/index.js", 8 | "types": "gen/typechain/index.ts", 9 | "scripts": {}, 10 | "optionalDependencies": { 11 | "ethers": "^5.0.32" 12 | }, 13 | "dependencies": {}, 14 | "devDependencies": { 15 | "@openzeppelin/contracts": "3.4.2-solc-0.7" 16 | }, 17 | "keywords": [ 18 | "Ethereum" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/gen/typechain/commons.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { EventFilter, Event } from "ethers"; 6 | import { Result } from "@ethersproject/abi"; 7 | 8 | export interface TypedEventFilter<_EventArgsArray, _EventArgsObject> 9 | extends EventFilter {} 10 | 11 | export interface TypedEvent extends Event { 12 | args: EventArgs; 13 | } 14 | 15 | export type TypedListener< 16 | EventArgsArray extends Array, 17 | EventArgsObject 18 | > = ( 19 | ...listenerArg: [ 20 | ...EventArgsArray, 21 | TypedEvent 22 | ] 23 | ) => void; 24 | -------------------------------------------------------------------------------- /src/contracts/migrations/Migrations.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Apache-2.0 2 | pragma solidity 0.7.6; 3 | 4 | 5 | contract Migrations { 6 | address public owner; 7 | uint public last_completed_migration; 8 | 9 | constructor() public { 10 | owner = msg.sender; 11 | } 12 | 13 | modifier restricted() { 14 | if (msg.sender == owner) 15 | _; 16 | } 17 | 18 | function setCompleted(uint completed) public restricted { 19 | last_completed_migration = completed; 20 | } 21 | 22 | function upgrade(address new_address) public restricted { 23 | Migrations upgraded = Migrations(new_address); 24 | upgraded.setCompleted(last_completed_migration); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/utils/index.ts: -------------------------------------------------------------------------------- 1 | import * as chai from 'chai' 2 | import chaiAsPromised from 'chai-as-promised' 3 | import chaiString from 'chai-string' 4 | import * as ethers from 'ethers' 5 | 6 | import BN = require('bn.js') // used by web3 7 | 8 | export * from './helpers' 9 | 10 | const BigNumber = ethers.BigNumber 11 | export { BigNumber } 12 | 13 | export const { assert, expect } = chai 14 | .use(chaiString) 15 | .use(chaiAsPromised) 16 | .use(require('chai-bignumber')(BigNumber)) // Used by ethers.js & waffle 17 | .use(require('bn-chai')(BN)) // Used by Web3 & truffle 18 | 19 | export function b(raw: ethers.BigNumberish): ethers.BigNumber { 20 | return ethers.BigNumber.from(raw) 21 | } 22 | -------------------------------------------------------------------------------- /src/contracts/interfaces/ILootExpansion.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.7.6; 2 | 3 | interface ILootExpansion { 4 | // To signal being a loot Expansion contract 5 | function lootExpansionTokenUri(uint256 lootId) external view returns (string memory tokenUri); 6 | 7 | // Returns the fee the expansion is charging per claim 8 | function claimFeeAmount() external view returns (uint256 feeAmount); 9 | 10 | // Returns the address to which the fee should be sent to 11 | function claimFeeRecipient() external view returns (address feeRecipient); 12 | 13 | // Return the maximum supply for this expansion. If none, return 2**256-1 14 | function maxSupply() external view returns (uint256 expansionMaxSupply); 15 | } -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Address", 4 | "sourceName": "@openzeppelin/contracts/utils/Address.sol", 5 | "abi": [], 6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ff80c1cd1665c16a698ccc713855c8e04b4b0411a7535e379d997a706e7f14cb64736f6c63430007060033", 7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ff80c1cd1665c16a698ccc713855c8e04b4b0411a7535e379d997a706e7f14cb64736f6c63430007060033", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Strings", 4 | "sourceName": "@openzeppelin/contracts/utils/Strings.sol", 5 | "abi": [], 6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122043f7461f1728a33ff96fbc70e2b6011b84b32d3609fe07647100a6861eeaa7cc64736f6c63430007060033", 7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122043f7461f1728a33ff96fbc70e2b6011b84b32d3609fe07647100a6861eeaa7cc64736f6c63430007060033", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "SafeMath", 4 | "sourceName": "@openzeppelin/contracts/math/SafeMath.sol", 5 | "abi": [], 6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122007ba3be99120b8d191a452bb38aef0b3c152b140866a6e63142d088e926df69064736f6c63430007060033", 7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122007ba3be99120b8d191a452bb38aef0b3c152b140866a6e63142d088e926df69064736f6c63430007060033", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/utils/EnumerableMap.sol/EnumerableMap.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "EnumerableMap", 4 | "sourceName": "@openzeppelin/contracts/utils/EnumerableMap.sol", 5 | "abi": [], 6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a228c6e32b5403d39ad07c8ddf94d22b7ac5e1616afcf9e3d91e9028efa2031f64736f6c63430007060033", 7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a228c6e32b5403d39ad07c8ddf94d22b7ac5e1616afcf9e3d91e9028efa2031f64736f6c63430007060033", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/utils/EnumerableSet.sol/EnumerableSet.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "EnumerableSet", 4 | "sourceName": "@openzeppelin/contracts/utils/EnumerableSet.sol", 5 | "abi": [], 6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220846bcaf516f3fa7c51139078247293205fc85b8d02aecfa1fa619eb9ae0d3aa764736f6c63430007060033", 7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220846bcaf516f3fa7c51139078247293205fc85b8d02aecfa1fa619eb9ae0d3aa764736f6c63430007060033", 8 | "linkReferences": {}, 9 | "deployedLinkReferences": {} 10 | } 11 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/introspection/ERC165.sol/ERC165.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "ERC165", 4 | "sourceName": "@openzeppelin/contracts/introspection/ERC165.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "bytes4", 10 | "name": "interfaceId", 11 | "type": "bytes4" 12 | } 13 | ], 14 | "name": "supportsInterface", 15 | "outputs": [ 16 | { 17 | "internalType": "bool", 18 | "name": "", 19 | "type": "bool" 20 | } 21 | ], 22 | "stateMutability": "view", 23 | "type": "function" 24 | } 25 | ], 26 | "bytecode": "0x", 27 | "deployedBytecode": "0x", 28 | "linkReferences": {}, 29 | "deployedLinkReferences": {} 30 | } 31 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/introspection/IERC165.sol/IERC165.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC165", 4 | "sourceName": "@openzeppelin/contracts/introspection/IERC165.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "bytes4", 10 | "name": "interfaceId", 11 | "type": "bytes4" 12 | } 13 | ], 14 | "name": "supportsInterface", 15 | "outputs": [ 16 | { 17 | "internalType": "bool", 18 | "name": "", 19 | "type": "bool" 20 | } 21 | ], 22 | "stateMutability": "view", 23 | "type": "function" 24 | } 25 | ], 26 | "bytecode": "0x", 27 | "deployedBytecode": "0x", 28 | "linkReferences": {}, 29 | "deployedLinkReferences": {} 30 | } 31 | -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "solhint:recommended", 3 | "rules": { 4 | "quotes": "off", 5 | "const-name-snakecase": "off", 6 | "contract-name-camelcase": "off", 7 | "event-name-camelcase": "off", 8 | "func-name-mixedcase": "off", 9 | "func-param-name-mixedcase": "off", 10 | "modifier-name-mixedcase": "off", 11 | "private-vars-leading-underscore": "off", 12 | "use-forbidden-name": "off", 13 | "var-name-mixedcase": "off", 14 | "func-order": "off", 15 | "imports-on-top": "off", 16 | "ordering": "off", 17 | "no-unused-vars": "off", 18 | "no-inline-assembly": "off", 19 | "visibility-modifier-order": "off", 20 | "compiler-version": ["error", "0.7.6"], 21 | "func-visibility": ["warn", {"ignoreConstructors":true}], 22 | "reason-string": ["warn", {"maxLength": 96}] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/gen/typechain/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { ILootExpansion } from "./ILootExpansion"; 5 | export type { LootRegistry } from "./LootRegistry"; 6 | export type { Migrations } from "./Migrations"; 7 | export type { MockExpansion } from "./MockExpansion"; 8 | export type { MockExpansionNoFee } from "./MockExpansionNoFee"; 9 | export type { MockExpansionNonCompliant } from "./MockExpansionNonCompliant"; 10 | 11 | export { ILootExpansion__factory } from "./factories/ILootExpansion__factory"; 12 | export { LootRegistry__factory } from "./factories/LootRegistry__factory"; 13 | export { Migrations__factory } from "./factories/Migrations__factory"; 14 | export { MockExpansion__factory } from "./factories/MockExpansion__factory"; 15 | export { MockExpansionNoFee__factory } from "./factories/MockExpansionNoFee__factory"; 16 | export { MockExpansionNonCompliant__factory } from "./factories/MockExpansionNonCompliant__factory"; 17 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "allowSyntheticDefaultImports": true, 8 | "resolveJsonModule": true, 9 | "downlevelIteration": true, 10 | "importHelpers": true, 11 | "removeComments": false, 12 | 13 | "strictNullChecks": true, 14 | "noImplicitUseStrict": true, 15 | "noImplicitAny": false, 16 | "noImplicitReturns": true, 17 | "noImplicitThis": true, 18 | "noUnusedParameters": false, 19 | "noErrorTruncation": true, 20 | "esModuleInterop": true, 21 | 22 | "experimentalDecorators": true, 23 | "forceConsistentCasingInFileNames": true, 24 | "allowJs": false, 25 | "checkJs": false, 26 | 27 | "baseUrl": ".", 28 | "outDir": "build", 29 | "lib": ["es2017", "dom"], 30 | 31 | "typeRoots": [ 32 | "./node_modules/@types" 33 | ] 34 | }, 35 | 36 | "include": [ 37 | "typings", "tests", "utils" 38 | ], 39 | 40 | "files": ["./hardhat.config.ts"], 41 | 42 | "exclude": [ 43 | "node_modules", 44 | "dist" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const { off } = require("process") 2 | 3 | module.exports = { 4 | parser: '@typescript-eslint/parser', 5 | parserOptions: { 6 | ecmaVersion: 2018, 7 | sourceType: 'module' 8 | }, 9 | 10 | extends: [ 11 | 'plugin:@typescript-eslint/recommended', 12 | 'plugin:import/errors', 13 | 'plugin:import/warnings', 14 | 'plugin:import/typescript', 15 | 'prettier' 16 | ], 17 | 18 | rules: { 19 | '@typescript-eslint/no-unused-vars': 'off', 20 | '@typescript-eslint/no-explicit-any': 'off', 21 | '@typescript-eslint/no-non-null-assertion': 'off', 22 | '@typescript-eslint/explicit-module-boundary-types': 'off', 23 | '@typescript-eslint/ban-types': 'off', 24 | '@typescript-eslint/ban-ts-comment': 'off', 25 | '@typescript-eslint/no-empty-function': 'off', 26 | '@typescript-eslint/no-inferrable-types': 'off', 27 | '@typescript-eslint/no-var-requires': 'off', 28 | 29 | 'prefer-spread': 'off', 30 | 'prefer-const': 'off', 31 | 32 | 'import/no-unresolved': 'off', 33 | // 'import/no-default-export': 2, 34 | 'import/no-named-as-default-member': 'off', 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC721Receiver", 4 | "sourceName": "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "address", 10 | "name": "operator", 11 | "type": "address" 12 | }, 13 | { 14 | "internalType": "address", 15 | "name": "from", 16 | "type": "address" 17 | }, 18 | { 19 | "internalType": "uint256", 20 | "name": "tokenId", 21 | "type": "uint256" 22 | }, 23 | { 24 | "internalType": "bytes", 25 | "name": "data", 26 | "type": "bytes" 27 | } 28 | ], 29 | "name": "onERC721Received", 30 | "outputs": [ 31 | { 32 | "internalType": "bytes4", 33 | "name": "", 34 | "type": "bytes4" 35 | } 36 | ], 37 | "stateMutability": "nonpayable", 38 | "type": "function" 39 | } 40 | ], 41 | "bytecode": "0x", 42 | "deployedBytecode": "0x", 43 | "linkReferences": {}, 44 | "deployedLinkReferences": {} 45 | } 46 | -------------------------------------------------------------------------------- /src/contracts/mocks/MockExpansion.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.7.6; 2 | import "@openzeppelin/contracts/utils/Strings.sol"; 3 | import "../interfaces/ILootExpansion.sol"; 4 | 5 | contract MockExpansion is ILootExpansion { 6 | using Strings for uint256; 7 | uint256 feeAmount; 8 | address feeRecipient; 9 | 10 | // Set the fee for claiming 11 | function setFee(uint256 _feeAmount) external { 12 | feeAmount = _feeAmount; 13 | } 14 | 15 | // Set the fee recipient for claiming 16 | function setRecipient(address _feeRecipient) external { 17 | feeRecipient = _feeRecipient; 18 | } 19 | 20 | // To signal being a loot Expansion contract 21 | function lootExpansionTokenUri(uint256 lootId) external override pure returns (string memory) { 22 | return string(abi.encodePacked("https://baseURI.net/", lootId.toString())); 23 | } 24 | 25 | // Returns the fee the expansion is charging per claim 26 | function claimFeeAmount() external override view returns (uint256) { 27 | return feeAmount; 28 | } 29 | 30 | // Returns the address to which the fee should be sent to 31 | function claimFeeRecipient() external override view returns (address) { 32 | return feeRecipient; 33 | } 34 | 35 | // Return the maximum supply for this expansion. If none, return 2**256-1 36 | function maxSupply() external view returns (uint256) { 37 | return 8000; 38 | } 39 | } -------------------------------------------------------------------------------- /src/artifacts/contracts/interfaces/ILootExpansion.sol/ILootExpansion.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "ILootExpansion", 4 | "sourceName": "contracts/interfaces/ILootExpansion.sol", 5 | "abi": [ 6 | { 7 | "inputs": [], 8 | "name": "claimFeeAmount", 9 | "outputs": [ 10 | { 11 | "internalType": "uint256", 12 | "name": "feeAmount", 13 | "type": "uint256" 14 | } 15 | ], 16 | "stateMutability": "view", 17 | "type": "function" 18 | }, 19 | { 20 | "inputs": [], 21 | "name": "claimFeeRecipient", 22 | "outputs": [ 23 | { 24 | "internalType": "address", 25 | "name": "feeRecipient", 26 | "type": "address" 27 | } 28 | ], 29 | "stateMutability": "view", 30 | "type": "function" 31 | }, 32 | { 33 | "inputs": [ 34 | { 35 | "internalType": "uint256", 36 | "name": "lootId", 37 | "type": "uint256" 38 | } 39 | ], 40 | "name": "lootExpansionTokenUri", 41 | "outputs": [ 42 | { 43 | "internalType": "string", 44 | "name": "tokenUri", 45 | "type": "string" 46 | } 47 | ], 48 | "stateMutability": "view", 49 | "type": "function" 50 | } 51 | ], 52 | "bytecode": "0x", 53 | "deployedBytecode": "0x", 54 | "linkReferences": {}, 55 | "deployedLinkReferences": {} 56 | } 57 | -------------------------------------------------------------------------------- /src/gen/typechain/factories/ILootExpansion__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Signer } from "ethers"; 6 | import { Provider } from "@ethersproject/providers"; 7 | 8 | import type { ILootExpansion } from "../ILootExpansion"; 9 | 10 | export class ILootExpansion__factory { 11 | static connect( 12 | address: string, 13 | signerOrProvider: Signer | Provider 14 | ): ILootExpansion { 15 | return new Contract(address, _abi, signerOrProvider) as ILootExpansion; 16 | } 17 | } 18 | 19 | const _abi = [ 20 | { 21 | inputs: [], 22 | name: "claimFeeAmount", 23 | outputs: [ 24 | { 25 | internalType: "uint256", 26 | name: "feeAmount", 27 | type: "uint256", 28 | }, 29 | ], 30 | stateMutability: "view", 31 | type: "function", 32 | }, 33 | { 34 | inputs: [], 35 | name: "claimFeeRecipient", 36 | outputs: [ 37 | { 38 | internalType: "address", 39 | name: "feeRecipient", 40 | type: "address", 41 | }, 42 | ], 43 | stateMutability: "view", 44 | type: "function", 45 | }, 46 | { 47 | inputs: [ 48 | { 49 | internalType: "uint256", 50 | name: "lootId", 51 | type: "uint256", 52 | }, 53 | ], 54 | name: "lootExpansionTokenUri", 55 | outputs: [ 56 | { 57 | internalType: "string", 58 | name: "tokenUri", 59 | type: "string", 60 | }, 61 | ], 62 | stateMutability: "view", 63 | type: "function", 64 | }, 65 | ]; 66 | -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from 'hardhat/config' 2 | import { networkConfig } from './utils/config-loader' 3 | 4 | import '@nomiclabs/hardhat-truffle5' 5 | import '@nomiclabs/hardhat-ethers' 6 | import '@nomiclabs/hardhat-web3' 7 | import '@nomiclabs/hardhat-etherscan' 8 | import "@tenderly/hardhat-tenderly" 9 | 10 | import 'hardhat-gas-reporter' 11 | import 'solidity-coverage' 12 | 13 | const ganacheNetwork = { 14 | url: 'http://127.0.0.1:8545', 15 | blockGasLimit: 6000000000 16 | } 17 | 18 | const config: HardhatUserConfig = { 19 | solidity: { 20 | version: '0.7.6', 21 | settings: { 22 | optimizer: { 23 | enabled: true, 24 | runs: 999999, 25 | details: { 26 | yul: true 27 | } 28 | } 29 | } 30 | }, 31 | paths: { 32 | root: 'src', 33 | tests: '../tests' 34 | }, 35 | networks: { 36 | mainnet: networkConfig('mainnet'), 37 | rinkeby: networkConfig('rinkeby'), 38 | ganache: ganacheNetwork, 39 | coverage: { 40 | url: 'http://localhost:8555' 41 | } 42 | }, 43 | etherscan: { 44 | // Your API key for Etherscan 45 | // Obtain one at https://etherscan.io/ 46 | apiKey: networkConfig('mainnet').etherscan 47 | }, 48 | mocha: { 49 | timeout: process.env.COVERAGE ? 15 * 60 * 1000 : 30 * 1000 50 | }, 51 | gasReporter: { 52 | enabled: !!process.env.REPORT_GAS === true, 53 | currency: 'USD', 54 | gasPrice: 21, 55 | showTimeSpent: true 56 | }, 57 | tenderly: { 58 | project: "project/name", 59 | username: "username", 60 | } 61 | } 62 | 63 | export default config 64 | -------------------------------------------------------------------------------- /src/gen/adapter/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | exports.__esModule = true; 10 | exports.MockExpansionNonCompliant__factory = exports.MockExpansionNoFee__factory = exports.MockExpansion__factory = exports.Migrations__factory = exports.LootRegistry__factory = exports.ILootExpansion__factory = void 0; 11 | var ILootExpansion__factory_1 = require("./factories/ILootExpansion__factory"); 12 | __createBinding(exports, ILootExpansion__factory_1, "ILootExpansion__factory"); 13 | var LootRegistry__factory_1 = require("./factories/LootRegistry__factory"); 14 | __createBinding(exports, LootRegistry__factory_1, "LootRegistry__factory"); 15 | var Migrations__factory_1 = require("./factories/Migrations__factory"); 16 | __createBinding(exports, Migrations__factory_1, "Migrations__factory"); 17 | var MockExpansion__factory_1 = require("./factories/MockExpansion__factory"); 18 | __createBinding(exports, MockExpansion__factory_1, "MockExpansion__factory"); 19 | var MockExpansionNoFee__factory_1 = require("./factories/MockExpansionNoFee__factory"); 20 | __createBinding(exports, MockExpansionNoFee__factory_1, "MockExpansionNoFee__factory"); 21 | var MockExpansionNonCompliant__factory_1 = require("./factories/MockExpansionNonCompliant__factory"); 22 | __createBinding(exports, MockExpansionNonCompliant__factory_1, "MockExpansionNonCompliant__factory"); 23 | -------------------------------------------------------------------------------- /src/gen/adapter/factories/ILootExpansion__factory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* Autogenerated file. Do not edit manually. */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | exports.__esModule = true; 6 | exports.ILootExpansion__factory = void 0; 7 | var ethers_1 = require("ethers"); 8 | var ILootExpansion__factory = /** @class */ (function () { 9 | function ILootExpansion__factory() { 10 | } 11 | ILootExpansion__factory.connect = function (address, signerOrProvider) { 12 | return new ethers_1.Contract(address, _abi, signerOrProvider); 13 | }; 14 | return ILootExpansion__factory; 15 | }()); 16 | exports.ILootExpansion__factory = ILootExpansion__factory; 17 | var _abi = [ 18 | { 19 | inputs: [], 20 | name: "claimFeeAmount", 21 | outputs: [ 22 | { 23 | internalType: "uint256", 24 | name: "feeAmount", 25 | type: "uint256" 26 | }, 27 | ], 28 | stateMutability: "view", 29 | type: "function" 30 | }, 31 | { 32 | inputs: [], 33 | name: "claimFeeRecipient", 34 | outputs: [ 35 | { 36 | internalType: "address", 37 | name: "feeRecipient", 38 | type: "address" 39 | }, 40 | ], 41 | stateMutability: "view", 42 | type: "function" 43 | }, 44 | { 45 | inputs: [ 46 | { 47 | internalType: "uint256", 48 | name: "lootId", 49 | type: "uint256" 50 | }, 51 | ], 52 | name: "lootExpansionTokenUri", 53 | outputs: [ 54 | { 55 | internalType: "string", 56 | name: "tokenUri", 57 | type: "string" 58 | }, 59 | ], 60 | stateMutability: "view", 61 | type: "function" 62 | }, 63 | ]; 64 | -------------------------------------------------------------------------------- /utils/config-loader.ts: -------------------------------------------------------------------------------- 1 | import * as dotenv from 'dotenv' 2 | import * as path from 'path' 3 | import { HttpNetworkConfig } from 'hardhat/types' 4 | import { ethers } from 'ethers' 5 | 6 | type EthereumNetworksTypes = 'rinkeby' | 'ropsten' | 'kovan' | 'goerli' | 'mainnet' | 'mumbai' | 'matic' | 'arbitrum' | 'arbitrum-testnet' 7 | 8 | export const getEnvConfig = (env: string) => { 9 | const envFile = path.resolve(__dirname, `../config/${env}.env`) 10 | const envLoad = dotenv.config({ path: envFile }) 11 | 12 | if (envLoad.error) { 13 | console.warn('No config found, using default') 14 | return { ETH_MNEMONIC: ethers.Wallet.createRandom().mnemonic.phrase } 15 | } 16 | 17 | return envLoad.parsed || {} 18 | } 19 | 20 | export const networkGasMultiplier = (network: EthereumNetworksTypes): number => { 21 | switch (network) { 22 | case 'arbitrum-testnet': 23 | case 'arbitrum': 24 | return 5 25 | 26 | default: 27 | return 1 28 | } 29 | } 30 | 31 | export const networkRpcUrl = (network: EthereumNetworksTypes): string => { 32 | const config = getEnvConfig('PROD') 33 | return `https://${network}.infura.io/v3/${config['INFURA_API_KEY']}` 34 | } 35 | 36 | export const networkChainId = (network: EthereumNetworksTypes): number => { 37 | const config = getEnvConfig('PROD') 38 | 39 | switch (network) { 40 | case 'mumbai': 41 | return 80001 42 | 43 | case 'ropsten': 44 | return 3 45 | 46 | case 'matic': 47 | return 137 48 | 49 | case 'arbitrum-testnet': 50 | return 421611 51 | 52 | case 'arbitrum': 53 | return 42161 54 | 55 | case 'rinkeby': 56 | return 4 57 | 58 | case 'goerli': 59 | return 5 60 | 61 | case 'mainnet': 62 | return 1 63 | 64 | case 'kovan': 65 | return 42 66 | } 67 | } 68 | 69 | export const networkConfig = (network: EthereumNetworksTypes): HttpNetworkConfig & { etherscan?: string } => { 70 | const config = getEnvConfig('PROD') 71 | return { 72 | url: networkRpcUrl(network), 73 | chainId: networkChainId(network), 74 | accounts: { 75 | mnemonic: config['ETH_MNEMONIC'], 76 | initialIndex: 0, 77 | count: 10, 78 | path: `m/44'/60'/0'/0` 79 | }, 80 | gas: 'auto', 81 | gasPrice: 'auto', 82 | gasMultiplier: networkGasMultiplier(network), 83 | timeout: 20000, 84 | httpHeaders: {}, 85 | etherscan: config['ETHERSCAN'] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /utils/deploy-contracts.ts: -------------------------------------------------------------------------------- 1 | import { network, run, config, tenderly } from 'hardhat' 2 | import * as _ from 'lodash' 3 | import ora from 'ora' 4 | 5 | import { 6 | Example__factory, 7 | } from '../src/gen/typechain' 8 | 9 | import { UniversalDeployer } from '@0xsequence/deployer' 10 | import { ContractFactory, BigNumber, providers } from 'ethers' 11 | import fs from 'fs' 12 | 13 | const prompt = ora() 14 | 15 | /** 16 | * @notice Deploy contract via universal deployer 17 | */ 18 | 19 | const provider = new providers.Web3Provider(network.provider.send) 20 | const signer = provider.getSigner() 21 | const universalDeployer = new UniversalDeployer(network.name, signer.provider) 22 | const txParams = { 23 | gasLimit: 6000000, 24 | gasPrice: BigNumber.from(10) 25 | .pow(9) 26 | .mul(16) 27 | } 28 | 29 | const attempVerify = async (name: string, _: new () => T, address: string, ...args: Parameters) => { 30 | try { 31 | await run("verify:verify", { 32 | address: address, 33 | constructorArguments: args, 34 | }) 35 | } catch {} 36 | 37 | try { 38 | await tenderly.verify({ 39 | name: name, 40 | address: address, 41 | }) 42 | } catch {} 43 | } 44 | 45 | const buildNetworkJson = (...contracts: { name: string, address: string }[]) => { 46 | return contracts.map((c) => ({ 47 | contractName: c.name, 48 | address: c.address 49 | })) 50 | } 51 | 52 | const main = async () => { 53 | prompt.info(`Network Name: ${network.name}`) 54 | prompt.info(`Local Deployer Address: ${await signer.getAddress()}`) 55 | prompt.info(`Local Deployer Balance: ${await signer.getBalance()}`) 56 | 57 | // Deploying contracts 58 | const exampleContract = await universalDeployer.deploy('Example', Example__factory, txParams) 59 | 60 | // Logger 61 | prompt.start(`writing deployment information to ${network.name}.json`) 62 | fs.writeFileSync(`./src/networks/${network.name}.json`, JSON.stringify(buildNetworkJson( 63 | { name: "ExampleContract", address: exampleContract.address }, 64 | ), null, 2)) 65 | prompt.succeed() 66 | 67 | // Verifying contracts via Tenderly 68 | prompt.start(`verifying contracts`) 69 | await attempVerify("Factory", Example__factory, exampleContract.address) 70 | 71 | prompt.succeed() 72 | } 73 | 74 | // We recommend this pattern to be able to use async/await everywhere 75 | // and properly handle errors. 76 | main() 77 | .then(() => { 78 | process.exit(0) 79 | }) 80 | .catch(error => { 81 | console.error(error) 82 | process.exit(1) 83 | }) 84 | -------------------------------------------------------------------------------- /src/contracts/LootRegistry.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.7.6; 2 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; 3 | import "./interfaces/ILootExpansion.sol"; 4 | 5 | contract LootRegistry is ERC721 { 6 | 7 | // Track all expansions in an array 8 | address[] public expansions; 9 | 10 | // Mapping between expansion ID and its address 11 | mapping (uint256 => address) public expansionIDtoAddress; 12 | 13 | // Mapping between expansion address and its ID 14 | mapping (address => uint256) public expansionAddressToID; 15 | 16 | // Register the claiming fee amount for each expansion 17 | mapping (address => uint256) public claimingFee; 18 | 19 | // Register the claiming fee recipient for each expansion 20 | mapping (address => address) public feeRecipient; 21 | 22 | // Events 23 | event ExpansionRegistered(address indexed expansionAddress, uint256 indexed expansionID, uint256 indexed feeAmount, address feeRecipient); 24 | 25 | constructor() ERC721("LootRegistry", "LootExpansion") {} 26 | 27 | /** 28 | * @notice Will add a new loot expansion contract in the registry 29 | * @param _expansionAddress Address of the expansion contract to add to registry 30 | */ 31 | function registerLootExpansion(address _expansionAddress) external { 32 | require( 33 | expansionAddressToID[_expansionAddress] == 0, 34 | "LootRegistry#registerLootExpansion: Expansion already registered" 35 | ); 36 | 37 | // Check if contract implements lootExpansionTokenUri and if it returns anything 38 | try ILootExpansion(_expansionAddress).lootExpansionTokenUri(1) returns (string memory _uri) { 39 | require(bytes(_uri).length > 0, "LootRegistry#registerLootExpansion: Expansion doesn't support lootExpansionTokenUri"); 40 | } catch { 41 | revert("LootRegistry#registerLootExpansion: Expansion doesn't support lootExpansionTokenUri"); 42 | } 43 | 44 | // Register expansion information 45 | expansions.push(_expansionAddress); 46 | uint256 expansionID = expansions.length; 47 | expansionIDtoAddress[expansionID] = _expansionAddress; 48 | expansionAddressToID[_expansionAddress] = expansionID; 49 | 50 | // Try see if expansion implements a fee 51 | try ILootExpansion(_expansionAddress).claimFeeAmount() returns (uint256 _fee) { 52 | claimingFee[_expansionAddress] = _fee; 53 | feeRecipient[_expansionAddress] = ILootExpansion(_expansionAddress).claimFeeRecipient(); 54 | } catch { 55 | // Do nothing 56 | } 57 | 58 | // Emit event of expansion registration 59 | emit ExpansionRegistered(_expansionAddress, expansionID, claimingFee[_expansionAddress] , feeRecipient[_expansionAddress]); 60 | } 61 | 62 | /** 63 | * @notice Return array of all expansions registered 64 | */ 65 | function getExpansions() external view returns (address[] memory) { 66 | return expansions; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /src/gen/typechain/factories/MockExpansionNoFee__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Signer, Contract, ContractFactory, Overrides } from "ethers"; 6 | import { Provider, TransactionRequest } from "@ethersproject/providers"; 7 | 8 | import type { MockExpansionNoFee } from "../MockExpansionNoFee"; 9 | 10 | export class MockExpansionNoFee__factory extends ContractFactory { 11 | constructor(signer?: Signer) { 12 | super(_abi, _bytecode, signer); 13 | } 14 | 15 | deploy( 16 | overrides?: Overrides & { from?: string | Promise } 17 | ): Promise { 18 | return super.deploy(overrides || {}) as Promise; 19 | } 20 | getDeployTransaction( 21 | overrides?: Overrides & { from?: string | Promise } 22 | ): TransactionRequest { 23 | return super.getDeployTransaction(overrides || {}); 24 | } 25 | attach(address: string): MockExpansionNoFee { 26 | return super.attach(address) as MockExpansionNoFee; 27 | } 28 | connect(signer: Signer): MockExpansionNoFee__factory { 29 | return super.connect(signer) as MockExpansionNoFee__factory; 30 | } 31 | static connect( 32 | address: string, 33 | signerOrProvider: Signer | Provider 34 | ): MockExpansionNoFee { 35 | return new Contract(address, _abi, signerOrProvider) as MockExpansionNoFee; 36 | } 37 | } 38 | 39 | const _abi = [ 40 | { 41 | inputs: [ 42 | { 43 | internalType: "uint256", 44 | name: "lootId", 45 | type: "uint256", 46 | }, 47 | ], 48 | name: "lootExpansionTokenUri", 49 | outputs: [ 50 | { 51 | internalType: "string", 52 | name: "tokenUri", 53 | type: "string", 54 | }, 55 | ], 56 | stateMutability: "view", 57 | type: "function", 58 | }, 59 | ]; 60 | 61 | const _bytecode = 62 | "0x608060405234801561001057600080fd5b506102e4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80633f5c50c414610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea26469706673582212203d9b8b351ebe40fc2d9d02651e14ee5df6866c6bdf6e3ddc92b39fadff4a6d6e64736f6c63430007060033"; 63 | -------------------------------------------------------------------------------- /src/gen/typechain/factories/MockExpansionNonCompliant__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Signer, Contract, ContractFactory, Overrides } from "ethers"; 6 | import { Provider, TransactionRequest } from "@ethersproject/providers"; 7 | 8 | import type { MockExpansionNonCompliant } from "../MockExpansionNonCompliant"; 9 | 10 | export class MockExpansionNonCompliant__factory extends ContractFactory { 11 | constructor(signer?: Signer) { 12 | super(_abi, _bytecode, signer); 13 | } 14 | 15 | deploy( 16 | overrides?: Overrides & { from?: string | Promise } 17 | ): Promise { 18 | return super.deploy(overrides || {}) as Promise; 19 | } 20 | getDeployTransaction( 21 | overrides?: Overrides & { from?: string | Promise } 22 | ): TransactionRequest { 23 | return super.getDeployTransaction(overrides || {}); 24 | } 25 | attach(address: string): MockExpansionNonCompliant { 26 | return super.attach(address) as MockExpansionNonCompliant; 27 | } 28 | connect(signer: Signer): MockExpansionNonCompliant__factory { 29 | return super.connect(signer) as MockExpansionNonCompliant__factory; 30 | } 31 | static connect( 32 | address: string, 33 | signerOrProvider: Signer | Provider 34 | ): MockExpansionNonCompliant { 35 | return new Contract( 36 | address, 37 | _abi, 38 | signerOrProvider 39 | ) as MockExpansionNonCompliant; 40 | } 41 | } 42 | 43 | const _abi = [ 44 | { 45 | inputs: [ 46 | { 47 | internalType: "uint256", 48 | name: "lootId", 49 | type: "uint256", 50 | }, 51 | ], 52 | name: "tokenUri", 53 | outputs: [ 54 | { 55 | internalType: "string", 56 | name: "", 57 | type: "string", 58 | }, 59 | ], 60 | stateMutability: "pure", 61 | type: "function", 62 | }, 63 | ]; 64 | 65 | const _bytecode = 66 | "0x608060405234801561001057600080fd5b506102e4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631675f45514610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea2646970667358221220204ccfe7998f8dae8211cb68e469b027d94945a2783fafaa320e870bd933668364736f6c63430007060033"; 67 | -------------------------------------------------------------------------------- /src/artifacts/contracts/mocks/MockExpansionNoFee.sol/MockExpansionNoFee.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "MockExpansionNoFee", 4 | "sourceName": "contracts/mocks/MockExpansionNoFee.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "uint256", 10 | "name": "lootId", 11 | "type": "uint256" 12 | } 13 | ], 14 | "name": "lootExpansionTokenUri", 15 | "outputs": [ 16 | { 17 | "internalType": "string", 18 | "name": "tokenUri", 19 | "type": "string" 20 | } 21 | ], 22 | "stateMutability": "view", 23 | "type": "function" 24 | } 25 | ], 26 | "bytecode": "0x608060405234801561001057600080fd5b506102e4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80633f5c50c414610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea26469706673582212203d9b8b351ebe40fc2d9d02651e14ee5df6866c6bdf6e3ddc92b39fadff4a6d6e64736f6c63430007060033", 27 | "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80633f5c50c414610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea26469706673582212203d9b8b351ebe40fc2d9d02651e14ee5df6866c6bdf6e3ddc92b39fadff4a6d6e64736f6c63430007060033", 28 | "linkReferences": {}, 29 | "deployedLinkReferences": {} 30 | } 31 | -------------------------------------------------------------------------------- /src/artifacts/contracts/mocks/MockExpansionNonCompliant.sol/MockExpansionNonCompliant.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "MockExpansionNonCompliant", 4 | "sourceName": "contracts/mocks/MockExpansionNonCompliant.sol", 5 | "abi": [ 6 | { 7 | "inputs": [ 8 | { 9 | "internalType": "uint256", 10 | "name": "lootId", 11 | "type": "uint256" 12 | } 13 | ], 14 | "name": "tokenUri", 15 | "outputs": [ 16 | { 17 | "internalType": "string", 18 | "name": "", 19 | "type": "string" 20 | } 21 | ], 22 | "stateMutability": "pure", 23 | "type": "function" 24 | } 25 | ], 26 | "bytecode": "0x608060405234801561001057600080fd5b506102e4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631675f45514610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea2646970667358221220204ccfe7998f8dae8211cb68e469b027d94945a2783fafaa320e870bd933668364736f6c63430007060033", 27 | "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631675f45514610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea2646970667358221220204ccfe7998f8dae8211cb68e469b027d94945a2783fafaa320e870bd933668364736f6c63430007060033", 28 | "linkReferences": {}, 29 | "deployedLinkReferences": {} 30 | } 31 | -------------------------------------------------------------------------------- /src/gen/typechain/factories/Migrations__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Signer, Contract, ContractFactory, Overrides } from "ethers"; 6 | import { Provider, TransactionRequest } from "@ethersproject/providers"; 7 | 8 | import type { Migrations } from "../Migrations"; 9 | 10 | export class Migrations__factory extends ContractFactory { 11 | constructor(signer?: Signer) { 12 | super(_abi, _bytecode, signer); 13 | } 14 | 15 | deploy( 16 | overrides?: Overrides & { from?: string | Promise } 17 | ): Promise { 18 | return super.deploy(overrides || {}) as Promise; 19 | } 20 | getDeployTransaction( 21 | overrides?: Overrides & { from?: string | Promise } 22 | ): TransactionRequest { 23 | return super.getDeployTransaction(overrides || {}); 24 | } 25 | attach(address: string): Migrations { 26 | return super.attach(address) as Migrations; 27 | } 28 | connect(signer: Signer): Migrations__factory { 29 | return super.connect(signer) as Migrations__factory; 30 | } 31 | static connect( 32 | address: string, 33 | signerOrProvider: Signer | Provider 34 | ): Migrations { 35 | return new Contract(address, _abi, signerOrProvider) as Migrations; 36 | } 37 | } 38 | 39 | const _abi = [ 40 | { 41 | inputs: [], 42 | stateMutability: "nonpayable", 43 | type: "constructor", 44 | }, 45 | { 46 | inputs: [], 47 | name: "last_completed_migration", 48 | outputs: [ 49 | { 50 | internalType: "uint256", 51 | name: "", 52 | type: "uint256", 53 | }, 54 | ], 55 | stateMutability: "view", 56 | type: "function", 57 | }, 58 | { 59 | inputs: [], 60 | name: "owner", 61 | outputs: [ 62 | { 63 | internalType: "address", 64 | name: "", 65 | type: "address", 66 | }, 67 | ], 68 | stateMutability: "view", 69 | type: "function", 70 | }, 71 | { 72 | inputs: [ 73 | { 74 | internalType: "uint256", 75 | name: "completed", 76 | type: "uint256", 77 | }, 78 | ], 79 | name: "setCompleted", 80 | outputs: [], 81 | stateMutability: "nonpayable", 82 | type: "function", 83 | }, 84 | { 85 | inputs: [ 86 | { 87 | internalType: "address", 88 | name: "new_address", 89 | type: "address", 90 | }, 91 | ], 92 | name: "upgrade", 93 | outputs: [], 94 | stateMutability: "nonpayable", 95 | type: "function", 96 | }, 97 | ]; 98 | 99 | const _bytecode = 100 | "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610202806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100865780638da5cb5b146100a0578063fdacd576146100d1575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100ee565b005b61008e610185565b60408051918252519081900360200190f35b6100a861018b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610084600480360360208110156100e757600080fd5b50356101a7565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561016857600080fd5b505af115801561017c573d6000803e3d6000fd5b50505050505b50565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760015556fea2646970667358221220c356fd16dd98acec36d2966175de7f7a7fa5a8bb405384b0de6773cfb8ada45864736f6c63430007060033"; 101 | -------------------------------------------------------------------------------- /src/artifacts/contracts/migrations/Migrations.sol/Migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "Migrations", 4 | "sourceName": "contracts/migrations/Migrations.sol", 5 | "abi": [ 6 | { 7 | "inputs": [], 8 | "stateMutability": "nonpayable", 9 | "type": "constructor" 10 | }, 11 | { 12 | "inputs": [], 13 | "name": "last_completed_migration", 14 | "outputs": [ 15 | { 16 | "internalType": "uint256", 17 | "name": "", 18 | "type": "uint256" 19 | } 20 | ], 21 | "stateMutability": "view", 22 | "type": "function" 23 | }, 24 | { 25 | "inputs": [], 26 | "name": "owner", 27 | "outputs": [ 28 | { 29 | "internalType": "address", 30 | "name": "", 31 | "type": "address" 32 | } 33 | ], 34 | "stateMutability": "view", 35 | "type": "function" 36 | }, 37 | { 38 | "inputs": [ 39 | { 40 | "internalType": "uint256", 41 | "name": "completed", 42 | "type": "uint256" 43 | } 44 | ], 45 | "name": "setCompleted", 46 | "outputs": [], 47 | "stateMutability": "nonpayable", 48 | "type": "function" 49 | }, 50 | { 51 | "inputs": [ 52 | { 53 | "internalType": "address", 54 | "name": "new_address", 55 | "type": "address" 56 | } 57 | ], 58 | "name": "upgrade", 59 | "outputs": [], 60 | "stateMutability": "nonpayable", 61 | "type": "function" 62 | } 63 | ], 64 | "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610202806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100865780638da5cb5b146100a0578063fdacd576146100d1575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100ee565b005b61008e610185565b60408051918252519081900360200190f35b6100a861018b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610084600480360360208110156100e757600080fd5b50356101a7565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561016857600080fd5b505af115801561017c573d6000803e3d6000fd5b50505050505b50565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760015556fea2646970667358221220c356fd16dd98acec36d2966175de7f7a7fa5a8bb405384b0de6773cfb8ada45864736f6c63430007060033", 65 | "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100865780638da5cb5b146100a0578063fdacd576146100d1575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100ee565b005b61008e610185565b60408051918252519081900360200190f35b6100a861018b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610084600480360360208110156100e757600080fd5b50356101a7565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561016857600080fd5b505af115801561017c573d6000803e3d6000fd5b50505050505b50565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760015556fea2646970667358221220c356fd16dd98acec36d2966175de7f7a7fa5a8bb405384b0de6773cfb8ada45864736f6c63430007060033", 66 | "linkReferences": {}, 67 | "deployedLinkReferences": {} 68 | } 69 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "root", 3 | "private": true, 4 | "workspaces": ["src"], 5 | "license": "Apache-2.0", 6 | "scripts": { 7 | "build": "yarn clean && yarn compile && yarn adapter", 8 | "clean": "rimraf src/artifacts && rimraf src/gen && rimraf cache", 9 | "compile": "hardhat --max-memory 4096 compile", 10 | "adapter": "yarn adapter:gen && yarn adapter:build", 11 | "adapter:gen": "rimraf src/gen/typechain && typechain --target ethers-v5 --outDir src/gen/typechain './src/artifacts/contracts/**/*[^dbg].json'", 12 | "adapter:build": "rimraf src/gen/adapter && tsc ./src/gen/typechain/index.ts --outDir ./src/gen/adapter", 13 | "test": "yarn build && hardhat test", 14 | "quicktest": "hardhat test", 15 | "precoverage": "yarn build", 16 | "coverage": "COVERAGE=true NET_ID=1 hardhat coverage --network coverage", 17 | "benchmark": "BENCHMARK=true yarn test", 18 | "lint": "yarn lint:ts && yarn lint:sol", 19 | "lint:fix": "yarn lint:ts:fix && yarn lint:sol:fix", 20 | "lint:sol": "solhint './src/contracts/**/*.sol'", 21 | "lint:sol:fix": "solhint './src/contracts/**/*.sol' --fix", 22 | "lint:ts": "eslint -c .eslintrc.js './**/*.ts'", 23 | "lint:ts:fix": "eslint -c .eslintrc.js --fix './**/*.ts'", 24 | "format": "prettier --write ./**/*.ts", 25 | "start:ganache": "ganache-cli --chainId ${npm_package_config_ganacheChainID} --networkId ${npm_package_config_ganacheChainID} --port ${npm_package_config_ganachePort} --gasLimit ${npm_package_config_ganacheGasLimit} --gasPrice ${npm_package_config_ganacheGasPrice} --defaultBalanceEther ${npm_package_config_etherBalance} --deterministic --mnemonic \"${npm_package_config_mnemonic}\" ${npm_package_config_extra}", 26 | "start:ganache:verbose": "yarn run start:ganache --verbose", 27 | "stop:ganache": "ps aux | grep ganache-cli | grep -v grep | awk '{print $2}' | xargs kill -9", 28 | "deploy:ganache": "hardhat run --network ganache utils/deploy-contracts.ts", 29 | "deploy": "hardhat run utils/deploy-contracts.ts --network", 30 | "verify": "hardhat verify --network", 31 | "release": "yarn publish src" 32 | }, 33 | "husky": { 34 | "hooks": { 35 | "pre-commit": "yarn lint", 36 | "pre-push": "yarn lint && yarn test" 37 | } 38 | }, 39 | "devDependencies": { 40 | "@0xsequence/deployer": "^0.21.5", 41 | "@nomiclabs/hardhat-ethers": "^2.0.2", 42 | "@nomiclabs/hardhat-etherscan": "^2.1.4", 43 | "@nomiclabs/hardhat-truffle5": "^2.0.0", 44 | "@nomiclabs/hardhat-web3": "^2.0.0", 45 | "@tenderly/hardhat-tenderly": "^1.0.11", 46 | "@typechain/ethers-v5": "^6.0.3", 47 | "@types/chai-as-promised": "^7.1.0", 48 | "@types/chai-string": "^1.4.1", 49 | "@types/mocha": "^8.2.1", 50 | "@typescript-eslint/eslint-plugin": "^4.18.0", 51 | "@typescript-eslint/parser": "^4.18.0", 52 | "bn-chai": "^1.0.1", 53 | "chai": "^4.3.4", 54 | "chai-as-promised": "^7.1.1", 55 | "chai-bignumber": "^3.0.0", 56 | "chai-string": "^1.5.0", 57 | "child_process": "^1.0.2", 58 | "dotenv": "^8.2.0", 59 | "eslint": "^7.22.0", 60 | "eslint-config-prettier": "^8.1.0", 61 | "eslint-plugin-import": "^2.22.0", 62 | "eslint-plugin-prettier": "^3.3.1", 63 | "ethers": "^5.0.32", 64 | "ganache-cli": "6.12.2", 65 | "hardhat": "2.1.1", 66 | "hardhat-gas-reporter": "1.0.4", 67 | "husky": "^4.2.3", 68 | "rimraf": "^3.0.2", 69 | "scrypt": "github:barrysteyn/node-scrypt#fb60a8d3c158fe115a624b5ffa7480f3a24b03fb", 70 | "solhint": "^3.3.4", 71 | "solidity-coverage": "^0.7.16", 72 | "ts-node": "^9.1.1", 73 | "typechain": "^4.0.3", 74 | "typescript": "^4.2.3" 75 | }, 76 | "config": { 77 | "mnemonic": "test test test test test test test test test test test junk", 78 | "ganacheChainID": 127001, 79 | "ganachePort": 8545, 80 | "ganacheGasLimit": "0xfffffffffff", 81 | "ganacheGasPrice": "2", 82 | "etherBalance": "100000", 83 | "extra": "" 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/gen/adapter/factories/MockExpansionNoFee__factory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* Autogenerated file. Do not edit manually. */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | if (typeof b !== "function" && b !== null) 14 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 15 | extendStatics(d, b); 16 | function __() { this.constructor = d; } 17 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 18 | }; 19 | })(); 20 | exports.__esModule = true; 21 | exports.MockExpansionNoFee__factory = void 0; 22 | var ethers_1 = require("ethers"); 23 | var MockExpansionNoFee__factory = /** @class */ (function (_super) { 24 | __extends(MockExpansionNoFee__factory, _super); 25 | function MockExpansionNoFee__factory(signer) { 26 | return _super.call(this, _abi, _bytecode, signer) || this; 27 | } 28 | MockExpansionNoFee__factory.prototype.deploy = function (overrides) { 29 | return _super.prototype.deploy.call(this, overrides || {}); 30 | }; 31 | MockExpansionNoFee__factory.prototype.getDeployTransaction = function (overrides) { 32 | return _super.prototype.getDeployTransaction.call(this, overrides || {}); 33 | }; 34 | MockExpansionNoFee__factory.prototype.attach = function (address) { 35 | return _super.prototype.attach.call(this, address); 36 | }; 37 | MockExpansionNoFee__factory.prototype.connect = function (signer) { 38 | return _super.prototype.connect.call(this, signer); 39 | }; 40 | MockExpansionNoFee__factory.connect = function (address, signerOrProvider) { 41 | return new ethers_1.Contract(address, _abi, signerOrProvider); 42 | }; 43 | return MockExpansionNoFee__factory; 44 | }(ethers_1.ContractFactory)); 45 | exports.MockExpansionNoFee__factory = MockExpansionNoFee__factory; 46 | var _abi = [ 47 | { 48 | inputs: [ 49 | { 50 | internalType: "uint256", 51 | name: "lootId", 52 | type: "uint256" 53 | }, 54 | ], 55 | name: "lootExpansionTokenUri", 56 | outputs: [ 57 | { 58 | internalType: "string", 59 | name: "tokenUri", 60 | type: "string" 61 | }, 62 | ], 63 | stateMutability: "view", 64 | type: "function" 65 | }, 66 | ]; 67 | var _bytecode = "0x608060405234801561001057600080fd5b506102e4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80633f5c50c414610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea26469706673582212203d9b8b351ebe40fc2d9d02651e14ee5df6866c6bdf6e3ddc92b39fadff4a6d6e64736f6c63430007060033"; 68 | -------------------------------------------------------------------------------- /src/gen/adapter/factories/MockExpansionNonCompliant__factory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* Autogenerated file. Do not edit manually. */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | if (typeof b !== "function" && b !== null) 14 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 15 | extendStatics(d, b); 16 | function __() { this.constructor = d; } 17 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 18 | }; 19 | })(); 20 | exports.__esModule = true; 21 | exports.MockExpansionNonCompliant__factory = void 0; 22 | var ethers_1 = require("ethers"); 23 | var MockExpansionNonCompliant__factory = /** @class */ (function (_super) { 24 | __extends(MockExpansionNonCompliant__factory, _super); 25 | function MockExpansionNonCompliant__factory(signer) { 26 | return _super.call(this, _abi, _bytecode, signer) || this; 27 | } 28 | MockExpansionNonCompliant__factory.prototype.deploy = function (overrides) { 29 | return _super.prototype.deploy.call(this, overrides || {}); 30 | }; 31 | MockExpansionNonCompliant__factory.prototype.getDeployTransaction = function (overrides) { 32 | return _super.prototype.getDeployTransaction.call(this, overrides || {}); 33 | }; 34 | MockExpansionNonCompliant__factory.prototype.attach = function (address) { 35 | return _super.prototype.attach.call(this, address); 36 | }; 37 | MockExpansionNonCompliant__factory.prototype.connect = function (signer) { 38 | return _super.prototype.connect.call(this, signer); 39 | }; 40 | MockExpansionNonCompliant__factory.connect = function (address, signerOrProvider) { 41 | return new ethers_1.Contract(address, _abi, signerOrProvider); 42 | }; 43 | return MockExpansionNonCompliant__factory; 44 | }(ethers_1.ContractFactory)); 45 | exports.MockExpansionNonCompliant__factory = MockExpansionNonCompliant__factory; 46 | var _abi = [ 47 | { 48 | inputs: [ 49 | { 50 | internalType: "uint256", 51 | name: "lootId", 52 | type: "uint256" 53 | }, 54 | ], 55 | name: "tokenUri", 56 | outputs: [ 57 | { 58 | internalType: "string", 59 | name: "", 60 | type: "string" 61 | }, 62 | ], 63 | stateMutability: "pure", 64 | type: "function" 65 | }, 66 | ]; 67 | var _bytecode = "0x608060405234801561001057600080fd5b506102e4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631675f45514610030575b600080fd5b61004d6004803603602081101561004657600080fd5b50356100c2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561008757818101518382015260200161006f565b50505050905090810190601f1680156100b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606100cd82610181565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061014557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610108565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b6060816101c2575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261017c565b8160005b81156101da57600101600a820491506101c6565b60008167ffffffffffffffff811180156101f357600080fd5b506040519080825280601f01601f19166020018201604052801561021e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b83156102a557600a840660300160f81b8282806001900393508151811061026b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610248565b5094935050505056fea2646970667358221220204ccfe7998f8dae8211cb68e469b027d94945a2783fafaa320e870bd933668364736f6c63430007060033"; 68 | -------------------------------------------------------------------------------- /src/gen/typechain/MockExpansionNonCompliant.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { 6 | ethers, 7 | EventFilter, 8 | Signer, 9 | BigNumber, 10 | BigNumberish, 11 | PopulatedTransaction, 12 | Contract, 13 | ContractTransaction, 14 | CallOverrides, 15 | } from "ethers"; 16 | import { BytesLike } from "@ethersproject/bytes"; 17 | import { Listener, Provider } from "@ethersproject/providers"; 18 | import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; 19 | import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; 20 | 21 | interface MockExpansionNonCompliantInterface extends ethers.utils.Interface { 22 | functions: { 23 | "tokenUri(uint256)": FunctionFragment; 24 | }; 25 | 26 | encodeFunctionData( 27 | functionFragment: "tokenUri", 28 | values: [BigNumberish] 29 | ): string; 30 | 31 | decodeFunctionResult(functionFragment: "tokenUri", data: BytesLike): Result; 32 | 33 | events: {}; 34 | } 35 | 36 | export class MockExpansionNonCompliant extends Contract { 37 | connect(signerOrProvider: Signer | Provider | string): this; 38 | attach(addressOrName: string): this; 39 | deployed(): Promise; 40 | 41 | listeners, EventArgsObject>( 42 | eventFilter?: TypedEventFilter 43 | ): Array>; 44 | off, EventArgsObject>( 45 | eventFilter: TypedEventFilter, 46 | listener: TypedListener 47 | ): this; 48 | on, EventArgsObject>( 49 | eventFilter: TypedEventFilter, 50 | listener: TypedListener 51 | ): this; 52 | once, EventArgsObject>( 53 | eventFilter: TypedEventFilter, 54 | listener: TypedListener 55 | ): this; 56 | removeListener, EventArgsObject>( 57 | eventFilter: TypedEventFilter, 58 | listener: TypedListener 59 | ): this; 60 | removeAllListeners, EventArgsObject>( 61 | eventFilter: TypedEventFilter 62 | ): this; 63 | 64 | listeners(eventName?: string): Array; 65 | off(eventName: string, listener: Listener): this; 66 | on(eventName: string, listener: Listener): this; 67 | once(eventName: string, listener: Listener): this; 68 | removeListener(eventName: string, listener: Listener): this; 69 | removeAllListeners(eventName?: string): this; 70 | 71 | queryFilter, EventArgsObject>( 72 | event: TypedEventFilter, 73 | fromBlockOrBlockhash?: string | number | undefined, 74 | toBlock?: string | number | undefined 75 | ): Promise>>; 76 | 77 | interface: MockExpansionNonCompliantInterface; 78 | 79 | functions: { 80 | tokenUri( 81 | lootId: BigNumberish, 82 | overrides?: CallOverrides 83 | ): Promise<[string]>; 84 | 85 | "tokenUri(uint256)"( 86 | lootId: BigNumberish, 87 | overrides?: CallOverrides 88 | ): Promise<[string]>; 89 | }; 90 | 91 | tokenUri(lootId: BigNumberish, overrides?: CallOverrides): Promise; 92 | 93 | "tokenUri(uint256)"( 94 | lootId: BigNumberish, 95 | overrides?: CallOverrides 96 | ): Promise; 97 | 98 | callStatic: { 99 | tokenUri(lootId: BigNumberish, overrides?: CallOverrides): Promise; 100 | 101 | "tokenUri(uint256)"( 102 | lootId: BigNumberish, 103 | overrides?: CallOverrides 104 | ): Promise; 105 | }; 106 | 107 | filters: {}; 108 | 109 | estimateGas: { 110 | tokenUri( 111 | lootId: BigNumberish, 112 | overrides?: CallOverrides 113 | ): Promise; 114 | 115 | "tokenUri(uint256)"( 116 | lootId: BigNumberish, 117 | overrides?: CallOverrides 118 | ): Promise; 119 | }; 120 | 121 | populateTransaction: { 122 | tokenUri( 123 | lootId: BigNumberish, 124 | overrides?: CallOverrides 125 | ): Promise; 126 | 127 | "tokenUri(uint256)"( 128 | lootId: BigNumberish, 129 | overrides?: CallOverrides 130 | ): Promise; 131 | }; 132 | } 133 | -------------------------------------------------------------------------------- /src/gen/adapter/factories/Migrations__factory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* Autogenerated file. Do not edit manually. */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | if (typeof b !== "function" && b !== null) 14 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 15 | extendStatics(d, b); 16 | function __() { this.constructor = d; } 17 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 18 | }; 19 | })(); 20 | exports.__esModule = true; 21 | exports.Migrations__factory = void 0; 22 | var ethers_1 = require("ethers"); 23 | var Migrations__factory = /** @class */ (function (_super) { 24 | __extends(Migrations__factory, _super); 25 | function Migrations__factory(signer) { 26 | return _super.call(this, _abi, _bytecode, signer) || this; 27 | } 28 | Migrations__factory.prototype.deploy = function (overrides) { 29 | return _super.prototype.deploy.call(this, overrides || {}); 30 | }; 31 | Migrations__factory.prototype.getDeployTransaction = function (overrides) { 32 | return _super.prototype.getDeployTransaction.call(this, overrides || {}); 33 | }; 34 | Migrations__factory.prototype.attach = function (address) { 35 | return _super.prototype.attach.call(this, address); 36 | }; 37 | Migrations__factory.prototype.connect = function (signer) { 38 | return _super.prototype.connect.call(this, signer); 39 | }; 40 | Migrations__factory.connect = function (address, signerOrProvider) { 41 | return new ethers_1.Contract(address, _abi, signerOrProvider); 42 | }; 43 | return Migrations__factory; 44 | }(ethers_1.ContractFactory)); 45 | exports.Migrations__factory = Migrations__factory; 46 | var _abi = [ 47 | { 48 | inputs: [], 49 | stateMutability: "nonpayable", 50 | type: "constructor" 51 | }, 52 | { 53 | inputs: [], 54 | name: "last_completed_migration", 55 | outputs: [ 56 | { 57 | internalType: "uint256", 58 | name: "", 59 | type: "uint256" 60 | }, 61 | ], 62 | stateMutability: "view", 63 | type: "function" 64 | }, 65 | { 66 | inputs: [], 67 | name: "owner", 68 | outputs: [ 69 | { 70 | internalType: "address", 71 | name: "", 72 | type: "address" 73 | }, 74 | ], 75 | stateMutability: "view", 76 | type: "function" 77 | }, 78 | { 79 | inputs: [ 80 | { 81 | internalType: "uint256", 82 | name: "completed", 83 | type: "uint256" 84 | }, 85 | ], 86 | name: "setCompleted", 87 | outputs: [], 88 | stateMutability: "nonpayable", 89 | type: "function" 90 | }, 91 | { 92 | inputs: [ 93 | { 94 | internalType: "address", 95 | name: "new_address", 96 | type: "address" 97 | }, 98 | ], 99 | name: "upgrade", 100 | outputs: [], 101 | stateMutability: "nonpayable", 102 | type: "function" 103 | }, 104 | ]; 105 | var _bytecode = "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610202806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100865780638da5cb5b146100a0578063fdacd576146100d1575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100ee565b005b61008e610185565b60408051918252519081900360200190f35b6100a861018b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610084600480360360208110156100e757600080fd5b50356101a7565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561016857600080fd5b505af115801561017c573d6000803e3d6000fd5b50505050505b50565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760015556fea2646970667358221220c356fd16dd98acec36d2966175de7f7a7fa5a8bb405384b0de6773cfb8ada45864736f6c63430007060033"; 106 | -------------------------------------------------------------------------------- /src/gen/typechain/MockExpansionNoFee.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { 6 | ethers, 7 | EventFilter, 8 | Signer, 9 | BigNumber, 10 | BigNumberish, 11 | PopulatedTransaction, 12 | Contract, 13 | ContractTransaction, 14 | CallOverrides, 15 | } from "ethers"; 16 | import { BytesLike } from "@ethersproject/bytes"; 17 | import { Listener, Provider } from "@ethersproject/providers"; 18 | import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; 19 | import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; 20 | 21 | interface MockExpansionNoFeeInterface extends ethers.utils.Interface { 22 | functions: { 23 | "lootExpansionTokenUri(uint256)": FunctionFragment; 24 | }; 25 | 26 | encodeFunctionData( 27 | functionFragment: "lootExpansionTokenUri", 28 | values: [BigNumberish] 29 | ): string; 30 | 31 | decodeFunctionResult( 32 | functionFragment: "lootExpansionTokenUri", 33 | data: BytesLike 34 | ): Result; 35 | 36 | events: {}; 37 | } 38 | 39 | export class MockExpansionNoFee extends Contract { 40 | connect(signerOrProvider: Signer | Provider | string): this; 41 | attach(addressOrName: string): this; 42 | deployed(): Promise; 43 | 44 | listeners, EventArgsObject>( 45 | eventFilter?: TypedEventFilter 46 | ): Array>; 47 | off, EventArgsObject>( 48 | eventFilter: TypedEventFilter, 49 | listener: TypedListener 50 | ): this; 51 | on, EventArgsObject>( 52 | eventFilter: TypedEventFilter, 53 | listener: TypedListener 54 | ): this; 55 | once, EventArgsObject>( 56 | eventFilter: TypedEventFilter, 57 | listener: TypedListener 58 | ): this; 59 | removeListener, EventArgsObject>( 60 | eventFilter: TypedEventFilter, 61 | listener: TypedListener 62 | ): this; 63 | removeAllListeners, EventArgsObject>( 64 | eventFilter: TypedEventFilter 65 | ): this; 66 | 67 | listeners(eventName?: string): Array; 68 | off(eventName: string, listener: Listener): this; 69 | on(eventName: string, listener: Listener): this; 70 | once(eventName: string, listener: Listener): this; 71 | removeListener(eventName: string, listener: Listener): this; 72 | removeAllListeners(eventName?: string): this; 73 | 74 | queryFilter, EventArgsObject>( 75 | event: TypedEventFilter, 76 | fromBlockOrBlockhash?: string | number | undefined, 77 | toBlock?: string | number | undefined 78 | ): Promise>>; 79 | 80 | interface: MockExpansionNoFeeInterface; 81 | 82 | functions: { 83 | lootExpansionTokenUri( 84 | lootId: BigNumberish, 85 | overrides?: CallOverrides 86 | ): Promise<[string] & { tokenUri: string }>; 87 | 88 | "lootExpansionTokenUri(uint256)"( 89 | lootId: BigNumberish, 90 | overrides?: CallOverrides 91 | ): Promise<[string] & { tokenUri: string }>; 92 | }; 93 | 94 | lootExpansionTokenUri( 95 | lootId: BigNumberish, 96 | overrides?: CallOverrides 97 | ): Promise; 98 | 99 | "lootExpansionTokenUri(uint256)"( 100 | lootId: BigNumberish, 101 | overrides?: CallOverrides 102 | ): Promise; 103 | 104 | callStatic: { 105 | lootExpansionTokenUri( 106 | lootId: BigNumberish, 107 | overrides?: CallOverrides 108 | ): Promise; 109 | 110 | "lootExpansionTokenUri(uint256)"( 111 | lootId: BigNumberish, 112 | overrides?: CallOverrides 113 | ): Promise; 114 | }; 115 | 116 | filters: {}; 117 | 118 | estimateGas: { 119 | lootExpansionTokenUri( 120 | lootId: BigNumberish, 121 | overrides?: CallOverrides 122 | ): Promise; 123 | 124 | "lootExpansionTokenUri(uint256)"( 125 | lootId: BigNumberish, 126 | overrides?: CallOverrides 127 | ): Promise; 128 | }; 129 | 130 | populateTransaction: { 131 | lootExpansionTokenUri( 132 | lootId: BigNumberish, 133 | overrides?: CallOverrides 134 | ): Promise; 135 | 136 | "lootExpansionTokenUri(uint256)"( 137 | lootId: BigNumberish, 138 | overrides?: CallOverrides 139 | ): Promise; 140 | }; 141 | } 142 | -------------------------------------------------------------------------------- /src/gen/typechain/factories/MockExpansion__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Signer, Contract, ContractFactory, Overrides } from "ethers"; 6 | import { Provider, TransactionRequest } from "@ethersproject/providers"; 7 | 8 | import type { MockExpansion } from "../MockExpansion"; 9 | 10 | export class MockExpansion__factory extends ContractFactory { 11 | constructor(signer?: Signer) { 12 | super(_abi, _bytecode, signer); 13 | } 14 | 15 | deploy( 16 | overrides?: Overrides & { from?: string | Promise } 17 | ): Promise { 18 | return super.deploy(overrides || {}) as Promise; 19 | } 20 | getDeployTransaction( 21 | overrides?: Overrides & { from?: string | Promise } 22 | ): TransactionRequest { 23 | return super.getDeployTransaction(overrides || {}); 24 | } 25 | attach(address: string): MockExpansion { 26 | return super.attach(address) as MockExpansion; 27 | } 28 | connect(signer: Signer): MockExpansion__factory { 29 | return super.connect(signer) as MockExpansion__factory; 30 | } 31 | static connect( 32 | address: string, 33 | signerOrProvider: Signer | Provider 34 | ): MockExpansion { 35 | return new Contract(address, _abi, signerOrProvider) as MockExpansion; 36 | } 37 | } 38 | 39 | const _abi = [ 40 | { 41 | inputs: [], 42 | name: "claimFeeAmount", 43 | outputs: [ 44 | { 45 | internalType: "uint256", 46 | name: "", 47 | type: "uint256", 48 | }, 49 | ], 50 | stateMutability: "view", 51 | type: "function", 52 | }, 53 | { 54 | inputs: [], 55 | name: "claimFeeRecipient", 56 | outputs: [ 57 | { 58 | internalType: "address", 59 | name: "", 60 | type: "address", 61 | }, 62 | ], 63 | stateMutability: "view", 64 | type: "function", 65 | }, 66 | { 67 | inputs: [ 68 | { 69 | internalType: "uint256", 70 | name: "lootId", 71 | type: "uint256", 72 | }, 73 | ], 74 | name: "lootExpansionTokenUri", 75 | outputs: [ 76 | { 77 | internalType: "string", 78 | name: "", 79 | type: "string", 80 | }, 81 | ], 82 | stateMutability: "pure", 83 | type: "function", 84 | }, 85 | { 86 | inputs: [], 87 | name: "maxSupply", 88 | outputs: [ 89 | { 90 | internalType: "uint256", 91 | name: "", 92 | type: "uint256", 93 | }, 94 | ], 95 | stateMutability: "view", 96 | type: "function", 97 | }, 98 | { 99 | inputs: [ 100 | { 101 | internalType: "uint256", 102 | name: "_feeAmount", 103 | type: "uint256", 104 | }, 105 | ], 106 | name: "setFee", 107 | outputs: [], 108 | stateMutability: "nonpayable", 109 | type: "function", 110 | }, 111 | { 112 | inputs: [ 113 | { 114 | internalType: "address", 115 | name: "_feeRecipient", 116 | type: "address", 117 | }, 118 | ], 119 | name: "setRecipient", 120 | outputs: [], 121 | stateMutability: "nonpayable", 122 | type: "function", 123 | }, 124 | ]; 125 | 126 | const _bytecode = 127 | "0x608060405234801561001057600080fd5b50610444806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80637c5e62d0116100505780637c5e62d01461015b57806388888d951461018c578063d5abeb01146101a657610072565b80633bbed4a0146100775780633f5c50c4146100ac57806369fe0e2d1461013e575b600080fd5b6100aa6004803603602081101561008d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ae565b005b6100c9600480360360208110156100c257600080fd5b50356101f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101035781810151838201526020016100eb565b50505050905090810190601f1680156101305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100aa6004803603602081101561015457600080fd5b50356102b4565b6101636102b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101946102d5565b60408051918252519081900360200190f35b6101946102db565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060610200826102e1565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061027857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161023b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b600055565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60005490565b611f4090565b606081610322575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526102af565b8160005b811561033a57600101600a82049150610326565b60008167ffffffffffffffff8111801561035357600080fd5b506040519080825280601f01601f19166020018201604052801561037e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b831561040557600a840660300160f81b828280600190039350815181106103cb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a840493506103a8565b5094935050505056fea26469706673582212209338081681570406afb144924667d95feecc8d6e8548d7f8dc4526e7ad9dd3db64736f6c63430007060033"; 128 | -------------------------------------------------------------------------------- /tests/LootRegistry.spec.ts: -------------------------------------------------------------------------------- 1 | import * as ethers from 'ethers' 2 | import { expect, RevertError} from './utils' 3 | 4 | import { 5 | LootRegistry, 6 | MockExpansion, 7 | MockExpansionNoFee, 8 | MockExpansionNonCompliant 9 | } from 'src/gen/typechain' 10 | import { BigNumber } from 'ethers' 11 | 12 | ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.ERROR) 13 | 14 | // Importing contract artifacts 15 | const LootRegistryArtifact = artifacts.require('LootRegistry') 16 | const MockExpansionArtifact = artifacts.require('MockExpansion') 17 | const MockExpansionNoFeeArtifact = artifacts.require('MockExpansionNoFee') 18 | const MockExpansionInvalidArtifact = artifacts.require('MockExpansionNonCompliant') 19 | 20 | const fee = ethers.utils.parseUnits('0.01', 'ether') 21 | const fee_recipient = ethers.Wallet.createRandom().address 22 | 23 | contract('LootRegistry', () => { 24 | let registry: LootRegistry 25 | let expansion: MockExpansion 26 | let expansionNoFee: MockExpansionNoFee 27 | let registryInvalid: MockExpansionNonCompliant 28 | 29 | beforeEach(async () => { 30 | // Deploy contracts 31 | registry = await LootRegistryArtifact.new() 32 | expansion = await MockExpansionArtifact.new() 33 | expansionNoFee = await MockExpansionNoFeeArtifact.new() 34 | registryInvalid = await MockExpansionInvalidArtifact.new() 35 | }) 36 | 37 | describe('registerLootExpansion()', () => { 38 | it(`should pass if expansion is valid`, async () => { 39 | const tx = registry.registerLootExpansion(expansion.address) 40 | await expect(tx).to.be.fulfilled 41 | }) 42 | 43 | it(`should pass if expansion is doesn't implement fee interface`, async () => { 44 | const tx = registry.registerLootExpansion(expansionNoFee.address) 45 | await expect(tx).to.be.fulfilled 46 | }) 47 | 48 | it(`should revert if expansion is already registered`, async () => { 49 | await registry.registerLootExpansion(expansion.address) 50 | const tx = registry.registerLootExpansion(expansion.address) 51 | await expect(tx).to.be.rejectedWith(RevertError("LootRegistry#registerLootExpansion: Expansion already registered")) 52 | }) 53 | 54 | it(`should revert if expansion doesn't support lootExpansionTokenUri()`, async () => { 55 | const tx = registry.registerLootExpansion(registryInvalid.address) 56 | await expect(tx).to.be.rejectedWith(RevertError("LootRegistry#registerLootExpansion: Expansion doesn't support lootExpansionTokenUri")) 57 | }) 58 | 59 | context('when valid expansion is registered()', () => { 60 | beforeEach(async () => { 61 | // Set fee on expansion 62 | await expansion.setFee(fee) 63 | await expansion.setRecipient(fee_recipient) 64 | 65 | // Register expansion 66 | await registry.registerLootExpansion(expansion.address) 67 | }) 68 | 69 | it(`should add expansion to expansion array`, async () => { 70 | const expansions = await registry.getExpansions() 71 | await expect(expansions.length).to.be.eql(1) 72 | 73 | const expansions_address = await registry.expansions(0) 74 | await expect(expansions_address).to.be.eql(expansion.address) 75 | }) 76 | 77 | 78 | it(`should set expansion id to 1`, async () => { 79 | const expansionID = await registry.expansionAddressToID(expansion.address) 80 | await expect(expansionID).to.be.eq.BN(1) 81 | }) 82 | 83 | it(`should map id 1 to expansion address`, async () => { 84 | const expansionAddress = await registry.expansionIDtoAddress(1) 85 | await expect(expansionAddress).to.be.eql(expansion.address) 86 | }) 87 | 88 | it(`should set claiming fee to expected value`, async () => { 89 | const _fee = await registry.claimingFee(expansion.address) 90 | await expect(_fee).to.be.eq.BN(fee.toString()) 91 | }) 92 | 93 | it(`should set fee recipient to expected value`, async () => { 94 | const _recipient = await registry.feeRecipient(expansion.address) 95 | await expect(_recipient).to.be.eql(fee_recipient) 96 | }) 97 | }) 98 | 99 | context('when expansion without fee interface is registered()', () => { 100 | beforeEach(async () => { 101 | // Register expansion 102 | await registry.registerLootExpansion(expansionNoFee.address) 103 | }) 104 | 105 | it(`should add expansion to expansion array`, async () => { 106 | const _expansions = await registry.getExpansions() 107 | await expect(_expansions.length).to.be.eql(1) 108 | }) 109 | 110 | it(`should set expansion id to 1`, async () => { 111 | const expansionID = await registry.expansionAddressToID(expansionNoFee.address) 112 | await expect(expansionID).to.be.eq.BN(1) 113 | }) 114 | 115 | it(`should map id 1 to expansion address`, async () => { 116 | const expansionAddress = await registry.expansionIDtoAddress(1) 117 | await expect(expansionAddress).to.be.eql(expansionNoFee.address) 118 | }) 119 | 120 | it(`should set claiming fee to 0`, async () => { 121 | const _fee = await registry.claimingFee(expansionNoFee.address) 122 | await expect(_fee).to.be.eq.BN(0) 123 | }) 124 | 125 | it(`should set fee recipient to 0x0`, async () => { 126 | const _recpiient = await registry.feeRecipient(expansionNoFee.address) 127 | await expect(_recpiient).to.be.eql(ethers.constants.AddressZero) 128 | }) 129 | }) 130 | 131 | }) 132 | }) 133 | -------------------------------------------------------------------------------- /src/artifacts/contracts/mocks/MockExpansion.sol/MockExpansion.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "MockExpansion", 4 | "sourceName": "contracts/mocks/MockExpansion.sol", 5 | "abi": [ 6 | { 7 | "inputs": [], 8 | "name": "claimFeeAmount", 9 | "outputs": [ 10 | { 11 | "internalType": "uint256", 12 | "name": "", 13 | "type": "uint256" 14 | } 15 | ], 16 | "stateMutability": "view", 17 | "type": "function" 18 | }, 19 | { 20 | "inputs": [], 21 | "name": "claimFeeRecipient", 22 | "outputs": [ 23 | { 24 | "internalType": "address", 25 | "name": "", 26 | "type": "address" 27 | } 28 | ], 29 | "stateMutability": "view", 30 | "type": "function" 31 | }, 32 | { 33 | "inputs": [ 34 | { 35 | "internalType": "uint256", 36 | "name": "lootId", 37 | "type": "uint256" 38 | } 39 | ], 40 | "name": "lootExpansionTokenUri", 41 | "outputs": [ 42 | { 43 | "internalType": "string", 44 | "name": "", 45 | "type": "string" 46 | } 47 | ], 48 | "stateMutability": "pure", 49 | "type": "function" 50 | }, 51 | { 52 | "inputs": [], 53 | "name": "maxSupply", 54 | "outputs": [ 55 | { 56 | "internalType": "uint256", 57 | "name": "", 58 | "type": "uint256" 59 | } 60 | ], 61 | "stateMutability": "view", 62 | "type": "function" 63 | }, 64 | { 65 | "inputs": [ 66 | { 67 | "internalType": "uint256", 68 | "name": "_feeAmount", 69 | "type": "uint256" 70 | } 71 | ], 72 | "name": "setFee", 73 | "outputs": [], 74 | "stateMutability": "nonpayable", 75 | "type": "function" 76 | }, 77 | { 78 | "inputs": [ 79 | { 80 | "internalType": "address", 81 | "name": "_feeRecipient", 82 | "type": "address" 83 | } 84 | ], 85 | "name": "setRecipient", 86 | "outputs": [], 87 | "stateMutability": "nonpayable", 88 | "type": "function" 89 | } 90 | ], 91 | "bytecode": "0x608060405234801561001057600080fd5b50610444806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80637c5e62d0116100505780637c5e62d01461015b57806388888d951461018c578063d5abeb01146101a657610072565b80633bbed4a0146100775780633f5c50c4146100ac57806369fe0e2d1461013e575b600080fd5b6100aa6004803603602081101561008d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ae565b005b6100c9600480360360208110156100c257600080fd5b50356101f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101035781810151838201526020016100eb565b50505050905090810190601f1680156101305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100aa6004803603602081101561015457600080fd5b50356102b4565b6101636102b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101946102d5565b60408051918252519081900360200190f35b6101946102db565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060610200826102e1565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061027857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161023b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b600055565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60005490565b611f4090565b606081610322575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526102af565b8160005b811561033a57600101600a82049150610326565b60008167ffffffffffffffff8111801561035357600080fd5b506040519080825280601f01601f19166020018201604052801561037e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b831561040557600a840660300160f81b828280600190039350815181106103cb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a840493506103a8565b5094935050505056fea26469706673582212209338081681570406afb144924667d95feecc8d6e8548d7f8dc4526e7ad9dd3db64736f6c63430007060033", 92 | "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100725760003560e01c80637c5e62d0116100505780637c5e62d01461015b57806388888d951461018c578063d5abeb01146101a657610072565b80633bbed4a0146100775780633f5c50c4146100ac57806369fe0e2d1461013e575b600080fd5b6100aa6004803603602081101561008d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ae565b005b6100c9600480360360208110156100c257600080fd5b50356101f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101035781810151838201526020016100eb565b50505050905090810190601f1680156101305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100aa6004803603602081101561015457600080fd5b50356102b4565b6101636102b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101946102d5565b60408051918252519081900360200190f35b6101946102db565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060610200826102e1565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061027857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161023b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b600055565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60005490565b611f4090565b606081610322575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526102af565b8160005b811561033a57600101600a82049150610326565b60008167ffffffffffffffff8111801561035357600080fd5b506040519080825280601f01601f19166020018201604052801561037e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b831561040557600a840660300160f81b828280600190039350815181106103cb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a840493506103a8565b5094935050505056fea26469706673582212209338081681570406afb144924667d95feecc8d6e8548d7f8dc4526e7ad9dd3db64736f6c63430007060033", 93 | "linkReferences": {}, 94 | "deployedLinkReferences": {} 95 | } 96 | -------------------------------------------------------------------------------- /src/gen/adapter/factories/MockExpansion__factory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* Autogenerated file. Do not edit manually. */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | if (typeof b !== "function" && b !== null) 14 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 15 | extendStatics(d, b); 16 | function __() { this.constructor = d; } 17 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 18 | }; 19 | })(); 20 | exports.__esModule = true; 21 | exports.MockExpansion__factory = void 0; 22 | var ethers_1 = require("ethers"); 23 | var MockExpansion__factory = /** @class */ (function (_super) { 24 | __extends(MockExpansion__factory, _super); 25 | function MockExpansion__factory(signer) { 26 | return _super.call(this, _abi, _bytecode, signer) || this; 27 | } 28 | MockExpansion__factory.prototype.deploy = function (overrides) { 29 | return _super.prototype.deploy.call(this, overrides || {}); 30 | }; 31 | MockExpansion__factory.prototype.getDeployTransaction = function (overrides) { 32 | return _super.prototype.getDeployTransaction.call(this, overrides || {}); 33 | }; 34 | MockExpansion__factory.prototype.attach = function (address) { 35 | return _super.prototype.attach.call(this, address); 36 | }; 37 | MockExpansion__factory.prototype.connect = function (signer) { 38 | return _super.prototype.connect.call(this, signer); 39 | }; 40 | MockExpansion__factory.connect = function (address, signerOrProvider) { 41 | return new ethers_1.Contract(address, _abi, signerOrProvider); 42 | }; 43 | return MockExpansion__factory; 44 | }(ethers_1.ContractFactory)); 45 | exports.MockExpansion__factory = MockExpansion__factory; 46 | var _abi = [ 47 | { 48 | inputs: [], 49 | name: "claimFeeAmount", 50 | outputs: [ 51 | { 52 | internalType: "uint256", 53 | name: "", 54 | type: "uint256" 55 | }, 56 | ], 57 | stateMutability: "view", 58 | type: "function" 59 | }, 60 | { 61 | inputs: [], 62 | name: "claimFeeRecipient", 63 | outputs: [ 64 | { 65 | internalType: "address", 66 | name: "", 67 | type: "address" 68 | }, 69 | ], 70 | stateMutability: "view", 71 | type: "function" 72 | }, 73 | { 74 | inputs: [ 75 | { 76 | internalType: "uint256", 77 | name: "lootId", 78 | type: "uint256" 79 | }, 80 | ], 81 | name: "lootExpansionTokenUri", 82 | outputs: [ 83 | { 84 | internalType: "string", 85 | name: "", 86 | type: "string" 87 | }, 88 | ], 89 | stateMutability: "pure", 90 | type: "function" 91 | }, 92 | { 93 | inputs: [], 94 | name: "maxSupply", 95 | outputs: [ 96 | { 97 | internalType: "uint256", 98 | name: "", 99 | type: "uint256" 100 | }, 101 | ], 102 | stateMutability: "view", 103 | type: "function" 104 | }, 105 | { 106 | inputs: [ 107 | { 108 | internalType: "uint256", 109 | name: "_feeAmount", 110 | type: "uint256" 111 | }, 112 | ], 113 | name: "setFee", 114 | outputs: [], 115 | stateMutability: "nonpayable", 116 | type: "function" 117 | }, 118 | { 119 | inputs: [ 120 | { 121 | internalType: "address", 122 | name: "_feeRecipient", 123 | type: "address" 124 | }, 125 | ], 126 | name: "setRecipient", 127 | outputs: [], 128 | stateMutability: "nonpayable", 129 | type: "function" 130 | }, 131 | ]; 132 | var _bytecode = "0x608060405234801561001057600080fd5b50610444806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80637c5e62d0116100505780637c5e62d01461015b57806388888d951461018c578063d5abeb01146101a657610072565b80633bbed4a0146100775780633f5c50c4146100ac57806369fe0e2d1461013e575b600080fd5b6100aa6004803603602081101561008d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ae565b005b6100c9600480360360208110156100c257600080fd5b50356101f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101035781810151838201526020016100eb565b50505050905090810190601f1680156101305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100aa6004803603602081101561015457600080fd5b50356102b4565b6101636102b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101946102d5565b60408051918252519081900360200190f35b6101946102db565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060610200826102e1565b60405160200180807f68747470733a2f2f626173655552492e6e65742f00000000000000000000000081525060140182805190602001908083835b6020831061027857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161023b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290505b919050565b600055565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b60005490565b611f4090565b606081610322575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526102af565b8160005b811561033a57600101600a82049150610326565b60008167ffffffffffffffff8111801561035357600080fd5b506040519080825280601f01601f19166020018201604052801561037e576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b831561040557600a840660300160f81b828280600190039350815181106103cb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a840493506103a8565b5094935050505056fea26469706673582212209338081681570406afb144924667d95feecc8d6e8548d7f8dc4526e7ad9dd3db64736f6c63430007060033"; 133 | -------------------------------------------------------------------------------- /src/gen/typechain/ILootExpansion.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { 6 | ethers, 7 | EventFilter, 8 | Signer, 9 | BigNumber, 10 | BigNumberish, 11 | PopulatedTransaction, 12 | Contract, 13 | ContractTransaction, 14 | CallOverrides, 15 | } from "ethers"; 16 | import { BytesLike } from "@ethersproject/bytes"; 17 | import { Listener, Provider } from "@ethersproject/providers"; 18 | import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; 19 | import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; 20 | 21 | interface ILootExpansionInterface extends ethers.utils.Interface { 22 | functions: { 23 | "claimFeeAmount()": FunctionFragment; 24 | "claimFeeRecipient()": FunctionFragment; 25 | "lootExpansionTokenUri(uint256)": FunctionFragment; 26 | }; 27 | 28 | encodeFunctionData( 29 | functionFragment: "claimFeeAmount", 30 | values?: undefined 31 | ): string; 32 | encodeFunctionData( 33 | functionFragment: "claimFeeRecipient", 34 | values?: undefined 35 | ): string; 36 | encodeFunctionData( 37 | functionFragment: "lootExpansionTokenUri", 38 | values: [BigNumberish] 39 | ): string; 40 | 41 | decodeFunctionResult( 42 | functionFragment: "claimFeeAmount", 43 | data: BytesLike 44 | ): Result; 45 | decodeFunctionResult( 46 | functionFragment: "claimFeeRecipient", 47 | data: BytesLike 48 | ): Result; 49 | decodeFunctionResult( 50 | functionFragment: "lootExpansionTokenUri", 51 | data: BytesLike 52 | ): Result; 53 | 54 | events: {}; 55 | } 56 | 57 | export class ILootExpansion extends Contract { 58 | connect(signerOrProvider: Signer | Provider | string): this; 59 | attach(addressOrName: string): this; 60 | deployed(): Promise; 61 | 62 | listeners, EventArgsObject>( 63 | eventFilter?: TypedEventFilter 64 | ): Array>; 65 | off, EventArgsObject>( 66 | eventFilter: TypedEventFilter, 67 | listener: TypedListener 68 | ): this; 69 | on, EventArgsObject>( 70 | eventFilter: TypedEventFilter, 71 | listener: TypedListener 72 | ): this; 73 | once, EventArgsObject>( 74 | eventFilter: TypedEventFilter, 75 | listener: TypedListener 76 | ): this; 77 | removeListener, EventArgsObject>( 78 | eventFilter: TypedEventFilter, 79 | listener: TypedListener 80 | ): this; 81 | removeAllListeners, EventArgsObject>( 82 | eventFilter: TypedEventFilter 83 | ): this; 84 | 85 | listeners(eventName?: string): Array; 86 | off(eventName: string, listener: Listener): this; 87 | on(eventName: string, listener: Listener): this; 88 | once(eventName: string, listener: Listener): this; 89 | removeListener(eventName: string, listener: Listener): this; 90 | removeAllListeners(eventName?: string): this; 91 | 92 | queryFilter, EventArgsObject>( 93 | event: TypedEventFilter, 94 | fromBlockOrBlockhash?: string | number | undefined, 95 | toBlock?: string | number | undefined 96 | ): Promise>>; 97 | 98 | interface: ILootExpansionInterface; 99 | 100 | functions: { 101 | claimFeeAmount( 102 | overrides?: CallOverrides 103 | ): Promise<[BigNumber] & { feeAmount: BigNumber }>; 104 | 105 | "claimFeeAmount()"( 106 | overrides?: CallOverrides 107 | ): Promise<[BigNumber] & { feeAmount: BigNumber }>; 108 | 109 | claimFeeRecipient( 110 | overrides?: CallOverrides 111 | ): Promise<[string] & { feeRecipient: string }>; 112 | 113 | "claimFeeRecipient()"( 114 | overrides?: CallOverrides 115 | ): Promise<[string] & { feeRecipient: string }>; 116 | 117 | lootExpansionTokenUri( 118 | lootId: BigNumberish, 119 | overrides?: CallOverrides 120 | ): Promise<[string] & { tokenUri: string }>; 121 | 122 | "lootExpansionTokenUri(uint256)"( 123 | lootId: BigNumberish, 124 | overrides?: CallOverrides 125 | ): Promise<[string] & { tokenUri: string }>; 126 | }; 127 | 128 | claimFeeAmount(overrides?: CallOverrides): Promise; 129 | 130 | "claimFeeAmount()"(overrides?: CallOverrides): Promise; 131 | 132 | claimFeeRecipient(overrides?: CallOverrides): Promise; 133 | 134 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise; 135 | 136 | lootExpansionTokenUri( 137 | lootId: BigNumberish, 138 | overrides?: CallOverrides 139 | ): Promise; 140 | 141 | "lootExpansionTokenUri(uint256)"( 142 | lootId: BigNumberish, 143 | overrides?: CallOverrides 144 | ): Promise; 145 | 146 | callStatic: { 147 | claimFeeAmount(overrides?: CallOverrides): Promise; 148 | 149 | "claimFeeAmount()"(overrides?: CallOverrides): Promise; 150 | 151 | claimFeeRecipient(overrides?: CallOverrides): Promise; 152 | 153 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise; 154 | 155 | lootExpansionTokenUri( 156 | lootId: BigNumberish, 157 | overrides?: CallOverrides 158 | ): Promise; 159 | 160 | "lootExpansionTokenUri(uint256)"( 161 | lootId: BigNumberish, 162 | overrides?: CallOverrides 163 | ): Promise; 164 | }; 165 | 166 | filters: {}; 167 | 168 | estimateGas: { 169 | claimFeeAmount(overrides?: CallOverrides): Promise; 170 | 171 | "claimFeeAmount()"(overrides?: CallOverrides): Promise; 172 | 173 | claimFeeRecipient(overrides?: CallOverrides): Promise; 174 | 175 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise; 176 | 177 | lootExpansionTokenUri( 178 | lootId: BigNumberish, 179 | overrides?: CallOverrides 180 | ): Promise; 181 | 182 | "lootExpansionTokenUri(uint256)"( 183 | lootId: BigNumberish, 184 | overrides?: CallOverrides 185 | ): Promise; 186 | }; 187 | 188 | populateTransaction: { 189 | claimFeeAmount(overrides?: CallOverrides): Promise; 190 | 191 | "claimFeeAmount()"( 192 | overrides?: CallOverrides 193 | ): Promise; 194 | 195 | claimFeeRecipient(overrides?: CallOverrides): Promise; 196 | 197 | "claimFeeRecipient()"( 198 | overrides?: CallOverrides 199 | ): Promise; 200 | 201 | lootExpansionTokenUri( 202 | lootId: BigNumberish, 203 | overrides?: CallOverrides 204 | ): Promise; 205 | 206 | "lootExpansionTokenUri(uint256)"( 207 | lootId: BigNumberish, 208 | overrides?: CallOverrides 209 | ): Promise; 210 | }; 211 | } 212 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC721", 4 | "sourceName": "@openzeppelin/contracts/token/ERC721/IERC721.sol", 5 | "abi": [ 6 | { 7 | "anonymous": false, 8 | "inputs": [ 9 | { 10 | "indexed": true, 11 | "internalType": "address", 12 | "name": "owner", 13 | "type": "address" 14 | }, 15 | { 16 | "indexed": true, 17 | "internalType": "address", 18 | "name": "approved", 19 | "type": "address" 20 | }, 21 | { 22 | "indexed": true, 23 | "internalType": "uint256", 24 | "name": "tokenId", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "Approval", 29 | "type": "event" 30 | }, 31 | { 32 | "anonymous": false, 33 | "inputs": [ 34 | { 35 | "indexed": true, 36 | "internalType": "address", 37 | "name": "owner", 38 | "type": "address" 39 | }, 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "operator", 44 | "type": "address" 45 | }, 46 | { 47 | "indexed": false, 48 | "internalType": "bool", 49 | "name": "approved", 50 | "type": "bool" 51 | } 52 | ], 53 | "name": "ApprovalForAll", 54 | "type": "event" 55 | }, 56 | { 57 | "anonymous": false, 58 | "inputs": [ 59 | { 60 | "indexed": true, 61 | "internalType": "address", 62 | "name": "from", 63 | "type": "address" 64 | }, 65 | { 66 | "indexed": true, 67 | "internalType": "address", 68 | "name": "to", 69 | "type": "address" 70 | }, 71 | { 72 | "indexed": true, 73 | "internalType": "uint256", 74 | "name": "tokenId", 75 | "type": "uint256" 76 | } 77 | ], 78 | "name": "Transfer", 79 | "type": "event" 80 | }, 81 | { 82 | "inputs": [ 83 | { 84 | "internalType": "address", 85 | "name": "to", 86 | "type": "address" 87 | }, 88 | { 89 | "internalType": "uint256", 90 | "name": "tokenId", 91 | "type": "uint256" 92 | } 93 | ], 94 | "name": "approve", 95 | "outputs": [], 96 | "stateMutability": "nonpayable", 97 | "type": "function" 98 | }, 99 | { 100 | "inputs": [ 101 | { 102 | "internalType": "address", 103 | "name": "owner", 104 | "type": "address" 105 | } 106 | ], 107 | "name": "balanceOf", 108 | "outputs": [ 109 | { 110 | "internalType": "uint256", 111 | "name": "balance", 112 | "type": "uint256" 113 | } 114 | ], 115 | "stateMutability": "view", 116 | "type": "function" 117 | }, 118 | { 119 | "inputs": [ 120 | { 121 | "internalType": "uint256", 122 | "name": "tokenId", 123 | "type": "uint256" 124 | } 125 | ], 126 | "name": "getApproved", 127 | "outputs": [ 128 | { 129 | "internalType": "address", 130 | "name": "operator", 131 | "type": "address" 132 | } 133 | ], 134 | "stateMutability": "view", 135 | "type": "function" 136 | }, 137 | { 138 | "inputs": [ 139 | { 140 | "internalType": "address", 141 | "name": "owner", 142 | "type": "address" 143 | }, 144 | { 145 | "internalType": "address", 146 | "name": "operator", 147 | "type": "address" 148 | } 149 | ], 150 | "name": "isApprovedForAll", 151 | "outputs": [ 152 | { 153 | "internalType": "bool", 154 | "name": "", 155 | "type": "bool" 156 | } 157 | ], 158 | "stateMutability": "view", 159 | "type": "function" 160 | }, 161 | { 162 | "inputs": [ 163 | { 164 | "internalType": "uint256", 165 | "name": "tokenId", 166 | "type": "uint256" 167 | } 168 | ], 169 | "name": "ownerOf", 170 | "outputs": [ 171 | { 172 | "internalType": "address", 173 | "name": "owner", 174 | "type": "address" 175 | } 176 | ], 177 | "stateMutability": "view", 178 | "type": "function" 179 | }, 180 | { 181 | "inputs": [ 182 | { 183 | "internalType": "address", 184 | "name": "from", 185 | "type": "address" 186 | }, 187 | { 188 | "internalType": "address", 189 | "name": "to", 190 | "type": "address" 191 | }, 192 | { 193 | "internalType": "uint256", 194 | "name": "tokenId", 195 | "type": "uint256" 196 | } 197 | ], 198 | "name": "safeTransferFrom", 199 | "outputs": [], 200 | "stateMutability": "nonpayable", 201 | "type": "function" 202 | }, 203 | { 204 | "inputs": [ 205 | { 206 | "internalType": "address", 207 | "name": "from", 208 | "type": "address" 209 | }, 210 | { 211 | "internalType": "address", 212 | "name": "to", 213 | "type": "address" 214 | }, 215 | { 216 | "internalType": "uint256", 217 | "name": "tokenId", 218 | "type": "uint256" 219 | }, 220 | { 221 | "internalType": "bytes", 222 | "name": "data", 223 | "type": "bytes" 224 | } 225 | ], 226 | "name": "safeTransferFrom", 227 | "outputs": [], 228 | "stateMutability": "nonpayable", 229 | "type": "function" 230 | }, 231 | { 232 | "inputs": [ 233 | { 234 | "internalType": "address", 235 | "name": "operator", 236 | "type": "address" 237 | }, 238 | { 239 | "internalType": "bool", 240 | "name": "_approved", 241 | "type": "bool" 242 | } 243 | ], 244 | "name": "setApprovalForAll", 245 | "outputs": [], 246 | "stateMutability": "nonpayable", 247 | "type": "function" 248 | }, 249 | { 250 | "inputs": [ 251 | { 252 | "internalType": "bytes4", 253 | "name": "interfaceId", 254 | "type": "bytes4" 255 | } 256 | ], 257 | "name": "supportsInterface", 258 | "outputs": [ 259 | { 260 | "internalType": "bool", 261 | "name": "", 262 | "type": "bool" 263 | } 264 | ], 265 | "stateMutability": "view", 266 | "type": "function" 267 | }, 268 | { 269 | "inputs": [ 270 | { 271 | "internalType": "address", 272 | "name": "from", 273 | "type": "address" 274 | }, 275 | { 276 | "internalType": "address", 277 | "name": "to", 278 | "type": "address" 279 | }, 280 | { 281 | "internalType": "uint256", 282 | "name": "tokenId", 283 | "type": "uint256" 284 | } 285 | ], 286 | "name": "transferFrom", 287 | "outputs": [], 288 | "stateMutability": "nonpayable", 289 | "type": "function" 290 | } 291 | ], 292 | "bytecode": "0x", 293 | "deployedBytecode": "0x", 294 | "linkReferences": {}, 295 | "deployedLinkReferences": {} 296 | } 297 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol/IERC721Metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC721Metadata", 4 | "sourceName": "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol", 5 | "abi": [ 6 | { 7 | "anonymous": false, 8 | "inputs": [ 9 | { 10 | "indexed": true, 11 | "internalType": "address", 12 | "name": "owner", 13 | "type": "address" 14 | }, 15 | { 16 | "indexed": true, 17 | "internalType": "address", 18 | "name": "approved", 19 | "type": "address" 20 | }, 21 | { 22 | "indexed": true, 23 | "internalType": "uint256", 24 | "name": "tokenId", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "Approval", 29 | "type": "event" 30 | }, 31 | { 32 | "anonymous": false, 33 | "inputs": [ 34 | { 35 | "indexed": true, 36 | "internalType": "address", 37 | "name": "owner", 38 | "type": "address" 39 | }, 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "operator", 44 | "type": "address" 45 | }, 46 | { 47 | "indexed": false, 48 | "internalType": "bool", 49 | "name": "approved", 50 | "type": "bool" 51 | } 52 | ], 53 | "name": "ApprovalForAll", 54 | "type": "event" 55 | }, 56 | { 57 | "anonymous": false, 58 | "inputs": [ 59 | { 60 | "indexed": true, 61 | "internalType": "address", 62 | "name": "from", 63 | "type": "address" 64 | }, 65 | { 66 | "indexed": true, 67 | "internalType": "address", 68 | "name": "to", 69 | "type": "address" 70 | }, 71 | { 72 | "indexed": true, 73 | "internalType": "uint256", 74 | "name": "tokenId", 75 | "type": "uint256" 76 | } 77 | ], 78 | "name": "Transfer", 79 | "type": "event" 80 | }, 81 | { 82 | "inputs": [ 83 | { 84 | "internalType": "address", 85 | "name": "to", 86 | "type": "address" 87 | }, 88 | { 89 | "internalType": "uint256", 90 | "name": "tokenId", 91 | "type": "uint256" 92 | } 93 | ], 94 | "name": "approve", 95 | "outputs": [], 96 | "stateMutability": "nonpayable", 97 | "type": "function" 98 | }, 99 | { 100 | "inputs": [ 101 | { 102 | "internalType": "address", 103 | "name": "owner", 104 | "type": "address" 105 | } 106 | ], 107 | "name": "balanceOf", 108 | "outputs": [ 109 | { 110 | "internalType": "uint256", 111 | "name": "balance", 112 | "type": "uint256" 113 | } 114 | ], 115 | "stateMutability": "view", 116 | "type": "function" 117 | }, 118 | { 119 | "inputs": [ 120 | { 121 | "internalType": "uint256", 122 | "name": "tokenId", 123 | "type": "uint256" 124 | } 125 | ], 126 | "name": "getApproved", 127 | "outputs": [ 128 | { 129 | "internalType": "address", 130 | "name": "operator", 131 | "type": "address" 132 | } 133 | ], 134 | "stateMutability": "view", 135 | "type": "function" 136 | }, 137 | { 138 | "inputs": [ 139 | { 140 | "internalType": "address", 141 | "name": "owner", 142 | "type": "address" 143 | }, 144 | { 145 | "internalType": "address", 146 | "name": "operator", 147 | "type": "address" 148 | } 149 | ], 150 | "name": "isApprovedForAll", 151 | "outputs": [ 152 | { 153 | "internalType": "bool", 154 | "name": "", 155 | "type": "bool" 156 | } 157 | ], 158 | "stateMutability": "view", 159 | "type": "function" 160 | }, 161 | { 162 | "inputs": [], 163 | "name": "name", 164 | "outputs": [ 165 | { 166 | "internalType": "string", 167 | "name": "", 168 | "type": "string" 169 | } 170 | ], 171 | "stateMutability": "view", 172 | "type": "function" 173 | }, 174 | { 175 | "inputs": [ 176 | { 177 | "internalType": "uint256", 178 | "name": "tokenId", 179 | "type": "uint256" 180 | } 181 | ], 182 | "name": "ownerOf", 183 | "outputs": [ 184 | { 185 | "internalType": "address", 186 | "name": "owner", 187 | "type": "address" 188 | } 189 | ], 190 | "stateMutability": "view", 191 | "type": "function" 192 | }, 193 | { 194 | "inputs": [ 195 | { 196 | "internalType": "address", 197 | "name": "from", 198 | "type": "address" 199 | }, 200 | { 201 | "internalType": "address", 202 | "name": "to", 203 | "type": "address" 204 | }, 205 | { 206 | "internalType": "uint256", 207 | "name": "tokenId", 208 | "type": "uint256" 209 | } 210 | ], 211 | "name": "safeTransferFrom", 212 | "outputs": [], 213 | "stateMutability": "nonpayable", 214 | "type": "function" 215 | }, 216 | { 217 | "inputs": [ 218 | { 219 | "internalType": "address", 220 | "name": "from", 221 | "type": "address" 222 | }, 223 | { 224 | "internalType": "address", 225 | "name": "to", 226 | "type": "address" 227 | }, 228 | { 229 | "internalType": "uint256", 230 | "name": "tokenId", 231 | "type": "uint256" 232 | }, 233 | { 234 | "internalType": "bytes", 235 | "name": "data", 236 | "type": "bytes" 237 | } 238 | ], 239 | "name": "safeTransferFrom", 240 | "outputs": [], 241 | "stateMutability": "nonpayable", 242 | "type": "function" 243 | }, 244 | { 245 | "inputs": [ 246 | { 247 | "internalType": "address", 248 | "name": "operator", 249 | "type": "address" 250 | }, 251 | { 252 | "internalType": "bool", 253 | "name": "_approved", 254 | "type": "bool" 255 | } 256 | ], 257 | "name": "setApprovalForAll", 258 | "outputs": [], 259 | "stateMutability": "nonpayable", 260 | "type": "function" 261 | }, 262 | { 263 | "inputs": [ 264 | { 265 | "internalType": "bytes4", 266 | "name": "interfaceId", 267 | "type": "bytes4" 268 | } 269 | ], 270 | "name": "supportsInterface", 271 | "outputs": [ 272 | { 273 | "internalType": "bool", 274 | "name": "", 275 | "type": "bool" 276 | } 277 | ], 278 | "stateMutability": "view", 279 | "type": "function" 280 | }, 281 | { 282 | "inputs": [], 283 | "name": "symbol", 284 | "outputs": [ 285 | { 286 | "internalType": "string", 287 | "name": "", 288 | "type": "string" 289 | } 290 | ], 291 | "stateMutability": "view", 292 | "type": "function" 293 | }, 294 | { 295 | "inputs": [ 296 | { 297 | "internalType": "uint256", 298 | "name": "tokenId", 299 | "type": "uint256" 300 | } 301 | ], 302 | "name": "tokenURI", 303 | "outputs": [ 304 | { 305 | "internalType": "string", 306 | "name": "", 307 | "type": "string" 308 | } 309 | ], 310 | "stateMutability": "view", 311 | "type": "function" 312 | }, 313 | { 314 | "inputs": [ 315 | { 316 | "internalType": "address", 317 | "name": "from", 318 | "type": "address" 319 | }, 320 | { 321 | "internalType": "address", 322 | "name": "to", 323 | "type": "address" 324 | }, 325 | { 326 | "internalType": "uint256", 327 | "name": "tokenId", 328 | "type": "uint256" 329 | } 330 | ], 331 | "name": "transferFrom", 332 | "outputs": [], 333 | "stateMutability": "nonpayable", 334 | "type": "function" 335 | } 336 | ], 337 | "bytecode": "0x", 338 | "deployedBytecode": "0x", 339 | "linkReferences": {}, 340 | "deployedLinkReferences": {} 341 | } 342 | -------------------------------------------------------------------------------- /src/gen/typechain/Migrations.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { 6 | ethers, 7 | EventFilter, 8 | Signer, 9 | BigNumber, 10 | BigNumberish, 11 | PopulatedTransaction, 12 | Contract, 13 | ContractTransaction, 14 | Overrides, 15 | CallOverrides, 16 | } from "ethers"; 17 | import { BytesLike } from "@ethersproject/bytes"; 18 | import { Listener, Provider } from "@ethersproject/providers"; 19 | import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; 20 | import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; 21 | 22 | interface MigrationsInterface extends ethers.utils.Interface { 23 | functions: { 24 | "last_completed_migration()": FunctionFragment; 25 | "owner()": FunctionFragment; 26 | "setCompleted(uint256)": FunctionFragment; 27 | "upgrade(address)": FunctionFragment; 28 | }; 29 | 30 | encodeFunctionData( 31 | functionFragment: "last_completed_migration", 32 | values?: undefined 33 | ): string; 34 | encodeFunctionData(functionFragment: "owner", values?: undefined): string; 35 | encodeFunctionData( 36 | functionFragment: "setCompleted", 37 | values: [BigNumberish] 38 | ): string; 39 | encodeFunctionData(functionFragment: "upgrade", values: [string]): string; 40 | 41 | decodeFunctionResult( 42 | functionFragment: "last_completed_migration", 43 | data: BytesLike 44 | ): Result; 45 | decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; 46 | decodeFunctionResult( 47 | functionFragment: "setCompleted", 48 | data: BytesLike 49 | ): Result; 50 | decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result; 51 | 52 | events: {}; 53 | } 54 | 55 | export class Migrations extends Contract { 56 | connect(signerOrProvider: Signer | Provider | string): this; 57 | attach(addressOrName: string): this; 58 | deployed(): Promise; 59 | 60 | listeners, EventArgsObject>( 61 | eventFilter?: TypedEventFilter 62 | ): Array>; 63 | off, EventArgsObject>( 64 | eventFilter: TypedEventFilter, 65 | listener: TypedListener 66 | ): this; 67 | on, EventArgsObject>( 68 | eventFilter: TypedEventFilter, 69 | listener: TypedListener 70 | ): this; 71 | once, EventArgsObject>( 72 | eventFilter: TypedEventFilter, 73 | listener: TypedListener 74 | ): this; 75 | removeListener, EventArgsObject>( 76 | eventFilter: TypedEventFilter, 77 | listener: TypedListener 78 | ): this; 79 | removeAllListeners, EventArgsObject>( 80 | eventFilter: TypedEventFilter 81 | ): this; 82 | 83 | listeners(eventName?: string): Array; 84 | off(eventName: string, listener: Listener): this; 85 | on(eventName: string, listener: Listener): this; 86 | once(eventName: string, listener: Listener): this; 87 | removeListener(eventName: string, listener: Listener): this; 88 | removeAllListeners(eventName?: string): this; 89 | 90 | queryFilter, EventArgsObject>( 91 | event: TypedEventFilter, 92 | fromBlockOrBlockhash?: string | number | undefined, 93 | toBlock?: string | number | undefined 94 | ): Promise>>; 95 | 96 | interface: MigrationsInterface; 97 | 98 | functions: { 99 | last_completed_migration(overrides?: CallOverrides): Promise<[BigNumber]>; 100 | 101 | "last_completed_migration()"( 102 | overrides?: CallOverrides 103 | ): Promise<[BigNumber]>; 104 | 105 | owner(overrides?: CallOverrides): Promise<[string]>; 106 | 107 | "owner()"(overrides?: CallOverrides): Promise<[string]>; 108 | 109 | setCompleted( 110 | completed: BigNumberish, 111 | overrides?: Overrides & { from?: string | Promise } 112 | ): Promise; 113 | 114 | "setCompleted(uint256)"( 115 | completed: BigNumberish, 116 | overrides?: Overrides & { from?: string | Promise } 117 | ): Promise; 118 | 119 | upgrade( 120 | new_address: string, 121 | overrides?: Overrides & { from?: string | Promise } 122 | ): Promise; 123 | 124 | "upgrade(address)"( 125 | new_address: string, 126 | overrides?: Overrides & { from?: string | Promise } 127 | ): Promise; 128 | }; 129 | 130 | last_completed_migration(overrides?: CallOverrides): Promise; 131 | 132 | "last_completed_migration()"(overrides?: CallOverrides): Promise; 133 | 134 | owner(overrides?: CallOverrides): Promise; 135 | 136 | "owner()"(overrides?: CallOverrides): Promise; 137 | 138 | setCompleted( 139 | completed: BigNumberish, 140 | overrides?: Overrides & { from?: string | Promise } 141 | ): Promise; 142 | 143 | "setCompleted(uint256)"( 144 | completed: BigNumberish, 145 | overrides?: Overrides & { from?: string | Promise } 146 | ): Promise; 147 | 148 | upgrade( 149 | new_address: string, 150 | overrides?: Overrides & { from?: string | Promise } 151 | ): Promise; 152 | 153 | "upgrade(address)"( 154 | new_address: string, 155 | overrides?: Overrides & { from?: string | Promise } 156 | ): Promise; 157 | 158 | callStatic: { 159 | last_completed_migration(overrides?: CallOverrides): Promise; 160 | 161 | "last_completed_migration()"(overrides?: CallOverrides): Promise; 162 | 163 | owner(overrides?: CallOverrides): Promise; 164 | 165 | "owner()"(overrides?: CallOverrides): Promise; 166 | 167 | setCompleted( 168 | completed: BigNumberish, 169 | overrides?: CallOverrides 170 | ): Promise; 171 | 172 | "setCompleted(uint256)"( 173 | completed: BigNumberish, 174 | overrides?: CallOverrides 175 | ): Promise; 176 | 177 | upgrade(new_address: string, overrides?: CallOverrides): Promise; 178 | 179 | "upgrade(address)"( 180 | new_address: string, 181 | overrides?: CallOverrides 182 | ): Promise; 183 | }; 184 | 185 | filters: {}; 186 | 187 | estimateGas: { 188 | last_completed_migration(overrides?: CallOverrides): Promise; 189 | 190 | "last_completed_migration()"(overrides?: CallOverrides): Promise; 191 | 192 | owner(overrides?: CallOverrides): Promise; 193 | 194 | "owner()"(overrides?: CallOverrides): Promise; 195 | 196 | setCompleted( 197 | completed: BigNumberish, 198 | overrides?: Overrides & { from?: string | Promise } 199 | ): Promise; 200 | 201 | "setCompleted(uint256)"( 202 | completed: BigNumberish, 203 | overrides?: Overrides & { from?: string | Promise } 204 | ): Promise; 205 | 206 | upgrade( 207 | new_address: string, 208 | overrides?: Overrides & { from?: string | Promise } 209 | ): Promise; 210 | 211 | "upgrade(address)"( 212 | new_address: string, 213 | overrides?: Overrides & { from?: string | Promise } 214 | ): Promise; 215 | }; 216 | 217 | populateTransaction: { 218 | last_completed_migration( 219 | overrides?: CallOverrides 220 | ): Promise; 221 | 222 | "last_completed_migration()"( 223 | overrides?: CallOverrides 224 | ): Promise; 225 | 226 | owner(overrides?: CallOverrides): Promise; 227 | 228 | "owner()"(overrides?: CallOverrides): Promise; 229 | 230 | setCompleted( 231 | completed: BigNumberish, 232 | overrides?: Overrides & { from?: string | Promise } 233 | ): Promise; 234 | 235 | "setCompleted(uint256)"( 236 | completed: BigNumberish, 237 | overrides?: Overrides & { from?: string | Promise } 238 | ): Promise; 239 | 240 | upgrade( 241 | new_address: string, 242 | overrides?: Overrides & { from?: string | Promise } 243 | ): Promise; 244 | 245 | "upgrade(address)"( 246 | new_address: string, 247 | overrides?: Overrides & { from?: string | Promise } 248 | ): Promise; 249 | }; 250 | } 251 | -------------------------------------------------------------------------------- /src/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol/IERC721Enumerable.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "IERC721Enumerable", 4 | "sourceName": "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol", 5 | "abi": [ 6 | { 7 | "anonymous": false, 8 | "inputs": [ 9 | { 10 | "indexed": true, 11 | "internalType": "address", 12 | "name": "owner", 13 | "type": "address" 14 | }, 15 | { 16 | "indexed": true, 17 | "internalType": "address", 18 | "name": "approved", 19 | "type": "address" 20 | }, 21 | { 22 | "indexed": true, 23 | "internalType": "uint256", 24 | "name": "tokenId", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "Approval", 29 | "type": "event" 30 | }, 31 | { 32 | "anonymous": false, 33 | "inputs": [ 34 | { 35 | "indexed": true, 36 | "internalType": "address", 37 | "name": "owner", 38 | "type": "address" 39 | }, 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "operator", 44 | "type": "address" 45 | }, 46 | { 47 | "indexed": false, 48 | "internalType": "bool", 49 | "name": "approved", 50 | "type": "bool" 51 | } 52 | ], 53 | "name": "ApprovalForAll", 54 | "type": "event" 55 | }, 56 | { 57 | "anonymous": false, 58 | "inputs": [ 59 | { 60 | "indexed": true, 61 | "internalType": "address", 62 | "name": "from", 63 | "type": "address" 64 | }, 65 | { 66 | "indexed": true, 67 | "internalType": "address", 68 | "name": "to", 69 | "type": "address" 70 | }, 71 | { 72 | "indexed": true, 73 | "internalType": "uint256", 74 | "name": "tokenId", 75 | "type": "uint256" 76 | } 77 | ], 78 | "name": "Transfer", 79 | "type": "event" 80 | }, 81 | { 82 | "inputs": [ 83 | { 84 | "internalType": "address", 85 | "name": "to", 86 | "type": "address" 87 | }, 88 | { 89 | "internalType": "uint256", 90 | "name": "tokenId", 91 | "type": "uint256" 92 | } 93 | ], 94 | "name": "approve", 95 | "outputs": [], 96 | "stateMutability": "nonpayable", 97 | "type": "function" 98 | }, 99 | { 100 | "inputs": [ 101 | { 102 | "internalType": "address", 103 | "name": "owner", 104 | "type": "address" 105 | } 106 | ], 107 | "name": "balanceOf", 108 | "outputs": [ 109 | { 110 | "internalType": "uint256", 111 | "name": "balance", 112 | "type": "uint256" 113 | } 114 | ], 115 | "stateMutability": "view", 116 | "type": "function" 117 | }, 118 | { 119 | "inputs": [ 120 | { 121 | "internalType": "uint256", 122 | "name": "tokenId", 123 | "type": "uint256" 124 | } 125 | ], 126 | "name": "getApproved", 127 | "outputs": [ 128 | { 129 | "internalType": "address", 130 | "name": "operator", 131 | "type": "address" 132 | } 133 | ], 134 | "stateMutability": "view", 135 | "type": "function" 136 | }, 137 | { 138 | "inputs": [ 139 | { 140 | "internalType": "address", 141 | "name": "owner", 142 | "type": "address" 143 | }, 144 | { 145 | "internalType": "address", 146 | "name": "operator", 147 | "type": "address" 148 | } 149 | ], 150 | "name": "isApprovedForAll", 151 | "outputs": [ 152 | { 153 | "internalType": "bool", 154 | "name": "", 155 | "type": "bool" 156 | } 157 | ], 158 | "stateMutability": "view", 159 | "type": "function" 160 | }, 161 | { 162 | "inputs": [ 163 | { 164 | "internalType": "uint256", 165 | "name": "tokenId", 166 | "type": "uint256" 167 | } 168 | ], 169 | "name": "ownerOf", 170 | "outputs": [ 171 | { 172 | "internalType": "address", 173 | "name": "owner", 174 | "type": "address" 175 | } 176 | ], 177 | "stateMutability": "view", 178 | "type": "function" 179 | }, 180 | { 181 | "inputs": [ 182 | { 183 | "internalType": "address", 184 | "name": "from", 185 | "type": "address" 186 | }, 187 | { 188 | "internalType": "address", 189 | "name": "to", 190 | "type": "address" 191 | }, 192 | { 193 | "internalType": "uint256", 194 | "name": "tokenId", 195 | "type": "uint256" 196 | } 197 | ], 198 | "name": "safeTransferFrom", 199 | "outputs": [], 200 | "stateMutability": "nonpayable", 201 | "type": "function" 202 | }, 203 | { 204 | "inputs": [ 205 | { 206 | "internalType": "address", 207 | "name": "from", 208 | "type": "address" 209 | }, 210 | { 211 | "internalType": "address", 212 | "name": "to", 213 | "type": "address" 214 | }, 215 | { 216 | "internalType": "uint256", 217 | "name": "tokenId", 218 | "type": "uint256" 219 | }, 220 | { 221 | "internalType": "bytes", 222 | "name": "data", 223 | "type": "bytes" 224 | } 225 | ], 226 | "name": "safeTransferFrom", 227 | "outputs": [], 228 | "stateMutability": "nonpayable", 229 | "type": "function" 230 | }, 231 | { 232 | "inputs": [ 233 | { 234 | "internalType": "address", 235 | "name": "operator", 236 | "type": "address" 237 | }, 238 | { 239 | "internalType": "bool", 240 | "name": "_approved", 241 | "type": "bool" 242 | } 243 | ], 244 | "name": "setApprovalForAll", 245 | "outputs": [], 246 | "stateMutability": "nonpayable", 247 | "type": "function" 248 | }, 249 | { 250 | "inputs": [ 251 | { 252 | "internalType": "bytes4", 253 | "name": "interfaceId", 254 | "type": "bytes4" 255 | } 256 | ], 257 | "name": "supportsInterface", 258 | "outputs": [ 259 | { 260 | "internalType": "bool", 261 | "name": "", 262 | "type": "bool" 263 | } 264 | ], 265 | "stateMutability": "view", 266 | "type": "function" 267 | }, 268 | { 269 | "inputs": [ 270 | { 271 | "internalType": "uint256", 272 | "name": "index", 273 | "type": "uint256" 274 | } 275 | ], 276 | "name": "tokenByIndex", 277 | "outputs": [ 278 | { 279 | "internalType": "uint256", 280 | "name": "", 281 | "type": "uint256" 282 | } 283 | ], 284 | "stateMutability": "view", 285 | "type": "function" 286 | }, 287 | { 288 | "inputs": [ 289 | { 290 | "internalType": "address", 291 | "name": "owner", 292 | "type": "address" 293 | }, 294 | { 295 | "internalType": "uint256", 296 | "name": "index", 297 | "type": "uint256" 298 | } 299 | ], 300 | "name": "tokenOfOwnerByIndex", 301 | "outputs": [ 302 | { 303 | "internalType": "uint256", 304 | "name": "tokenId", 305 | "type": "uint256" 306 | } 307 | ], 308 | "stateMutability": "view", 309 | "type": "function" 310 | }, 311 | { 312 | "inputs": [], 313 | "name": "totalSupply", 314 | "outputs": [ 315 | { 316 | "internalType": "uint256", 317 | "name": "", 318 | "type": "uint256" 319 | } 320 | ], 321 | "stateMutability": "view", 322 | "type": "function" 323 | }, 324 | { 325 | "inputs": [ 326 | { 327 | "internalType": "address", 328 | "name": "from", 329 | "type": "address" 330 | }, 331 | { 332 | "internalType": "address", 333 | "name": "to", 334 | "type": "address" 335 | }, 336 | { 337 | "internalType": "uint256", 338 | "name": "tokenId", 339 | "type": "uint256" 340 | } 341 | ], 342 | "name": "transferFrom", 343 | "outputs": [], 344 | "stateMutability": "nonpayable", 345 | "type": "function" 346 | } 347 | ], 348 | "bytecode": "0x", 349 | "deployedBytecode": "0x", 350 | "linkReferences": {}, 351 | "deployedLinkReferences": {} 352 | } 353 | -------------------------------------------------------------------------------- /src/gen/typechain/MockExpansion.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { 6 | ethers, 7 | EventFilter, 8 | Signer, 9 | BigNumber, 10 | BigNumberish, 11 | PopulatedTransaction, 12 | Contract, 13 | ContractTransaction, 14 | Overrides, 15 | CallOverrides, 16 | } from "ethers"; 17 | import { BytesLike } from "@ethersproject/bytes"; 18 | import { Listener, Provider } from "@ethersproject/providers"; 19 | import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; 20 | import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; 21 | 22 | interface MockExpansionInterface extends ethers.utils.Interface { 23 | functions: { 24 | "claimFeeAmount()": FunctionFragment; 25 | "claimFeeRecipient()": FunctionFragment; 26 | "lootExpansionTokenUri(uint256)": FunctionFragment; 27 | "maxSupply()": FunctionFragment; 28 | "setFee(uint256)": FunctionFragment; 29 | "setRecipient(address)": FunctionFragment; 30 | }; 31 | 32 | encodeFunctionData( 33 | functionFragment: "claimFeeAmount", 34 | values?: undefined 35 | ): string; 36 | encodeFunctionData( 37 | functionFragment: "claimFeeRecipient", 38 | values?: undefined 39 | ): string; 40 | encodeFunctionData( 41 | functionFragment: "lootExpansionTokenUri", 42 | values: [BigNumberish] 43 | ): string; 44 | encodeFunctionData(functionFragment: "maxSupply", values?: undefined): string; 45 | encodeFunctionData( 46 | functionFragment: "setFee", 47 | values: [BigNumberish] 48 | ): string; 49 | encodeFunctionData( 50 | functionFragment: "setRecipient", 51 | values: [string] 52 | ): string; 53 | 54 | decodeFunctionResult( 55 | functionFragment: "claimFeeAmount", 56 | data: BytesLike 57 | ): Result; 58 | decodeFunctionResult( 59 | functionFragment: "claimFeeRecipient", 60 | data: BytesLike 61 | ): Result; 62 | decodeFunctionResult( 63 | functionFragment: "lootExpansionTokenUri", 64 | data: BytesLike 65 | ): Result; 66 | decodeFunctionResult(functionFragment: "maxSupply", data: BytesLike): Result; 67 | decodeFunctionResult(functionFragment: "setFee", data: BytesLike): Result; 68 | decodeFunctionResult( 69 | functionFragment: "setRecipient", 70 | data: BytesLike 71 | ): Result; 72 | 73 | events: {}; 74 | } 75 | 76 | export class MockExpansion extends Contract { 77 | connect(signerOrProvider: Signer | Provider | string): this; 78 | attach(addressOrName: string): this; 79 | deployed(): Promise; 80 | 81 | listeners, EventArgsObject>( 82 | eventFilter?: TypedEventFilter 83 | ): Array>; 84 | off, EventArgsObject>( 85 | eventFilter: TypedEventFilter, 86 | listener: TypedListener 87 | ): this; 88 | on, EventArgsObject>( 89 | eventFilter: TypedEventFilter, 90 | listener: TypedListener 91 | ): this; 92 | once, EventArgsObject>( 93 | eventFilter: TypedEventFilter, 94 | listener: TypedListener 95 | ): this; 96 | removeListener, EventArgsObject>( 97 | eventFilter: TypedEventFilter, 98 | listener: TypedListener 99 | ): this; 100 | removeAllListeners, EventArgsObject>( 101 | eventFilter: TypedEventFilter 102 | ): this; 103 | 104 | listeners(eventName?: string): Array; 105 | off(eventName: string, listener: Listener): this; 106 | on(eventName: string, listener: Listener): this; 107 | once(eventName: string, listener: Listener): this; 108 | removeListener(eventName: string, listener: Listener): this; 109 | removeAllListeners(eventName?: string): this; 110 | 111 | queryFilter, EventArgsObject>( 112 | event: TypedEventFilter, 113 | fromBlockOrBlockhash?: string | number | undefined, 114 | toBlock?: string | number | undefined 115 | ): Promise>>; 116 | 117 | interface: MockExpansionInterface; 118 | 119 | functions: { 120 | claimFeeAmount(overrides?: CallOverrides): Promise<[BigNumber]>; 121 | 122 | "claimFeeAmount()"(overrides?: CallOverrides): Promise<[BigNumber]>; 123 | 124 | claimFeeRecipient(overrides?: CallOverrides): Promise<[string]>; 125 | 126 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise<[string]>; 127 | 128 | lootExpansionTokenUri( 129 | lootId: BigNumberish, 130 | overrides?: CallOverrides 131 | ): Promise<[string]>; 132 | 133 | "lootExpansionTokenUri(uint256)"( 134 | lootId: BigNumberish, 135 | overrides?: CallOverrides 136 | ): Promise<[string]>; 137 | 138 | maxSupply(overrides?: CallOverrides): Promise<[BigNumber]>; 139 | 140 | "maxSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; 141 | 142 | setFee( 143 | _feeAmount: BigNumberish, 144 | overrides?: Overrides & { from?: string | Promise } 145 | ): Promise; 146 | 147 | "setFee(uint256)"( 148 | _feeAmount: BigNumberish, 149 | overrides?: Overrides & { from?: string | Promise } 150 | ): Promise; 151 | 152 | setRecipient( 153 | _feeRecipient: string, 154 | overrides?: Overrides & { from?: string | Promise } 155 | ): Promise; 156 | 157 | "setRecipient(address)"( 158 | _feeRecipient: string, 159 | overrides?: Overrides & { from?: string | Promise } 160 | ): Promise; 161 | }; 162 | 163 | claimFeeAmount(overrides?: CallOverrides): Promise; 164 | 165 | "claimFeeAmount()"(overrides?: CallOverrides): Promise; 166 | 167 | claimFeeRecipient(overrides?: CallOverrides): Promise; 168 | 169 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise; 170 | 171 | lootExpansionTokenUri( 172 | lootId: BigNumberish, 173 | overrides?: CallOverrides 174 | ): Promise; 175 | 176 | "lootExpansionTokenUri(uint256)"( 177 | lootId: BigNumberish, 178 | overrides?: CallOverrides 179 | ): Promise; 180 | 181 | maxSupply(overrides?: CallOverrides): Promise; 182 | 183 | "maxSupply()"(overrides?: CallOverrides): Promise; 184 | 185 | setFee( 186 | _feeAmount: BigNumberish, 187 | overrides?: Overrides & { from?: string | Promise } 188 | ): Promise; 189 | 190 | "setFee(uint256)"( 191 | _feeAmount: BigNumberish, 192 | overrides?: Overrides & { from?: string | Promise } 193 | ): Promise; 194 | 195 | setRecipient( 196 | _feeRecipient: string, 197 | overrides?: Overrides & { from?: string | Promise } 198 | ): Promise; 199 | 200 | "setRecipient(address)"( 201 | _feeRecipient: string, 202 | overrides?: Overrides & { from?: string | Promise } 203 | ): Promise; 204 | 205 | callStatic: { 206 | claimFeeAmount(overrides?: CallOverrides): Promise; 207 | 208 | "claimFeeAmount()"(overrides?: CallOverrides): Promise; 209 | 210 | claimFeeRecipient(overrides?: CallOverrides): Promise; 211 | 212 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise; 213 | 214 | lootExpansionTokenUri( 215 | lootId: BigNumberish, 216 | overrides?: CallOverrides 217 | ): Promise; 218 | 219 | "lootExpansionTokenUri(uint256)"( 220 | lootId: BigNumberish, 221 | overrides?: CallOverrides 222 | ): Promise; 223 | 224 | maxSupply(overrides?: CallOverrides): Promise; 225 | 226 | "maxSupply()"(overrides?: CallOverrides): Promise; 227 | 228 | setFee(_feeAmount: BigNumberish, overrides?: CallOverrides): Promise; 229 | 230 | "setFee(uint256)"( 231 | _feeAmount: BigNumberish, 232 | overrides?: CallOverrides 233 | ): Promise; 234 | 235 | setRecipient( 236 | _feeRecipient: string, 237 | overrides?: CallOverrides 238 | ): Promise; 239 | 240 | "setRecipient(address)"( 241 | _feeRecipient: string, 242 | overrides?: CallOverrides 243 | ): Promise; 244 | }; 245 | 246 | filters: {}; 247 | 248 | estimateGas: { 249 | claimFeeAmount(overrides?: CallOverrides): Promise; 250 | 251 | "claimFeeAmount()"(overrides?: CallOverrides): Promise; 252 | 253 | claimFeeRecipient(overrides?: CallOverrides): Promise; 254 | 255 | "claimFeeRecipient()"(overrides?: CallOverrides): Promise; 256 | 257 | lootExpansionTokenUri( 258 | lootId: BigNumberish, 259 | overrides?: CallOverrides 260 | ): Promise; 261 | 262 | "lootExpansionTokenUri(uint256)"( 263 | lootId: BigNumberish, 264 | overrides?: CallOverrides 265 | ): Promise; 266 | 267 | maxSupply(overrides?: CallOverrides): Promise; 268 | 269 | "maxSupply()"(overrides?: CallOverrides): Promise; 270 | 271 | setFee( 272 | _feeAmount: BigNumberish, 273 | overrides?: Overrides & { from?: string | Promise } 274 | ): Promise; 275 | 276 | "setFee(uint256)"( 277 | _feeAmount: BigNumberish, 278 | overrides?: Overrides & { from?: string | Promise } 279 | ): Promise; 280 | 281 | setRecipient( 282 | _feeRecipient: string, 283 | overrides?: Overrides & { from?: string | Promise } 284 | ): Promise; 285 | 286 | "setRecipient(address)"( 287 | _feeRecipient: string, 288 | overrides?: Overrides & { from?: string | Promise } 289 | ): Promise; 290 | }; 291 | 292 | populateTransaction: { 293 | claimFeeAmount(overrides?: CallOverrides): Promise; 294 | 295 | "claimFeeAmount()"( 296 | overrides?: CallOverrides 297 | ): Promise; 298 | 299 | claimFeeRecipient(overrides?: CallOverrides): Promise; 300 | 301 | "claimFeeRecipient()"( 302 | overrides?: CallOverrides 303 | ): Promise; 304 | 305 | lootExpansionTokenUri( 306 | lootId: BigNumberish, 307 | overrides?: CallOverrides 308 | ): Promise; 309 | 310 | "lootExpansionTokenUri(uint256)"( 311 | lootId: BigNumberish, 312 | overrides?: CallOverrides 313 | ): Promise; 314 | 315 | maxSupply(overrides?: CallOverrides): Promise; 316 | 317 | "maxSupply()"(overrides?: CallOverrides): Promise; 318 | 319 | setFee( 320 | _feeAmount: BigNumberish, 321 | overrides?: Overrides & { from?: string | Promise } 322 | ): Promise; 323 | 324 | "setFee(uint256)"( 325 | _feeAmount: BigNumberish, 326 | overrides?: Overrides & { from?: string | Promise } 327 | ): Promise; 328 | 329 | setRecipient( 330 | _feeRecipient: string, 331 | overrides?: Overrides & { from?: string | Promise } 332 | ): Promise; 333 | 334 | "setRecipient(address)"( 335 | _feeRecipient: string, 336 | overrides?: Overrides & { from?: string | Promise } 337 | ): Promise; 338 | }; 339 | } 340 | -------------------------------------------------------------------------------- /src/gen/typechain/factories/LootRegistry__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Signer, Contract, ContractFactory, Overrides } from "ethers"; 6 | import { Provider, TransactionRequest } from "@ethersproject/providers"; 7 | 8 | import type { LootRegistry } from "../LootRegistry"; 9 | 10 | export class LootRegistry__factory extends ContractFactory { 11 | constructor(signer?: Signer) { 12 | super(_abi, _bytecode, signer); 13 | } 14 | 15 | deploy( 16 | overrides?: Overrides & { from?: string | Promise } 17 | ): Promise { 18 | return super.deploy(overrides || {}) as Promise; 19 | } 20 | getDeployTransaction( 21 | overrides?: Overrides & { from?: string | Promise } 22 | ): TransactionRequest { 23 | return super.getDeployTransaction(overrides || {}); 24 | } 25 | attach(address: string): LootRegistry { 26 | return super.attach(address) as LootRegistry; 27 | } 28 | connect(signer: Signer): LootRegistry__factory { 29 | return super.connect(signer) as LootRegistry__factory; 30 | } 31 | static connect( 32 | address: string, 33 | signerOrProvider: Signer | Provider 34 | ): LootRegistry { 35 | return new Contract(address, _abi, signerOrProvider) as LootRegistry; 36 | } 37 | } 38 | 39 | const _abi = [ 40 | { 41 | inputs: [], 42 | stateMutability: "nonpayable", 43 | type: "constructor", 44 | }, 45 | { 46 | anonymous: false, 47 | inputs: [ 48 | { 49 | indexed: true, 50 | internalType: "address", 51 | name: "owner", 52 | type: "address", 53 | }, 54 | { 55 | indexed: true, 56 | internalType: "address", 57 | name: "approved", 58 | type: "address", 59 | }, 60 | { 61 | indexed: true, 62 | internalType: "uint256", 63 | name: "tokenId", 64 | type: "uint256", 65 | }, 66 | ], 67 | name: "Approval", 68 | type: "event", 69 | }, 70 | { 71 | anonymous: false, 72 | inputs: [ 73 | { 74 | indexed: true, 75 | internalType: "address", 76 | name: "owner", 77 | type: "address", 78 | }, 79 | { 80 | indexed: true, 81 | internalType: "address", 82 | name: "operator", 83 | type: "address", 84 | }, 85 | { 86 | indexed: false, 87 | internalType: "bool", 88 | name: "approved", 89 | type: "bool", 90 | }, 91 | ], 92 | name: "ApprovalForAll", 93 | type: "event", 94 | }, 95 | { 96 | anonymous: false, 97 | inputs: [ 98 | { 99 | indexed: true, 100 | internalType: "address", 101 | name: "expansionAddress", 102 | type: "address", 103 | }, 104 | { 105 | indexed: true, 106 | internalType: "uint256", 107 | name: "expansionID", 108 | type: "uint256", 109 | }, 110 | { 111 | indexed: true, 112 | internalType: "uint256", 113 | name: "feeAmount", 114 | type: "uint256", 115 | }, 116 | { 117 | indexed: false, 118 | internalType: "address", 119 | name: "feeRecipient", 120 | type: "address", 121 | }, 122 | ], 123 | name: "ExpansionRegistered", 124 | type: "event", 125 | }, 126 | { 127 | anonymous: false, 128 | inputs: [ 129 | { 130 | indexed: true, 131 | internalType: "address", 132 | name: "from", 133 | type: "address", 134 | }, 135 | { 136 | indexed: true, 137 | internalType: "address", 138 | name: "to", 139 | type: "address", 140 | }, 141 | { 142 | indexed: true, 143 | internalType: "uint256", 144 | name: "tokenId", 145 | type: "uint256", 146 | }, 147 | ], 148 | name: "Transfer", 149 | type: "event", 150 | }, 151 | { 152 | inputs: [ 153 | { 154 | internalType: "address", 155 | name: "to", 156 | type: "address", 157 | }, 158 | { 159 | internalType: "uint256", 160 | name: "tokenId", 161 | type: "uint256", 162 | }, 163 | ], 164 | name: "approve", 165 | outputs: [], 166 | stateMutability: "nonpayable", 167 | type: "function", 168 | }, 169 | { 170 | inputs: [ 171 | { 172 | internalType: "address", 173 | name: "owner", 174 | type: "address", 175 | }, 176 | ], 177 | name: "balanceOf", 178 | outputs: [ 179 | { 180 | internalType: "uint256", 181 | name: "", 182 | type: "uint256", 183 | }, 184 | ], 185 | stateMutability: "view", 186 | type: "function", 187 | }, 188 | { 189 | inputs: [], 190 | name: "baseURI", 191 | outputs: [ 192 | { 193 | internalType: "string", 194 | name: "", 195 | type: "string", 196 | }, 197 | ], 198 | stateMutability: "view", 199 | type: "function", 200 | }, 201 | { 202 | inputs: [ 203 | { 204 | internalType: "address", 205 | name: "", 206 | type: "address", 207 | }, 208 | ], 209 | name: "claimingFee", 210 | outputs: [ 211 | { 212 | internalType: "uint256", 213 | name: "", 214 | type: "uint256", 215 | }, 216 | ], 217 | stateMutability: "view", 218 | type: "function", 219 | }, 220 | { 221 | inputs: [ 222 | { 223 | internalType: "address", 224 | name: "", 225 | type: "address", 226 | }, 227 | ], 228 | name: "expansionAddressToID", 229 | outputs: [ 230 | { 231 | internalType: "uint256", 232 | name: "", 233 | type: "uint256", 234 | }, 235 | ], 236 | stateMutability: "view", 237 | type: "function", 238 | }, 239 | { 240 | inputs: [ 241 | { 242 | internalType: "uint256", 243 | name: "", 244 | type: "uint256", 245 | }, 246 | ], 247 | name: "expansionIDtoAddress", 248 | outputs: [ 249 | { 250 | internalType: "address", 251 | name: "", 252 | type: "address", 253 | }, 254 | ], 255 | stateMutability: "view", 256 | type: "function", 257 | }, 258 | { 259 | inputs: [ 260 | { 261 | internalType: "uint256", 262 | name: "", 263 | type: "uint256", 264 | }, 265 | ], 266 | name: "expansions", 267 | outputs: [ 268 | { 269 | internalType: "address", 270 | name: "", 271 | type: "address", 272 | }, 273 | ], 274 | stateMutability: "view", 275 | type: "function", 276 | }, 277 | { 278 | inputs: [ 279 | { 280 | internalType: "address", 281 | name: "", 282 | type: "address", 283 | }, 284 | ], 285 | name: "feeRecipient", 286 | outputs: [ 287 | { 288 | internalType: "address", 289 | name: "", 290 | type: "address", 291 | }, 292 | ], 293 | stateMutability: "view", 294 | type: "function", 295 | }, 296 | { 297 | inputs: [ 298 | { 299 | internalType: "uint256", 300 | name: "tokenId", 301 | type: "uint256", 302 | }, 303 | ], 304 | name: "getApproved", 305 | outputs: [ 306 | { 307 | internalType: "address", 308 | name: "", 309 | type: "address", 310 | }, 311 | ], 312 | stateMutability: "view", 313 | type: "function", 314 | }, 315 | { 316 | inputs: [], 317 | name: "getExpansions", 318 | outputs: [ 319 | { 320 | internalType: "address[]", 321 | name: "", 322 | type: "address[]", 323 | }, 324 | ], 325 | stateMutability: "view", 326 | type: "function", 327 | }, 328 | { 329 | inputs: [ 330 | { 331 | internalType: "address", 332 | name: "owner", 333 | type: "address", 334 | }, 335 | { 336 | internalType: "address", 337 | name: "operator", 338 | type: "address", 339 | }, 340 | ], 341 | name: "isApprovedForAll", 342 | outputs: [ 343 | { 344 | internalType: "bool", 345 | name: "", 346 | type: "bool", 347 | }, 348 | ], 349 | stateMutability: "view", 350 | type: "function", 351 | }, 352 | { 353 | inputs: [], 354 | name: "name", 355 | outputs: [ 356 | { 357 | internalType: "string", 358 | name: "", 359 | type: "string", 360 | }, 361 | ], 362 | stateMutability: "view", 363 | type: "function", 364 | }, 365 | { 366 | inputs: [ 367 | { 368 | internalType: "uint256", 369 | name: "tokenId", 370 | type: "uint256", 371 | }, 372 | ], 373 | name: "ownerOf", 374 | outputs: [ 375 | { 376 | internalType: "address", 377 | name: "", 378 | type: "address", 379 | }, 380 | ], 381 | stateMutability: "view", 382 | type: "function", 383 | }, 384 | { 385 | inputs: [ 386 | { 387 | internalType: "address", 388 | name: "_expansionAddress", 389 | type: "address", 390 | }, 391 | ], 392 | name: "registerLootExpansion", 393 | outputs: [], 394 | stateMutability: "nonpayable", 395 | type: "function", 396 | }, 397 | { 398 | inputs: [ 399 | { 400 | internalType: "address", 401 | name: "from", 402 | type: "address", 403 | }, 404 | { 405 | internalType: "address", 406 | name: "to", 407 | type: "address", 408 | }, 409 | { 410 | internalType: "uint256", 411 | name: "tokenId", 412 | type: "uint256", 413 | }, 414 | ], 415 | name: "safeTransferFrom", 416 | outputs: [], 417 | stateMutability: "nonpayable", 418 | type: "function", 419 | }, 420 | { 421 | inputs: [ 422 | { 423 | internalType: "address", 424 | name: "from", 425 | type: "address", 426 | }, 427 | { 428 | internalType: "address", 429 | name: "to", 430 | type: "address", 431 | }, 432 | { 433 | internalType: "uint256", 434 | name: "tokenId", 435 | type: "uint256", 436 | }, 437 | { 438 | internalType: "bytes", 439 | name: "_data", 440 | type: "bytes", 441 | }, 442 | ], 443 | name: "safeTransferFrom", 444 | outputs: [], 445 | stateMutability: "nonpayable", 446 | type: "function", 447 | }, 448 | { 449 | inputs: [ 450 | { 451 | internalType: "address", 452 | name: "operator", 453 | type: "address", 454 | }, 455 | { 456 | internalType: "bool", 457 | name: "approved", 458 | type: "bool", 459 | }, 460 | ], 461 | name: "setApprovalForAll", 462 | outputs: [], 463 | stateMutability: "nonpayable", 464 | type: "function", 465 | }, 466 | { 467 | inputs: [ 468 | { 469 | internalType: "bytes4", 470 | name: "interfaceId", 471 | type: "bytes4", 472 | }, 473 | ], 474 | name: "supportsInterface", 475 | outputs: [ 476 | { 477 | internalType: "bool", 478 | name: "", 479 | type: "bool", 480 | }, 481 | ], 482 | stateMutability: "view", 483 | type: "function", 484 | }, 485 | { 486 | inputs: [], 487 | name: "symbol", 488 | outputs: [ 489 | { 490 | internalType: "string", 491 | name: "", 492 | type: "string", 493 | }, 494 | ], 495 | stateMutability: "view", 496 | type: "function", 497 | }, 498 | { 499 | inputs: [ 500 | { 501 | internalType: "uint256", 502 | name: "index", 503 | type: "uint256", 504 | }, 505 | ], 506 | name: "tokenByIndex", 507 | outputs: [ 508 | { 509 | internalType: "uint256", 510 | name: "", 511 | type: "uint256", 512 | }, 513 | ], 514 | stateMutability: "view", 515 | type: "function", 516 | }, 517 | { 518 | inputs: [ 519 | { 520 | internalType: "address", 521 | name: "owner", 522 | type: "address", 523 | }, 524 | { 525 | internalType: "uint256", 526 | name: "index", 527 | type: "uint256", 528 | }, 529 | ], 530 | name: "tokenOfOwnerByIndex", 531 | outputs: [ 532 | { 533 | internalType: "uint256", 534 | name: "", 535 | type: "uint256", 536 | }, 537 | ], 538 | stateMutability: "view", 539 | type: "function", 540 | }, 541 | { 542 | inputs: [ 543 | { 544 | internalType: "uint256", 545 | name: "tokenId", 546 | type: "uint256", 547 | }, 548 | ], 549 | name: "tokenURI", 550 | outputs: [ 551 | { 552 | internalType: "string", 553 | name: "", 554 | type: "string", 555 | }, 556 | ], 557 | stateMutability: "view", 558 | type: "function", 559 | }, 560 | { 561 | inputs: [], 562 | name: "totalSupply", 563 | outputs: [ 564 | { 565 | internalType: "uint256", 566 | name: "", 567 | type: "uint256", 568 | }, 569 | ], 570 | stateMutability: "view", 571 | type: "function", 572 | }, 573 | { 574 | inputs: [ 575 | { 576 | internalType: "address", 577 | name: "from", 578 | type: "address", 579 | }, 580 | { 581 | internalType: "address", 582 | name: "to", 583 | type: "address", 584 | }, 585 | { 586 | internalType: "uint256", 587 | name: "tokenId", 588 | type: "uint256", 589 | }, 590 | ], 591 | name: "transferFrom", 592 | outputs: [], 593 | stateMutability: "nonpayable", 594 | type: "function", 595 | }, 596 | ]; 597 | 598 | const _bytecode = 599 | "0x60806040523480156200001157600080fd5b50604080518082018252600c81526b4c6f6f74526567697374727960a01b6020808301919091528251808401909352600d83526c2637b7ba22bc3830b739b4b7b760991b90830152906200006c6301ffc9a760e01b620000d6565b8151620000819060069060208501906200015b565b508051620000979060079060208401906200015b565b50620000aa6380ac58cd60e01b620000d6565b620000bc635b5e139f60e01b620000d6565b620000ce63780e9d6360e01b620000d6565b505062000207565b6001600160e01b0319808216141562000136576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001935760008555620001de565b82601f10620001ae57805160ff1916838001178555620001de565b82800160010185558215620001de579182015b82811115620001de578251825591602001919060010190620001c1565b50620001ec929150620001f0565b5090565b5b80821115620001ec5760008155600101620001f1565b61287f80620002176000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80636c0360eb116100e3578063b88d4fde1161008c578063d78162e911610066578063d78162e914610667578063e985e9c51461069a578063f4187dd9146106d557610198565b8063b88d4fde1461055a578063c28c644f1461062d578063c87b56dd1461064a57610198565b806395d89b41116100bd57806395d89b41146104bf578063a22cb465146104c7578063a2e1d2281461050257610198565b80636c0360eb1461045157806370a082311461045957806376fae2de1461048c57610198565b80632f745c59116101455780634dd25cee1161011f5780634dd25cee146103fa5780634f6ccce7146104175780636352211e1461043457610198565b80632f745c591461034b578063405e1b631461038457806342842e0e146103b757610198565b8063095ea7b311610176578063095ea7b3146102b357806318160ddd146102ee57806323b872dd1461030857610198565b806301ffc9a71461019d57806306fdde03146101f0578063081812fc1461026d575b600080fd5b6101dc600480360360208110156101b357600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610708565b604080519115158252519081900360200190f35b6101f8610743565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023257818101518382015260200161021a565b50505050905090810190601f16801561025f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61028a6004803603602081101561028357600080fd5b50356107f7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102ec600480360360408110156102c957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610880565b005b6102f66109c3565b60408051918252519081900360200190f35b6102ec6004803603606081101561031e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356109d4565b6102f66004803603604081101561036157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a45565b6102f66004803603602081101561039a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a7d565b6102ec600480360360608110156103cd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610a8f565b61028a6004803603602081101561041057600080fd5b5035610aaa565b6102f66004803603602081101561042d57600080fd5b5035610ad2565b61028a6004803603602081101561044a57600080fd5b5035610ae8565b6101f8610b10565b6102f66004803603602081101561046f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b8f565b6102f6600480360360208110156104a257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c2b565b6101f8610c3d565b6102ec600480360360408110156104dd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515610cbc565b61050a610e2d565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561054657818101518382015260200161052e565b505050509050019250505060405180910390f35b6102ec6004803603608081101561057057600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013590911691604082013591908101906080810160608201356401000000008111156105b857600080fd5b8201836020820111156105ca57600080fd5b803590602001918460018302840111640100000000831117156105ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e9b945050505050565b61028a6004803603602081101561064357600080fd5b5035610f13565b6101f86004803603602081101561066057600080fd5b5035610f4a565b61028a6004803603602081101561067d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112b7565b6101dc600480360360408110156106b057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166112df565b6102ec600480360360208110156106eb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661131a565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f106107c2576101008083540402835291602001916107ed565b820191906000526020600020905b8154815290600101906020018083116107d057829003601f168201915b5050505050905090565b60006108028261180f565b610857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612774602c913960400191505060405180910390fd5b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061088b82610ae8565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610912576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806127f86021913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661093161181c565b73ffffffffffffffffffffffffffffffffffffffff16148061095f575061095f8161095a61181c565b6112df565b6109b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806126c76038913960400191505060405180910390fd5b6109be8383611820565b505050565b60006109cf60026118c0565b905090565b6109e56109df61181c565b826118cb565b610a3a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806128196031913960400191505060405180910390fd5b6109be8383836119bd565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260408120610a749083611b98565b90505b92915050565b600d6020526000908152604090205481565b6109be83838360405180602001604052806000815250610e9b565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b600080610ae0600284611ba4565b509392505050565b6000610a77826040518060600160405280602981526020016127296029913960029190611bc0565b60098054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f106107c2576101008083540402835291602001916107ed565b600073ffffffffffffffffffffffffffffffffffffffff8216610bfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806126ff602a913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020610a77906118c0565b600c6020526000908152604090205481565b60078054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f106107c2576101008083540402835291602001916107ed565b610cc461181c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d5e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000610d6b61181c565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040918201600090812091871680825291909352912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001692151592909217909155610dda61181c565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6060600a8054806020026020016040519081016040528092919081815260200182805480156107ed57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e67575050505050905090565b610eac610ea661181c565b836118cb565b610f01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806128196031913960400191505060405180910390fd5b610f0d84848484611bd7565b50505050565b600a8181548110610f2357600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6060610f558261180f565b610faa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806127c9602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921691909104601f81018590048502820185019093528281529290919083018282801561105b5780601f106110305761010080835404028352916020019161105b565b820191906000526020600020905b81548152906001019060200180831161103e57829003601f168201915b50505050509050600061106c610b10565b90508051600014156110805750905061073e565b81511561119b5780826040516020018083805190602001908083835b602083106110d957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161109c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905285519190930192850191508083835b6020831061115d57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611120565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529250505061073e565b806111a585611c43565b6040516020018083805190602001908083835b602083106111f557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016111b8565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905285519190930192850191508083835b6020831061127957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161123c565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c602052604090205415611396576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806126876040913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16633f5c50c460016040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b1580156113e857600080fd5b505afa9250505080156114ec57506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052602081101561143957600080fd5b810190808051604051939291908464010000000082111561145957600080fd5b90830190602082018581111561146e57600080fd5b825164010000000081118282018810171561148857600080fd5b82525081516020918201929091019080838360005b838110156114b557818101518382015260200161149d565b50505050905090810190601f1680156114e25780820380516001836020036101000a031916815260200191505b5060405250505060015b611541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260538152602001806125906053913960600191505060405180910390fd5b600081511161159b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260538152602001806125906053913960600191505060405180910390fd5b50600a80546001810182557fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805473ffffffffffffffffffffffffffffffffffffffff84167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216811790925591546000818152600b6020908152604080832080549096168517909555838252600c81529084902082905583517f88888d95000000000000000000000000000000000000000000000000000000008152935191936388888d959260048083019392829003018186803b15801561167f57600080fd5b505afa9250505080156116a457506040513d602081101561169f57600080fd5b505160015b6116ad576117a1565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600d602090815260409182902084905581517f7c5e62d00000000000000000000000000000000000000000000000000000000081529151637c5e62d0926004808201939291829003018186803b15801561172257600080fd5b505afa158015611736573d6000803e3d6000fd5b505050506040513d602081101561174c57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff8481166000908152600e6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055505b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600d6020908152604080832054600e835292819020548151951685525191938593927f32035d43c9d85fa8f35475f82c23b45bf4ed8bd8804c4e902040509408fe52cf929181900390910190a45050565b6000610a77600283611d70565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416908117909155819061187a82610ae8565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610a7782611d7c565b60006118d68261180f565b61192b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061265b602c913960400191505060405180910390fd5b600061193683610ae8565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806119a557508373ffffffffffffffffffffffffffffffffffffffff1661198d846107f7565b73ffffffffffffffffffffffffffffffffffffffff16145b806119b557506119b581856112df565b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166119dd82610ae8565b73ffffffffffffffffffffffffffffffffffffffff1614611a49576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806127a06029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ab5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126376024913960400191505060405180910390fd5b611ac08383836109be565b611acb600082611820565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409020611afa9082611d80565b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020611b2a9082611d8c565b50611b3760028284611d98565b50808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610a748383611dbb565b6000808080611bb38686611e39565b9097909650945050505050565b6000611bcd848484611ece565b90505b9392505050565b611be28484846119bd565b611bee84848484611fb2565b610f0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806126056032913960400191505060405180910390fd5b606081611c84575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261073e565b8160005b8115611c9c57600101600a82049150611c88565b60008167ffffffffffffffff81118015611cb557600080fd5b506040519080825280601f01601f191660200182016040528015611ce0576020820181803683370190505b5085935090507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8315611d6757600a840660300160f81b82828060019003935081518110611d2d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350611d0a565b50949350505050565b6000610a7483836121c2565b5490565b6000610a7483836121da565b6000610a7483836122be565b6000611bcd848473ffffffffffffffffffffffffffffffffffffffff8516612308565b81546000908210611e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806125e36022913960400191505060405180910390fd5b826000018281548110611e2657fe5b9060005260206000200154905092915050565b815460009081908310611e97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806127526022913960400191505060405180910390fd5b6000846000018481548110611ea857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281611f83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f48578181015183820152602001611f30565b50505050905090810190601f168015611f755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110611f9657fe5b9060005260206000209060020201600101549150509392505050565b6000611fd38473ffffffffffffffffffffffffffffffffffffffff1661239f565b611fdf575060016119b5565b60006121577f150b7a020000000000000000000000000000000000000000000000000000000061200d61181c565b888787604051602401808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561208e578181015183820152602001612076565b50505050905090810190601f1680156120bb5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016126056032913973ffffffffffffffffffffffffffffffffffffffff881691906123a5565b9050600081806020019051602081101561217057600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001492505050949350505050565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156122b45783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808301919081019060009087908390811061222b57fe5b906000526020600020015490508087600001848154811061224857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061227857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a77565b6000915050610a77565b60006122ca83836121c2565b61230057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a77565b506000610a77565b60008281526001840160205260408120548061236d575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611bd0565b8285600001600183038154811061238057fe5b9060005260206000209060020201600101819055506000915050611bd0565b3b151590565b6060611bcd8484600085856123b98561239f565b61242457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b6020831061248d57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612450565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146124ef576040519150601f19603f3d011682016040523d82523d6000602084013e6124f4565b606091505b509150915061250482828661250f565b979650505050505050565b6060831561251e575081611bd0565b82511561252e5782518084602001fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152845160248401528451859391928392604401919085019080838360008315611f48578181015183820152602001611f3056fe4c6f6f7452656769737472792372656769737465724c6f6f74457870616e73696f6e3a20457870616e73696f6e20646f65736e277420737570706f7274206c6f6f74457870616e73696f6e546f6b656e557269456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4c6f6f7452656769737472792372656769737465724c6f6f74457870616e73696f6e3a20457870616e73696f6e20616c726561647920726567697374657265644552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220f6beaf1419c8314bfb5548c56fc7f4734e073e534150cfe47d5830aeb840586764736f6c63430007060033"; 600 | --------------------------------------------------------------------------------