From 338bbe8e14c5e5b1798b8d4c6f9d7caf510da93a Mon Sep 17 00:00:00 2001 From: James Duncombe Date: Mon, 4 Mar 2024 18:29:20 +0000 Subject: [PATCH] Deployment of updated FAST facets. --- deployments/mumbai/FastAccessFacet.json | 98 +++++---------------- deployments/mumbai/FastAutomatonsFacet.json | 98 +++++---------------- deployments/mumbai/FastTokenFacet.json | 60 +++++-------- deployments/mumbai/FastTopFacet.json | 98 +++++---------------- 4 files changed, 85 insertions(+), 269 deletions(-) diff --git a/deployments/mumbai/FastAccessFacet.json b/deployments/mumbai/FastAccessFacet.json index 67246353..dfa7785c 100644 --- a/deployments/mumbai/FastAccessFacet.json +++ b/deployments/mumbai/FastAccessFacet.json @@ -1,5 +1,5 @@ { - "address": "0xDe7C5f5377A5C5E521e530bbac55a59AB8cd3370", + "address": "0x6cCD197c28d56E14C1e8af07Bf82145f4486b513", "abi": [ { "inputs": [ @@ -45,31 +45,6 @@ "name": "RequiresValidMember", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -342,31 +317,6 @@ "name": "Minted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, { "inputs": [ { @@ -573,44 +523,44 @@ "type": "function" } ], - "transactionHash": "0xf0f1c0c2e851aa31894bf46685ed304731d64d0a8a598a5425684723a551dba8", + "transactionHash": "0xd9bb567fec683d25b38d0ffb99d8e96b55a164de44bc57258770e72053aef0c3", "receipt": { "to": "0x6DF2D25d8C6FD680730ee658b530A05a99BB769a", "from": "0x717634cfe06FFAB2CEAA7fcf1b9019813f4B25FE", "contractAddress": null, - "transactionIndex": 3, - "gasUsed": "1214741", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000008000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", - "blockHash": "0xe761e167838649d275910b80185739c03766eb9dc3012423f68909b864dbb08e", - "transactionHash": "0xf0f1c0c2e851aa31894bf46685ed304731d64d0a8a598a5425684723a551dba8", + "transactionIndex": 8, + "gasUsed": "1258903", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", + "blockHash": "0x45987276465d9052c30b90b050d57a9c7fe057f1373cb178554b284f84464af4", + "transactionHash": "0xd9bb567fec683d25b38d0ffb99d8e96b55a164de44bc57258770e72053aef0c3", "logs": [ { - "transactionIndex": 3, - "blockNumber": 37998152, - "transactionHash": "0xf0f1c0c2e851aa31894bf46685ed304731d64d0a8a598a5425684723a551dba8", + "transactionIndex": 8, + "blockNumber": 46174040, + "transactionHash": "0xd9bb567fec683d25b38d0ffb99d8e96b55a164de44bc57258770e72053aef0c3", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000717634cfe06ffab2ceaa7fcf1b9019813f4b25fe", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" ], - "data": "0x0000000000000000000000000000000000000000000000000006793364c5641500000000000000000000000000000000000000000000000014d4a340f1392570000000000000000000000000000000000000000000000ce11d61020985b9be9700000000000000000000000000000000000000000000000014ce2a0d8c73c15b000000000000000000000000000000000000000000000ce11d677b3cea7f22ac", - "logIndex": 20, - "blockHash": "0xe761e167838649d275910b80185739c03766eb9dc3012423f68909b864dbb08e" + "data": "0x0000000000000000000000000000000000000000000000000006b572cb2eb90000000000000000000000000000000000000000000000000013a27f49862408170000000000000000000000000000000000000000000023b6cb178b3aae495039000000000000000000000000000000000000000000000000139bc9d6baf54f170000000000000000000000000000000000000000000023b6cb1e40ad79780939", + "logIndex": 32, + "blockHash": "0x45987276465d9052c30b90b050d57a9c7fe057f1373cb178554b284f84464af4" } ], - "blockNumber": 37998152, - "cumulativeGasUsed": "1754982", + "blockNumber": 46174040, + "cumulativeGasUsed": "2743869", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 23, - "solcInputHash": "abd8ffc99037ef41cdad00fb626630ba", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresGovernorsManager\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresMembersManager\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresValidGovernor\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresValidMember\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"GovernorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"GovernorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"MemberAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"MemberRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"addGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"addMember\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"flags\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isGovernor\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isMember\",\"type\":\"bool\"}],\"internalType\":\"struct FastAccessFacet.Flags\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isMember\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"memberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateMembers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"removeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"removeMember\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addGovernor(address)\":{\"params\":{\"who\":\"is the address to be added.\"}},\"addMember(address)\":{\"params\":{\"who\":\"is the address to be added.\"}},\"flags(address)\":{\"params\":{\"a\":\"is the address to retrieve flags for.\"},\"returns\":{\"_0\":\"A `Flags` struct.\"}},\"governorCount()\":{\"returns\":{\"_0\":\"An `uint256`.\"}},\"isGovernor(address)\":{\"params\":{\"who\":\"is the address to test.\"},\"returns\":{\"_0\":\"A `bool` equal to `true` when `candidate` is a governor.\"}},\"isMember(address)\":{\"params\":{\"who\":\"is the address to test.\"},\"returns\":{\"_0\":\"A `bool` equal to `true` when `candidate` is a member.\"}},\"memberCount()\":{\"returns\":{\"_0\":\"An `uint256`.\"}},\"paginateGovernors(uint256,uint256)\":{\"params\":{\"index\":\"is the offset at which the pagination operation should start.\",\"perPage\":\"is how many items should be returned.\"},\"returns\":{\"_0\":\"A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\"}},\"paginateMembers(uint256,uint256)\":{\"params\":{\"index\":\"is the offset at which the pagination operation should start.\",\"perPage\":\"is how many items should be returned.\"},\"returns\":{\"_0\":\"A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\"}},\"removeGovernor(address)\":{\"params\":{\"governor\":\"The address of the governor to be removed.\"}},\"removeMember(address)\":{\"params\":{\"member\":\"The address of the member to be removed.\"}}},\"title\":\"The Fast Smart Contract.\",\"version\":1},\"userdoc\":{\"errors\":{\"RequiresGovernorsManager(address)\":[{\"notice\":\"Happens when a function is called by an address that is not a governors manager.\"}],\"RequiresMembersManager(address)\":[{\"notice\":\"Happens when a function is called by an address that is not a members manager.\"}],\"RequiresValidGovernor(address)\":[{\"notice\":\"Happens when an address is used as a governor but is not valid.\"}],\"RequiresValidMember(address)\":[{\"notice\":\"Happens when an address is used as a member but is not valid.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"notice\":\"See `ERC20.Approval`.\"},\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"GovernorAdded(address)\":{\"notice\":\"Emited when a governor is added to the implementing contract.\"},\"GovernorRemoved(address)\":{\"notice\":\"Emited when a governor is removed to the implementing contract.\"},\"MemberAdded(address)\":{\"notice\":\"Emited when a member is added to the implementing contract.\"},\"MemberRemoved(address)\":{\"notice\":\"Emited when a member is removed to the implementing contract.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"},\"Transfer(address,address,uint256)\":{\"notice\":\"See `ERC20.Transfer`.\"}},\"kind\":\"user\",\"methods\":{\"addGovernor(address)\":{\"notice\":\"Adds a governor to the list of known governors.\"},\"addMember(address)\":{\"notice\":\"Adds a member to the list of known members.\"},\"flags(address)\":{\"notice\":\"Retrieves flags for a given address.\"},\"governorCount()\":{\"notice\":\"Queries the number of governors.\"},\"isGovernor(address)\":{\"notice\":\"Queries whether a given address is a governor or not.\"},\"isMember(address)\":{\"notice\":\"Queries whether a given address is a member or not.\"},\"memberCount()\":{\"notice\":\"Queries the number of members.\"},\"paginateGovernors(uint256,uint256)\":{\"notice\":\"Queries pages of governors based on a start index and a page size.\"},\"paginateMembers(uint256,uint256)\":{\"notice\":\"Queries pages of members based on a start index and a page size.\"},\"removeGovernor(address)\":{\"notice\":\"Removes a governor from this contract.Requires that the caller is a governor of this Issuer.Emits a `AHasGovernors.GovernorRemoved` event.\"},\"removeMember(address)\":{\"notice\":\"Removes a member from this contract.Requires that the caller is a member of this Issuer.Emits a `AHasMembers.MemberRemoved` event.\"}},\"notice\":\"The FAST Access facet is the source of truth when it comes to permissioning and ACLs within a given FAST.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastAccessFacet.sol\":\"FastAccessFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x953780331b801357c0324bc901c9d11733823f3e424fde528eb9524f704499e0\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasGovernors.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(msg.sender) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(msg.sender) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xf7bd69c212ce87774af9365e3565993f253cabd67557d3a7d317e679d5b4385b\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(msg.sender) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(msg.sender) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xe9876fc4ec6dadc0d7e37e5562cb359b4b1dc6d188651893e73fc541be1e56a3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"../marketplace/MarketplaceAccessFacet.sol\\\";\\nimport \\\"../issuer/IssuerAccessFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The FAST Access facet is the source of truth when it comes to\\n * permissioning and ACLs within a given FAST.\\n */\\ncontract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n /// Structs.\\n\\n /**\\n * @notice This structure isn't used anywhere in storage. Instead, it\\n * allows various methods of the contract to return all the flags\\n * associated with a given address in one go.\\n */\\n struct Flags {\\n /// @notice Whether or not the item in scope is considered a governor of this FAST.\\n bool isGovernor;\\n /// @notice Whether or not the item in scope is considered a member of this FAST.\\n bool isMember;\\n }\\n\\n /// AHasGovernors implementation.\\n\\n function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n\\n function isValidGovernor(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onGovernorAdded(address governor) internal override(AHasGovernors) {\\n // If the governor isn't a FAST member yet, add them.\\n if (!AHasMembers(this).isMember(governor)) AHasMembers(this).addMember(governor);\\n // Notify issuer that this governor was added to this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorAddedToFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onGovernorRemoved(address governor) internal override(AHasGovernors) {\\n // Notify issuer that this governor was removed from this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorRemovedFromFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return\\n // The current contract should be able to manage its own members.\\n address(this) == who ||\\n // Governors can manage members.\\n AHasGovernors(this).isGovernor(who) ||\\n // Automatons with the correct privilege can manage members.\\n AHasAutomatons(address(this)).automatonCan(who, FAST_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal view override(AHasMembers) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onMemberAdded(address member) internal override(AHasMembers) {\\n // Notify marketplace that this member was added to this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberAddedToFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onMemberRemoved(address member) internal override(AHasMembers) {\\n // Notify token facet that this member was removed.\\n FastTokenFacet(address(this)).beforeRemovingMember(member);\\n // Notify marketplace that this member was removed from this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberRemovedFromFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// Flags.\\n\\n /**\\n * @notice Retrieves flags for a given address.\\n * @param a is the address to retrieve flags for.\\n * @return A `Flags` struct.\\n */\\n function flags(address a) external view returns (Flags memory) {\\n return Flags({isGovernor: AHasGovernors(address(this)).isGovernor(a), isMember: AHasMembers(this).isMember(a)});\\n }\\n}\\n\",\"keccak256\":\"0x50e406e05c99d2240cdd8ce53f94ddc868fee0482aabc8d9c6596fc3d9fb2a00\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/FastFrontendFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"./lib/LibFastDistributions.sol\\\";\\nimport \\\"./lib/LibFastCrowdfunds.sol\\\";\\n\\n/**\\n * @notice A facet dedicated to view / UI only methods. This facet should never hold any method that\\n * is not either `pure` or `view`, except to emit events.\\n */\\ncontract FastFrontendFacet is AFastFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Data structures.\\n\\n /**\\n * @notice This struct groups the common attributes of a FAST.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n /// @notice The `address` of the FAST.\\n address addr;\\n /// @notice The `name` of the FAST (ERC20).\\n string name;\\n /// @notice The `symbol` of the FAST (ERC20).\\n string symbol;\\n /// @notice The `decimals` of the FAST (ERC20).\\n uint8 decimals;\\n /// @notice The `totalSupply` of the FAST (ERC20).\\n uint256 totalSupply;\\n /// @notice Whether the FAST is semi public or not.\\n bool isSemiPublic;\\n /// @notice Whether the FAST has a fixed supply or continious.\\n bool hasFixedSupply;\\n /// @notice Whether the transfers are enabled or not for this FAST.\\n bool transfersDisabled;\\n /// @notice The default crowdfunds basis point fee.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n /// @notice The reserve balance.\\n uint256 reserveBalance;\\n /// @notice The number of members the FAST has.\\n uint256 memberCount;\\n /// @notice The number of governors for the FAST.\\n uint256 governorCount;\\n }\\n\\n /**\\n * @notice Member level details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct PrivilegesDetails {\\n /// @notice The Member's address.\\n address addr;\\n /// @notice The Member's balance.\\n uint256 balance;\\n /// @notice The Member's ETH balance.\\n uint256 ethBalance;\\n /// @notice Whether or not the address is a Member.\\n bool isMember;\\n /// @notice Whether or not the address is a Governor.\\n bool isGovernor;\\n /// @notice Automaton flags assigned to this address.\\n uint32 automatonPrivileges;\\n }\\n\\n /// Emitters.\\n\\n /**\\n * @notice Called by diamond facets, signals that FAST details may have changed.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be another facet of the diamond.\\n * Emits `DetailsChanged`, see `IFastEvents.DetailsChanged`\\n */\\n function emitDetailsChanged() external onlyDiamondFacet {\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n emit DetailsChanged({\\n transfersDisabled: LibFast.data().transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n memberCount: LibHasMembers.data().memberSet.values.length,\\n governorCount: LibHasGovernors.data().governorSet.values.length,\\n totalSupply: tokenData.totalSupply,\\n reserveBalance: tokenData.balances[LibHelpers.ZERO_ADDRESS]\\n });\\n }\\n\\n /// Public functions.\\n\\n /**\\n * @notice Gets the details of a FAST.\\n * @return The details for the current FAST, see `Details`.\\n */\\n function details() public view returns (Details memory) {\\n LibFast.Data storage topStorage = LibFast.data();\\n LibFastToken.Data storage tokenStorage = LibFastToken.data();\\n return\\n Details({\\n addr: address(this),\\n name: tokenStorage.name,\\n symbol: tokenStorage.symbol,\\n decimals: tokenStorage.decimals,\\n totalSupply: tokenStorage.totalSupply,\\n isSemiPublic: topStorage.isSemiPublic,\\n hasFixedSupply: topStorage.hasFixedSupply,\\n transfersDisabled: topStorage.transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n reserveBalance: tokenStorage.balances[LibHelpers.ZERO_ADDRESS],\\n memberCount: AHasMembers(address(this)).memberCount(),\\n governorCount: LibHasGovernors.data().governorSet.values.length\\n });\\n }\\n\\n /**\\n * @notice Gets detailed address privileges details.\\n * @param addr The address to get the privileges for.\\n * @return A FAST member's details, see `MemberDetails`.\\n */\\n function detailedPrivileges(address addr) public view returns (PrivilegesDetails memory) {\\n return\\n PrivilegesDetails({\\n addr: addr,\\n balance: LibFastToken.data().balances[addr],\\n ethBalance: (payable(addr).balance),\\n isMember: AHasMembers(address(this)).isMember(addr),\\n isGovernor: AHasGovernors(address(this)).isGovernor(addr),\\n automatonPrivileges: AHasAutomatons(address(this)).automatonPrivileges(addr)\\n });\\n }\\n\\n function paginateDetailedMembers(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n LibHasMembers.Data storage membersData = LibHasMembers.data();\\n (address[] memory members, uint256 nextCursor) = LibPaginate.addresses(membersData.memberSet.values, index, perPage);\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](members.length);\\n uint256 length = members.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(members[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedGovernors(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n (address[] memory governors, uint256 nextCursor) = LibPaginate.addresses(\\n LibHasGovernors.data().governorSet.values,\\n index,\\n perPage\\n );\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](governors.length);\\n uint256 length = governors.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(governors[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedDistributions(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Distribution.Details[] memory, uint256) {\\n (address[] memory distributions, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastDistributions.data().distributionSet.values,\\n index,\\n perPage\\n );\\n Distribution.Details[] memory values = new Distribution.Details[](distributions.length);\\n uint256 length = distributions.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Distribution(distributions[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n /**\\n * @dev Paginates detailed crowdfunds.\\n * @param index The index of the first crowdfund to return.\\n * @param perPage The number of crowdfunds to return.\\n * @return An array of crowdfund details, see `CrowdfundDetails`.\\n */\\n function paginateDetailedCrowdfunds(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Crowdfund.Details[] memory, uint256) {\\n (address[] memory crowdfunds, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastCrowdfunds.data().crowdfundSet.values,\\n index,\\n perPage\\n );\\n Crowdfund.Details[] memory values = new Crowdfund.Details[](crowdfunds.length);\\n uint256 length = crowdfunds.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Crowdfund(crowdfunds[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n}\\n\",\"keccak256\":\"0xdf236a27eb3441e06a4d9aa972a1677f4aed718cb4028f13462bfc7c87670729\",\"license\":\"MIT\"},\"contracts/fast/FastHistoryFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastHistory.sol\\\";\\n\\n/**\\n * @notice Although past events could be scrapped from the chain, we want to\\n * the frontend to be capable of listing past transfers and minting / burning events.\\n * This facet is in charge of performing archival of these things.\\n */\\ncontract FastHistoryFacet is AFastFacet {\\n /// Minting history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are minted.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Mint` on top of the stack.\\n */\\n function minted(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the mint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Mint, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are burnt.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Burn` on top of the stack.\\n */\\n function burnt(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the unmint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Burn, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice Returns the number of supply proofs (minting and burning together) ever created.\\n * @return A `uint256`.\\n */\\n function supplyProofCount() external view returns (uint256) {\\n return LibFastHistory.data().supplyProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of supply proofs (minting and burning together).\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.SupplyProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateSupplyProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n return LibPaginate.supplyProofs(LibFastHistory.data().supplyProofs, cursor, perPage);\\n }\\n\\n /// Transfer history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever a transfer has completed successfuly.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Keeps track of the operation in various tracking structures, so that it can be queried later by `sender` and `recipient`.\\n * - Pushes a transfer proof to the main transfer proof tracking stack.\\n */\\n function transfered(\\n address spender,\\n address from,\\n address to,\\n uint256 amount,\\n string calldata ref\\n ) external onlyDiamondFacet {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n // Keep track of the transfer proof ID for the sender and for the recipient.\\n s.transferProofInvolvements[from].push(s.transferProofs.length);\\n s.transferProofInvolvements[to].push(s.transferProofs.length);\\n // Keep track of the transfer proof globally.\\n s.transferProofs.push(\\n LibFastHistory.TransferProof({\\n spender: spender,\\n from: from,\\n to: to,\\n amount: amount,\\n blockNumber: block.number,\\n ref: ref\\n })\\n );\\n }\\n\\n /**\\n * @notice Returns the number of transfer proofs ever created.\\n * @return A `uint256`.\\n */\\n function transferProofCount() external view returns (uint256) {\\n return LibFastHistory.data().transferProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of transfer proofs.\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateTransferProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n return LibPaginate.transferProofs(LibFastHistory.data().transferProofs, cursor, perPage);\\n }\\n\\n /**\\n * @notice Counts all past inbound and outbound transfers involving a given address.\\n * @param involvee is the address for which to get the transfer proofs.\\n */\\n function transferProofByInvolveeCount(address involvee) external view returns (uint256) {\\n return LibFastHistory.data().transferProofInvolvements[involvee].length;\\n }\\n\\n /**\\n * @notice Returns pages of indices of past inbound and outbound transfer proofs by involvee.\\n * @dev This function is reading from an indexing data structure. Each index points to a record\\n * in the main transfer proof storage, and can then be found in `transferProofs` at returned indices.\\n * @param involvee is the address for which to retrieve a page of data.\\n * @param cursor is where to start.\\n * @param perPage is how many records at most should be returned.\\n */\\n function paginateTransferProofIndicesByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (uint256[] memory, uint256) {\\n return LibPaginate.uint256s(LibFastHistory.data().transferProofInvolvements[involvee], cursor, perPage);\\n }\\n\\n /**\\n * @notice Returns a page of inbound and outbound transfer proofs based on an involvee.#\\n * @param involvee is the address for which to fetch the data.\\n * @param cursor is where to start.\\n * @param perPage is how many items at most to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing the results and the cursor to the next page.\\n */\\n function paginateTransferProofsByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n uint256[] storage collection = s.transferProofInvolvements[involvee];\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = s.transferProofs[collection[cursor + i]];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0x6c517db2a7885a0991311827bb240e6003e1ceabe24f7d7fd245b3c0b0b5e08b\",\"license\":\"MIT\"},\"contracts/fast/FastTokenFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../lib/LibDiamond.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"../marketplace/MarketplaceTokenHoldersFacet.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastAccessFacet.sol\\\";\\nimport \\\"./FastHistoryFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\n\\ncontract FastTokenFacet is AFastFacet, IERC20 {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Constants.\\n\\n string internal constant DEAD_TOKENS_RETRIEVAL = \\\"Dead tokens retrieval\\\";\\n\\n /// Minting methods.\\n\\n /**\\n * @notice Mints an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that either the token has continuous supply, or that no tokens have been minted yet.\\n * - Increases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.minted`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Minted(amount, ref)` event.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function mint(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // We want to make sure that either of these two is true:\\n // - The token doesn't have fixed supply.\\n // - The token has fixed supply but has no tokens yet (First and only mint).\\n if (FastTopFacet(address(this)).hasFixedSupply() && (s.totalSupply != 0 || this.balanceOf(address(0)) != 0))\\n revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Prepare the minted amount on the zero address.\\n s.balances[address(0)] += amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).minted(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Minted(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Burns an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic.\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that the token has continuous supply.\\n * - Requires that there are enough funds in the reserve to cover for `amount` being burnt.\\n * - Decreases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.burnt(amount, ref)`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Burnt(amount, ref)`.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function burn(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n if (FastTopFacet(address(this)).hasFixedSupply()) revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Remove the minted amount from the zero address.\\n s.balances[address(0)] -= amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).burnt(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Burnt(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Allows an Issuer member to move an arbitrary account's holdings back to the reserve,\\n * as per regulatory requirements.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires that the caller is a member of the Issuer contract.\\n * - If the amount held by `holder` is not zero\\n * - The balance of `holder` should be set to zero.\\n * - The reserve's balance should be increased by how much was on the holder's account.\\n * - Total supply should be decreased by that amount too.\\n * - The `holder`'s address should not be tracked as a token holder in this FAST anymore.\\n * - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore.\\n * - A `Transfer(holder, reserve, amount)` event should be emited.\\n * - If the amount previously held by `holder` was not zero,\\n * - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\\n * @param holder is the address for which to move the tokens from.\\n */\\n function retrieveDeadTokens(address holder) external onlyIssuerMember {\\n // Cache how many tokens the holder has.\\n uint256 amount = balanceOf(holder);\\n // Note: The amount **can** be zero in this function.\\n\\n // Grab a pointer to the token storage.\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // These should only run if the amount is zero, as they result in a no-op.\\n if (amount > 0) {\\n // Set the holder balance to zero.\\n s.balances[holder] = 0;\\n // Increment the reserve's balance.\\n s.balances[address(0)] += amount;\\n // The tokens aren't in circulation anymore - decrease total supply.\\n s.totalSupply -= amount;\\n }\\n\\n // Since the holder's account is now empty, make sure to keep track of it both\\n // in this FAST and in the marketplace.\\n s.tokenHolders.remove(holder, true);\\n MarketplaceTokenHoldersFacet(LibFast.data().marketplace).fastBalanceChanged(holder, 0);\\n\\n // Keep track of this transfer in history facet.\\n FastHistoryFacet(address(this)).transfered(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n\\n // This operation can be seen as a regular transfer between holder and reserve. Emit.\\n emit FastTransfer(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n emit Transfer(holder, address(0), amount);\\n\\n // If amount wasn't zero, total supply and reserve balance have changed - emit.\\n if (amount > 0) FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n // ERC20 implementation and transfer related methods.\\n\\n /**\\n * @notice The name of this FAST (ERC20 standard).\\n * @return string Name of the FAST.\\n */\\n function name() external view returns (string memory) {\\n return LibFastToken.data().name;\\n }\\n\\n /**\\n * @notice The symbol of this FAST (ERC20 standard).\\n * @return string Symbol of the FAST.\\n */\\n function symbol() external view returns (string memory) {\\n return LibFastToken.data().symbol;\\n }\\n\\n /**\\n * @notice The `decimals` of this FAST (ERC20 standard).\\n * @return uint256 Number of decimals the FAST has.\\n */\\n function decimals() external view returns (uint256) {\\n return LibFastToken.data().decimals;\\n }\\n\\n /**\\n * @notice The total supply of the FAST (ERC20 standard).\\n * @return uint256 Total supply of the FAST.\\n */\\n function totalSupply() external view override(IERC20) returns (uint256) {\\n return LibFastToken.data().totalSupply;\\n }\\n\\n /**\\n * @notice The balance of the passed owner (ERC20 standard).\\n * @param owner The owners address to get the balance of.\\n * @return uint256 The current balance of this owner's account.\\n */\\n function balanceOf(address owner) public view override(IERC20) returns (uint256) {\\n return LibFastToken.data().balances[owner];\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. */\\n function transfer(address to, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(\\n TransferArgs({\\n spender: msg.sender,\\n from: msg.sender,\\n to: to,\\n amount: amount,\\n ref: LibFastToken.DEFAULT_TRANSFER_REFERENCE\\n })\\n );\\n return true;\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`. */\\n function transferWithRef(address to, uint256 amount, string calldata ref) external returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: msg.sender, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view override(IERC20) returns (uint256) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // If the allowance being queried is owned by the reserve, and `spender` is\\n // an Issuer member, `spender` owns the full balance of `owner`. If they are\\n // not an Issuer member then their allowance is zero. Otherwise, the regular given\\n // allowance for `spender` over `owner` applies.\\n if (owner == address(0)) return AHasMembers(LibFast.data().issuer).isMember(spender) ? s.balances[owner] : 0;\\n else return s.allowances[owner][spender];\\n }\\n\\n /**\\n * @notice This method directly calls `performApproval`, setting its `from` paramter to the sender of\\n * the transaction.\\n * @param spender is the address to allow spending from the caller's wallet.\\n * @param amount is how much to **increase** the allowance.\\n */\\n function approve(address spender, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performApproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice This method directly calls `performDisapproval`, setting its `from` parameter to the sender of\\n * the transaction.\\n * @param spender is the address to disallow spending from the caller's wallet.\\n * @param amount is how much to **decrease** the allowance.\\n */\\n function disapprove(address spender, uint256 amount) external onlyMember(msg.sender) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performDisapproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`, the `ref` will be defaulted.\\n function transferFrom(address from, address to, uint256 amount) external override(IERC20) returns (bool) {\\n transferFromWithRef(from, to, amount, LibFastToken.DEFAULT_TRANSFER_REFERENCE);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`.\\n function transferFromWithRef(address from, address to, uint256 amount, string memory ref) public returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: from, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n // Allowances query operations.\\n\\n function givenAllowanceCount(address owner) external view returns (uint256) {\\n return LibFastToken.data().allowancesByOwner[owner].values.length;\\n }\\n\\n function paginateAllowancesByOwner(\\n address owner,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesByOwner[owner].values, index, perPage);\\n }\\n\\n function receivedAllowanceCount(address spender) external view returns (uint256) {\\n return LibFastToken.data().allowancesBySpender[spender].values.length;\\n }\\n\\n function paginateAllowancesBySpender(\\n address spender,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesBySpender[spender].values, index, perPage);\\n }\\n\\n // These functions would be internal / private if we weren't using the diamond pattern.\\n // Instead, they're `onlyDiamondFacet` - eg can only be called by facets of the current\\n // FAST.\\n\\n struct TransferArgs {\\n address spender;\\n address from;\\n address to;\\n uint256 amount;\\n string ref;\\n }\\n\\n /**\\n * @notice This is the internal method that gets called whenever a transfer is initiated. Both `transfer`,\\n * `transferWithRef`, and their variants internally call this function.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that transfers are enabled for this FAST.\\n * - Requires that `from` and `to` are different addresses.\\n * - Requires that `from` membership is active in the marketplace.\\n * - If `from` is not the reserve, requires that `from` is a valid token holder.\\n * - If `from` is the reserve, requires that the message sender is an issuer member.\\n * - Requires that `to` is a valid token holder.\\n * - Requires that the amount is a positive value.\\n * - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address,\\n * - The allowance given by the `from` address to the `spender` covers for the `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Decreases the allowance given by `from` to `spender`.\\n * - If the new allowance reaches zero,\\n * - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions.\\n * - Decreases the balance of the `owner` address.\\n * - Increases the balance of the `to` address by `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Requires that there are enough transfer credits to cover for `amount`.\\n * - Decreases the transfer credits by `amount`.\\n * - If the `to` address is the reserve,\\n * - Decreases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Else, if the `from` address is the reserve,\\n * - Increases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Calls `FastHistoryFacet.transfered`.\\n * - Emits a `Transfer(from, to, amount)` event.\\n */\\n function performTransfer(TransferArgs calldata p) external onlyDiamondFacet {\\n // TODO: Make this function return instead of raising errors.\\n\\n // Grab a pointer to our top-level storage.\\n LibFast.Data storage topData = LibFast.data();\\n\\n // Requires that transfers are enabled for this FAST.\\n if (FastTopFacet(address(this)).transfersDisabled()) revert ICustomErrors.RequiresTransfersEnabled();\\n // Requires that `from` and `to` are different addresses.\\n else if (p.from == p.to) revert ICustomErrors.RequiresDifferentSenderAndRecipient(p.from);\\n // Requires that allowance transfers from the reserve are performed by issuer members only.\\n else if (p.from == address(0) && !AHasMembers(topData.issuer).isMember(p.spender))\\n revert ICustomErrors.RequiresIssuerMembership(p.spender);\\n // Requires that the `from` address can hold tokens.\\n else if (!canHoldTokens(p.from)) revert ICustomErrors.RequiresValidTokenHolder(p.from);\\n // Requires that the `from` address marketplace membership is active if not the reserve.\\n else if (p.from != address(0) && !IHasActiveMembers(LibFast.data().marketplace).isActiveMember(p.from))\\n revert ICustomErrors.RequiresMarketplaceActiveMembership(p.from);\\n // Requires that the `to` address can hold tokens.\\n else if (!canHoldTokens(p.to)) revert ICustomErrors.RequiresValidTokenHolder(p.to);\\n\\n // For any non-zero amount, update balances and allowances, notify other contracts, etc.\\n if (p.amount != 0) {\\n // Grab a pointer to our token storage.\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n\\n // If this is an allowance transfer and if the `from` account is not the reserve...\\n if (p.spender != p.from && p.from != address(0)) {\\n // Decrease allowance.\\n uint256 newAllowance = tokenData.allowances[p.from][p.spender] -= p.amount;\\n // If the allowance reached zero, we want to remove that allowance from\\n // the various other places where we keep track of it.\\n if (newAllowance == 0) {\\n tokenData.allowancesByOwner[p.from].remove(p.spender, true);\\n tokenData.allowancesBySpender[p.spender].remove(p.from, true);\\n }\\n }\\n\\n // Keep track of the balances - `from` spends (decrease), `to` receives (increase).\\n uint256 fromBalance = (tokenData.balances[p.from] -= p.amount);\\n uint256 toBalance = (tokenData.balances[p.to] += p.amount);\\n\\n // Keep track of who has what FAST.\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.from, fromBalance);\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.to, toBalance);\\n\\n // Keep track of who holds this token.\\n balanceChanged(p.from, fromBalance);\\n balanceChanged(p.to, toBalance);\\n\\n // If the funds are going to the reserve...\\n if (p.to == address(0)) {\\n // Decrease total supply.\\n tokenData.totalSupply -= p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n // If the funds are moving from the zero address...\\n else if (p.from == address(0)) {\\n // Increase total supply.\\n tokenData.totalSupply += p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n // Keep track of the transfer in the history facet.\\n FastHistoryFacet(address(this)).transfered(p.spender, p.from, p.to, p.amount, p.ref);\\n\\n // Emit!\\n emit FastTransfer(p.spender, p.from, p.to, p.amount, p.ref);\\n emit Transfer(p.from, p.to, p.amount);\\n }\\n\\n /**\\n * @notice Increases the allowance given by `from` to `spender` by `amount`.\\n * Note that this function should run and emit even if the amount passed is zero.\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that `onlyTokenHolder` passes for the `from` address.\\n * - Requires that the `amount` is positive number.\\n * - Increases the allowance given by `from` to `spender` by `amount`.\\n * - Update the allowance lookup tables in both directions.\\n * - Emits an `Approval(from, spender, amount)`.\\n * @param from is the wallet from which to give the allowance.\\n * @param spender is the receiver of the allowance.\\n * @param amount is how much to **increase** the current allowance by.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performApproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n // Allowance cannot be given over the reserve.\\n if (from == address(0)) revert ICustomErrors.UnsupportedOperation();\\n // Require that the `from` address can hold tokens.\\n else if (!canHoldTokens(from)) revert ICustomErrors.RequiresValidTokenHolder(from);\\n\\n if (amount > 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // Note that we are not exactly following ERC20 here - we don't want to **set** the allowance to `amount`\\n // to mitigate a possible attack.\\n // See https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.gmr6zdg47087.\\n s.allowances[from][spender] += amount;\\n // Keep track of given and received allowances.\\n s.allowancesByOwner[from].add(spender, true);\\n s.allowancesBySpender[spender].add(from, true);\\n }\\n\\n // Emit!\\n emit Approval(from, spender, amount);\\n }\\n\\n /**\\n * @notice Decreases allowance given by `from` to `spender` by `amount`.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - The allowance given by `from` to `spender` is decreased by `amount`.\\n * - Whether the allowance reached zero, stop tracking it by owner and by spender.\\n * - Emit a `Disapproval(from, spender, amount)` event.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performDisapproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n if (amount != 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove allowance.\\n s.allowances[from][spender] -= amount;\\n\\n // Whenever the allowance reaches zero, stop tracking it by owner and spender.\\n if (s.allowances[from][spender] == 0) {\\n s.allowancesByOwner[from].remove(spender, true);\\n s.allowancesBySpender[spender].remove(from, true);\\n }\\n }\\n\\n // Emit!\\n emit Disapproval(from, spender, amount);\\n }\\n\\n // WARNING: This method contains two loops. We know that this should never\\n // happen in solidity. However:\\n // - In the context of our private chain, gas is cheap.\\n // - It can only be called by a governor.\\n function beforeRemovingMember(address member) external onlyDiamondFacet {\\n if (balanceOf(member) != 0) revert ICustomErrors.RequiresPositiveBalance(member);\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove all given allowances.\\n {\\n address[] storage gaData = s.allowancesByOwner[member].values;\\n while (gaData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address spender = gaData[0];\\n this.performDisapproval(member, spender, s.allowances[member][spender]);\\n }\\n }\\n\\n // Remove all received allowances.\\n {\\n address[] storage raData = s.allowancesBySpender[member].values;\\n while (raData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address owner = raData[0];\\n this.performDisapproval(owner, member, s.allowances[owner][member]);\\n }\\n }\\n }\\n\\n function holders() external view returns (address[] memory) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n return s.tokenHolders.values;\\n }\\n\\n function balanceChanged(address holder, uint256 balance) private {\\n // Return early if this is the zero address.\\n if (holder == address(0)) return;\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.tokenHolders.contains(holder))\\n s.tokenHolders.add(holder, false);\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.tokenHolders.contains(holder)) s.tokenHolders.remove(holder, false);\\n }\\n\\n // Private and helper methods.\\n\\n /**\\n * @notice Ensures that the given address is a member of the current FAST or the Zero Address.\\n *\\n * Business logic:\\n * - If the candidate is the reserve, it is a valid token holder.\\n * - If the FAST is semi-public,\\n * - We require that candidate is a member of the Marketplace contract and is active in it.\\n * - Otherwise,\\n * - Require that the candidate is a member of the FAST.\\n * @param candidate The address to check.\\n * @return A boolean set to `true` if `candidate` can hold tokens, `false` otherwise.\\n */\\n function canHoldTokens(address candidate) private view returns (bool) {\\n // Zero address can hold tokens, in any cases.\\n if (candidate == address(0)) return true;\\n // If the FAST is semi public, any member of the marketplace can hold tokens.\\n else if (FastTopFacet(address(this)).isSemiPublic()) {\\n return AHasMembers(LibFast.data().marketplace).isMember(candidate);\\n }\\n // FAST is private, only members of the fast can hold tokens.\\n else {\\n return AHasMembers(address(this)).isMember(candidate);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb0b8ce0ddc8771f8511dec440519b6266f4ec2dcb6f25087f03e81798d6463de\",\"license\":\"MIT\"},\"contracts/fast/FastTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./lib/IFastEvents.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\n\\ncontract FastTopFacet is AFastFacet {\\n // Getters and setters for global flags.\\n\\n /**\\n * @notice Get the Issuer address.\\n * @return address Address of Issuer.\\n */\\n function issuerAddress() external view returns (address) {\\n return LibFast.data().issuer;\\n }\\n\\n /**\\n * @notice Get the Marketplace address.\\n * @return address Address of Marketplace.\\n */\\n function marketplaceAddress() external view returns (address) {\\n return LibFast.data().marketplace;\\n }\\n\\n /**\\n * @notice Is this FAST a semi public FAST?\\n * @return bool Yes/no semi public.\\n */\\n function isSemiPublic() external view returns (bool) {\\n return LibFast.data().isSemiPublic;\\n }\\n\\n /**\\n * @notice Is this FAST a fixed supply FAST?\\n * @return bool Yes/no fixed supply.\\n */\\n function hasFixedSupply() external view returns (bool) {\\n return LibFast.data().hasFixedSupply;\\n }\\n\\n /**\\n * @notice Are transfers enabled across this FAST?\\n * @return boolean `true` if transfers are disabled, `false` if transfers are enabled.\\n */\\n function transfersDisabled() external view returns (bool) {\\n return LibFast.data().transfersDisabled;\\n }\\n\\n // Setters for global flags.\\n\\n /**\\n * @notice Allows to switch from a private scheme to a semi-public scheme,\\n * but not the other way around, unless the total supply is zero.\\n * @param flag Set the semi public flag to true/false.\\n */\\n function setIsSemiPublic(bool flag) external onlyIssuerMember {\\n // Someone is trying to toggle back to private?... No can do!\\n if (this.isSemiPublic() && FastTokenFacet(address(this)).totalSupply() != 0) {\\n revert ICustomErrors.UnsupportedOperation();\\n }\\n LibFast.data().isSemiPublic = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /**\\n * @notice Allows an issuer member to enable or disable all transfers within this FAST.\\n * @param flag Set the transfer capability to active or not.\\n */\\n function setTransfersDisabled(bool flag) external onlyIssuerMemberOrIssuerContract {\\n LibFast.Data storage d = LibFast.data();\\n // Only make changes and emit if the new flag is different than the old one.\\n if (d.transfersDisabled != flag) {\\n // Set flag.\\n d.transfersDisabled = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n /**\\n * @notice Retrieves the group slug to which this FAST belongs.\\n * @return string The group slug string.\\n */\\n function group() external view returns (string memory) {\\n return LibFast.data().group;\\n }\\n\\n /**\\n * @notice Assigns the FAST into a group given its slug.\\n * It should only be callable by the Issuer contract.\\n * @param newGroup is the slug for the new group for this FAST.\\n */\\n function setGroup(string calldata newGroup) external onlyIssuerContract {\\n // Set group slug.\\n LibFast.data().group = newGroup;\\n }\\n}\\n\",\"keccak256\":\"0xc92847559953aa4130a76c0ddf63d9f9e90cf26351153fa691aea503210f7c8d\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Transfer`.\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n /// @notice See `ERC20.Approval`.\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0xff980c3127905dd501245d89f5293d4ee16d0ef46cefea19f06e6915e178527c\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastCrowdfunds.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastCrowdfunds {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 2;\\n /// @notice This is keccak256('Fast.storage.Crowdfunds'):\\n bytes32 internal constant STORAGE_SLOT = 0xc843fbb8f0f5694376d391c1687b800112a6eed97820d8e7a2b82618dd1b69ed;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed crowdfund contract is held here.\\n LibAddressSet.Data crowdfundSet;\\n /// @notice The default crowdfund fee for this FAST.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3f43bc03bbdd3d7d1e2dc957e060310ba97eea02ce64ac91082cc30c9e7c82b7\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastDistributions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastDistributions {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Distributions'):\\n bytes32 internal constant STORAGE_SLOT = 0xe865e85b076245a187a9d3cc15c47264cd0b46df4afd899817bd2e16523485ad;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed distribution contract is held here.\\n LibAddressSet.Data distributionSet;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dbd277dde92dc23bd8fd81a005783e50903690b3acf4ca9e98f6dea3570426e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with token related logic.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastToken {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Token'):\\n bytes32 internal constant STORAGE_SLOT = 0xb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261;\\n\\n // Constants.\\n\\n string internal constant DEFAULT_TRANSFER_REFERENCE = \\\"Unspecified - via ERC20\\\";\\n\\n // Data structures.\\n\\n /**\\n * @notice The token data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // ERC20 related properties for this FAST Token.\\n /// @notice The name of the FAST.\\n string name;\\n /// @notice The symbol for this FAST.\\n string symbol;\\n /// @notice The decimal points used by this FAST.\\n uint8 decimals;\\n /// @notice The amount of tokens in circulation.\\n uint256 totalSupply;\\n /// @notice Legacy variable.\\n uint256 LEGACY_transferCredits;\\n /// @notice Our members balances are held here.\\n mapping(address => uint256) balances;\\n // Allowances are stored here.\\n /// @notice Allowance amounts are stored in here, via mapping of `owner.spender.amount`\\n mapping(address => mapping(address => uint256)) allowances;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by owner.\\n mapping(address => LibAddressSet.Data) allowancesByOwner;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by spender.\\n mapping(address => LibAddressSet.Data) allowancesBySpender;\\n /// @notice All of this FAST token holders.\\n LibAddressSet.Data tokenHolders;\\n }\\n\\n /**\\n * @notice Returns the token storage for the calling FAST.\\n * @return s a struct pointer for token FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf101b0347e095905f91f32ec41dcbe1dca1d8a84cc99664ca5254f21dcf3d8e9\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0x62cf23c6bccffebc753940b8f9260626f04455dd305736aee200d8d1545eb3e4\",\"license\":\"MIT\"},\"contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n/// @title A facet providing diamond cut mechanisms.\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a method with `delegatecall`.\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xf548f40da69f2c54f4e03f92dc31094f6825669314b87266cce22e0a8f1a4c47\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title ERC20 standard as defined in the EIP.\\ninterface IERC20 {\\n /**\\n * @notice Allows to query the total number of tokens in circulation.\\n * @return An `uint256` representing how many tokens are currently in circulation.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Allows to query the balance of a given address.\\n * @param account is the address for which the balance shall be queried.\\n * @return An `uint256` - the balance for the given address.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @notice Moves `amount` tokens from the caller's account to `recipient`.\\n * @param recipient is the address to which the funds should be sent to, if successful.\\n * @param amount is the amount of tokens to transfef.\\n * @return A `bool` which value is `true` when the operation was successful.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner`\\n * through `transferFrom`. This is zero by default.\\n * @dev This value changes when `approve`, `disapprove` and `transferFrom` / `transferFromWithRef` are called.\\n * @param owner is the owner of the funds.\\n * @param spender is the address for which the allowance should be queried.\\n * @return A `uint256` representing the remaining allowance of `spender` over `owner`'s funds.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @notice Increases the allowance of `spender` by `amount`.\\n * @param spender is the address towards which the allowance should be given.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Attempts to transfer `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's allowance.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x79731c983219a24087d3bb925b9dd5c3cb3c85ebfdcd45afce5826bc2d53710f\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/issuer/IssuerAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuerAccess.sol\\\";\\nimport \\\"./lib/IIssuerEvents.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\n\\ncontract IssuerAccessFacet is AIssuerFacet, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return AHasMembers(this).isMember(who);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n /// Membership management.\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor added to a FAST.\\n */\\n function governorAddedToFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].add(msg.sender, true);\\n\\n emit GovernorshipAdded(msg.sender, governor);\\n }\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor removed from a FAST.\\n */\\n function governorRemovedFromFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].remove(msg.sender, true);\\n\\n emit GovernorshipRemoved(msg.sender, governor);\\n }\\n\\n /** @notice Returns a list of FASTs that the passed address is a governor of.\\n * @param governor is the address to check governorships of.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateGovernorships(\\n address governor,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuerAccess.data().fastGovernorships[governor].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0xb8eb9a8eb626f61ecc5627b927bdd81a97f38b05e621e903f77000e63a21b37c\",\"license\":\"MIT\"},\"contracts/issuer/IssuerTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuer.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\ncontract IssuerTopFacet is AIssuerFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n // FAST management related methods.\\n\\n /**\\n * @notice Queries whether a given address is a known and registered FAST contract.\\n * @param fast The address of the contract to check.\\n * @return A boolean.\\n */\\n function isFastRegistered(address fast) external view returns (bool) {\\n return LibIssuer.data().fastSet.contains(fast);\\n }\\n\\n /**\\n * @notice Allows to retrieve the address of a FAST diamond given its symbol.\\n * @param symbol The symbol of the FAST diamond to get the address of.\\n * @return The address of the corresponding FAST diamond, or the Zero Address if not found.\\n */\\n function fastBySymbol(string calldata symbol) external view returns (address) {\\n return LibIssuer.data().fastSymbols[symbol];\\n }\\n\\n /**\\n * @notice Allows the registration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be registered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastRegistered` event.\\n */\\n function registerFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n if (s.fastSymbols[symbol] != address(0)) {\\n revert ICustomErrors.DuplicateEntry();\\n }\\n\\n // Add the FAST to our list.\\n s.fastSet.add(fast, false);\\n // Add the fast symbol to our list.\\n s.fastSymbols[symbol] = fast;\\n\\n // Emit!\\n emit FastRegistered(fast);\\n }\\n\\n /**\\n * @notice Allows the unregistration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be unregistered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastUnregistered` event.\\n */\\n function unregisterFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n\\n // Disable transfers in the FAST.\\n FastTopFacet(fast).setTransfersDisabled(true);\\n\\n // Remove the FAST from our lists.\\n s.fastSet.remove(fast, false);\\n delete s.fastSymbols[symbol];\\n\\n // Emit!\\n emit FastUnregistered(fast);\\n }\\n\\n /**\\n * @notice Counts the number of FAST diamonds registered with this Issuer.\\n * @return The number of FAST diamonds registered with this Issuer.\\n */\\n function fastCount() external view returns (uint256) {\\n return LibIssuer.data().fastSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a starting cursor and a number of records per page.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFasts(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to move collected ERC20 fees from this contract\\n * to an arbitrary address.\\n * @param token is the address of the ERC20 to be collected.\\n * @param amount is how much should be moved from the ERC20 to the collection address.\\n * @param to is the collection address - eg the address that will receive the ERC20 tokens.\\n */\\n function transferERC20Tokens(IERC20 token, uint256 amount, address to) public onlyMember(msg.sender) {\\n require(token.transfer(to, amount));\\n }\\n\\n /**\\n * @notice Allows to assign FASTs to groups.\\n * @param fast The FAST address to assign.\\n * @param newGroup The name of the group in which the FAST should be placed.\\n */\\n function setFastGroup(address fast, string calldata newGroup) external onlyMember(msg.sender) {\\n string memory oldGroup = FastTopFacet(fast).group();\\n // Remove FAST from old group.\\n if (bytes(oldGroup).length > 0) LibIssuer.data().fastGroups[oldGroup].remove(fast, false);\\n // Add FAST to new group.\\n if (bytes(newGroup).length > 0) LibIssuer.data().fastGroups[newGroup].add(fast, false);\\n // Set group name at FAST level.\\n FastTopFacet(fast).setGroup(newGroup);\\n // Emit!\\n emit FastGroupChanged(fast, oldGroup, newGroup);\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a group, starting cursor and a number of records per page.\\n * @param group The group to paginate.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFastsInGroup(\\n string calldata group,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastGroups[group].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0x99cd1b99fcbba93ea96e34d70b6a51cc50ebf6b2af22dab69d529a15ab2e7700\",\"license\":\"MIT\"},\"contracts/issuer/lib/AIssuerFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./IIssuerEvents.sol\\\";\\n\\n/**\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AIssuerFacet is IIssuerEvents {\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresIssuerMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x4ab53f3e2ce4e78f13c93f46c10c581c0b5ebc520979191d6092d2d7f7aa733c\",\"license\":\"MIT\"},\"contracts/issuer/lib/IIssuerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// WARNING: These events must be maintained 1:1 with LibIssuerEvents!\\n// They also should never be emitted directly, they only help us defining\\n// typescript types!\\ninterface IIssuerEvents {\\n /// FAST registration events.\\n\\n /**\\n * @notice Emited when a new FAST is registered.\\n * @param fast The address of the newly registered FAST diamond.\\n */\\n event FastRegistered(address indexed fast);\\n /**\\n * @notice Emited when a FAST is removed from the Issuer contract.\\n * @param fast The address of the unregistered FAST.\\n */\\n event FastUnregistered(address indexed fast);\\n\\n /// FAST groupping events.\\n\\n event FastGroupChanged(address indexed fast, string indexed oldGroup, string indexed newGroup);\\n\\n /// Governors.\\n\\n event GovernorshipRemoved(address indexed fast, address indexed governor);\\n event GovernorshipAdded(address indexed fast, address indexed governor);\\n}\\n\",\"keccak256\":\"0x7ab2611cedeaf69aba2461e083ce436cde93f53e0ebf7ae882bf1800a839f543\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuer {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xd681d5f1de7bc4b7442c088939dc202585e09699e92a94c9717ace8d0f4fcaa5;\\n\\n // Data structures.\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // This is where we keep our list of deployed fast FASTs.\\n LibAddressSet.Data fastSet;\\n // We keep track of the FAST symbols that were already used - string to FAST address.\\n mapping(string => address) fastSymbols;\\n // We also keep track of the FAST groups here - slug to FAST address set.\\n mapping(string => LibAddressSet.Data) fastGroups;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x82972d98e290aa68b6fa14dee5e9f3e0ca3d80604e96435ea437e9f92891f7e9\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuerAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuerAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0x3ceaa4d5edf9c96fbd56140abe6389d65a87143d4f11819874ff2fe0ae9574db;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // For a given address we store list of FASTs where that address is a governor.\\n mapping(address => LibAddressSet.Data) fastGovernorships;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x225043d709577f7c580aa46637ef2910336dc0ef75a508a1252484fa45558fca\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x0e12d54c3afccb656312e8bc7c31d16feb3718a421d2ea732024f608ccb6aab4\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"./lib/LibMarketplaceAccess.sol\\\";\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./MarketplaceAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Access facet is in charge of keeping track of marketplace members.\\n */\\ncontract MarketplaceAccessFacet is AMarketplaceFacet, AHasMembers, IHasActiveMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return _isIssuerMember(who) || AHasAutomatons(address(this)).automatonCan(who, MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n function onMemberRemoved(address member) internal view override(AHasMembers) {\\n LibMarketplaceAccess.Data storage s = LibMarketplaceAccess.data();\\n // Ensure that member doesn't have any FAST membership.\\n if (s.fastMemberships[member].values.length != 0) revert ICustomErrors.RequiresNoFastMemberships(member);\\n }\\n\\n /// FAST memberships functions.\\n\\n /**\\n * @notice Allows to query FAST memberships for a given member address.\\n * @param member Is the address to check.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n */\\n function fastMemberships(\\n address member,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibMarketplaceAccess.data().fastMemberships[member].values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a new FAST membership has been added.\\n */\\n function memberAddedToFast(address member) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the member's FAST membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].add(msg.sender, true);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a FAST membership has been removed.\\n */\\n function memberRemovedFromFast(address member) external {\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].remove(msg.sender, true);\\n }\\n\\n /// IHasActiveMembers implementation.\\n\\n /**\\n * @notice Given a member returns it's activation status.\\n * @param candidate The address to check activation status on.\\n */\\n function isActiveMember(address candidate) external view override(IHasActiveMembers) returns (bool) {\\n return AHasMembers(this).isMember(candidate) && !LibMarketplaceAccess.data().deactivatedMemberSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Activates a member at the Marketplace level.\\n * @param member The member to remove from the deactivation member set.\\n */\\n function activateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to activate an already active member.\\n if (this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceDeactivatedMember(member);\\n // Remove the member from the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.remove(member, false);\\n // Emit!\\n emit MemberActivated(member);\\n }\\n\\n /**\\n * @notice Deactivates a member at the Marketplace level.\\n * @param member The member to add to the deactivation member set.\\n */\\n function deactivateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to deactivate an already deactivated member.\\n if (!this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceActiveMembership(member);\\n // Add the member to the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.add(member, false);\\n // Emit!\\n emit MemberDeactivated(member);\\n }\\n}\\n\",\"keccak256\":\"0x87d6a82598a03377f78f625bee234bef4c62066dff99ae89484c8fb5f7f6b8a2\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS = 1;\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract MarketplaceAutomatonsFacet is AMarketplaceFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0xa2a142702268b2d33ddd7703c23f36274161cb2b9b707369e703ebbfa2f5a53c\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceTokenHoldersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./lib/LibMarketplaceTokenHolders.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/** @dev The Marketplace FAST balances facet.\\n */\\ncontract MarketplaceTokenHoldersFacet is AMarketplaceFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /** @dev The callback used when a balance changes on a FAST.\\n */\\n function fastBalanceChanged(address account, uint256 balance) external {\\n // Return early if this is the zero address.\\n if (account == address(0)) {\\n return;\\n }\\n\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n\\n // Get the storage pointer and balance of the token holder.\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.fastHoldings[account].contains(msg.sender)) {\\n s.fastHoldings[account].add(msg.sender, false);\\n }\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.fastHoldings[account].contains(msg.sender)) {\\n s.fastHoldings[account].remove(msg.sender, false);\\n }\\n }\\n\\n /** @dev A way to get a list of FASTs for an account.\\n * @return list of FAST addresses.\\n */\\n function holdings(address account) external view returns (address[] memory) {\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n return s.fastHoldings[account].values;\\n }\\n}\\n\",\"keccak256\":\"0x1ebb1ceb92cab41edadcff833ca641a3883329b23ccf602ffb4b464f08ffc918\",\"license\":\"MIT\"},\"contracts/marketplace/lib/AMarketplaceFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibMarketplace.sol\\\";\\nimport \\\"./IMarketplaceEvents.sol\\\";\\n\\n/**\\n * @notice This contract is a group of modifiers that can be used by any Marketplace facets to guard against\\n * certain permissions.\\n */\\nabstract contract AMarketplaceFacet is IMarketplaceEvents {\\n /// Internal ACL functions.\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibMarketplace.data().issuer).isMember(who);\\n }\\n\\n // Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() virtual {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Requires that the message sender is a member of the linked Issuer.\\n */\\n modifier onlyIssuerMember() virtual {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n /**\\n * @notice Requires that the given address is a member of the marketplace.\\n * @param who is the address to be checked.\\n */\\n modifier onlyMember(address who) virtual {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xb9569fef0cef86a40828714a131f6dafb98ae4cd21ff44e710f8e57413bd6ffb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/IMarketplaceEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface IMarketplaceEvents {\\n /// @dev See `IHasActiveMembers`.\\n event MemberActivated(address indexed member);\\n /// @dev See `IHasActiveMembers`.\\n event MemberDeactivated(address indexed member);\\n /// @dev Emitted when a FAST deployment is requested.\\n event FastDeploymentRequested(uint256 indexed index);\\n}\\n\",\"keccak256\":\"0xeb89df40f51b42b444f698f8d13cf4318396f9393d7fab049c131e2f6bd45b4d\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplace {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xb59ec141376cee83f618e10e881bbb4789cdeee27e0d441a8c37ead3cb8b93c1;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba63d4c8f5878ca351ca9fb34f5bc1937dd4a90efaccbc739948eaa3cbf4e526\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0xecb992c7a1185ca18ac50bc1672192fb67e7c3e74465887a8fcaab265dab37bd;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we keep track of our member FAST memberships.\\n mapping(address => LibAddressSet.Data) fastMemberships;\\n /// @notice This is where we keep track of our deactivated memberships.\\n LibAddressSet.Data deactivatedMemberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac8cc51395e6e5b357b72f0cb3b4b681b5cbe0e0338692fde4d1087bc98b03eb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceTokenHolders.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceTokenHolders {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.TokenHolders.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xecf50453542504034bd40d376fb1408ada3025f2fe86ca1b9b4b1440b8d4a2f4;\\n\\n struct Data {\\n /// @dev The latest intializer version that was called.\\n uint16 version;\\n /// @dev The tracked FAST holdings of a user.\\n mapping(address => LibAddressSet.Data) fastHoldings;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa6edcacafdaaac79b202288095948b7b3bee0e01f7d4b4efb8eee3425f9a8c04\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50611522806100206000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063a230c52411610081578063e43581b81161005b578063e43581b8146101ad578063e8c9fd45146101c0578063eecdac88146101c857600080fd5b8063a230c52414610164578063c6549ba414610187578063ca6d56dc1461019a57600080fd5b80633c4a25d0116100b25780633c4a25d0146100fe5780635a4c75d5146101115780639fef0c011461013257600080fd5b80630b1ca49a146100ce57806311aee380146100e3575b600080fd5b6100e16100dc366004611329565b6101db565b005b6100eb6102b8565b6040519081526020015b60405180910390f35b6100e161010c366004611329565b6102e5565b61012461011f36600461135f565b610416565b6040516100f5929190611381565b610145610140366004611329565b610454565b60408051825115158152602092830151151592810192909252016100f5565b610177610172366004611329565b61059f565b60405190151581526020016100f5565b61012461019536600461135f565b6105d6565b6100e16101a8366004611329565b610603565b6101776101bb366004611329565b61072e565b6100eb61075a565b6100e16101d6366004611329565b610782565b336101e581610854565b610238576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b6102418261099f565b6102738260007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b6001019190610b2f565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f6e76fb4c77256006d9c38ec7d82b45a8c8f3c27b1d6766fffc42dfb8de68449290600090a25050565b60007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b60020154919050565b336102ef81610d07565b61033d576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b8161034781610d12565b610395576040517f6170384e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b6103c78360007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6001019190610d1d565b6103d083610e11565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fdc5a48d79e2e147530ff63ecdbed5a5a66adb9d5cf339384d5d076da197c40b590600090a2505050565b606060006104497fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6002018585610fa1565b915091509250929050565b604080518082018252600080825260208201528151808301928390527fe43581b80000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff8316604483015290803063e43581b860648301602060405180830381865afa1580156104d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fd91906113df565b151581526040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602090910190309063a230c52490602401602060405180830381865afa158015610571573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059591906113df565b1515905292915050565b60006105d0827fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b600101906110c2565b92915050565b606060006104497fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb9161043f565b3361060d81610854565b61065b576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b8161066581610d12565b6106b3576040517f06a0278c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b6106df8360007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb916103bd565b6106e88361113e565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fb251eb052afc73ffd02ffe85ad79990a8b3fed60d76dbc2fa2fdd7123dffd91490600090a2505050565b60006105d0827fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756105c7565b60007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756102dc565b3361078c81610d07565b6107da576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b6107e3826111b5565b61080f8260007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975610269565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f1ebe834e73d60a5fec822c1e1727d34bc79f2ad977ed504581cc1822fe20fb5b90600090a25050565b60003073ffffffffffffffffffffffffffffffffffffffff8316148061090357506040517fe43581b800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063e43581b890602401602060405180830381865afa1580156108df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090391906113df565b806105d057506040517f617b0b9d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260016024820152309063617b0b9d906044015b602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d091906113df565b6040517f5d7b590f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201523090635d7b590f90602401600060405180830381600087803b158015610a0657600080fd5b505af1158015610a1a573d6000803e3d6000fd5b50505050610a457f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590565b600101546040517f1b09a28100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015290911690631b09a281906024015b600060405180830381600087803b158015610ab457600080fd5b505af1158015610ac8573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b1457600080fd5b505af1158015610b28573d6000803e3d6000fd5b5050505050565b6000610b3b84846110c2565b9050818015610b48575080155b15610b535750505050565b80610bba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e20736574000000604482015260640161022f565b60018085018054600092610bcd91611430565b81548110610bdd57610bdd611447565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110610c3957610c39611447565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480610ca757610ca7611476565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b60006105d082611233565b60006105d0826112b1565b6000610d2984846110c2565b9050818015610d355750805b15610d405750505050565b8015610da8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e2073657400000000000000000000604482015260640161022f565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063a230c52490602401602060405180830381865afa158015610e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9f91906113df565b610f23576040517fca6d56dc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063ca6d56dc90602401600060405180830381600087803b158015610f0a57600080fd5b505af1158015610f1e573d6000803e3d6000fd5b505050505b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f1543455e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526201000090920490911690631543455e90602401610a9a565b6060600080848680549050610fb69190611430565b8411610fc25783610fcf565b8554610fcf908690611430565b905060008167ffffffffffffffff811115610fec57610fec6114a5565b604051908082528060200260200182016040528015611015578160200160208202803683370190505b50905060005b828110156110a8578761102e82896114d4565b8154811061103e5761103e611447565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061107b5761107b611447565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260010161101b565b50806110b483886114d4565b935093505050935093915050565b6001820154600090156111345773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061110c5761110c611447565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614611137565b60005b9392505050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517faf827ff700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063af827ff790602401610a9a565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f15190dcd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015262010000909204909116906315190dcd90602401610a9a565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c5249060240161095e565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092169063a230c5249060240161095e565b60006020828403121561133b57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461113757600080fd5b6000806040838503121561137257600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b828110156113d057815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161139e565b50505092019290925292915050565b6000602082840312156113f157600080fd5b8151801515811461113757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561144257611442611401565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082198211156114e7576114e7611401565b50019056fea2646970667358221220a1b934706aba28e070bcd134b58695f68b6ddfe1dc2fb94a3278ea256060f65d64736f6c634300080a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063a230c52411610081578063e43581b81161005b578063e43581b8146101ad578063e8c9fd45146101c0578063eecdac88146101c857600080fd5b8063a230c52414610164578063c6549ba414610187578063ca6d56dc1461019a57600080fd5b80633c4a25d0116100b25780633c4a25d0146100fe5780635a4c75d5146101115780639fef0c011461013257600080fd5b80630b1ca49a146100ce57806311aee380146100e3575b600080fd5b6100e16100dc366004611329565b6101db565b005b6100eb6102b8565b6040519081526020015b60405180910390f35b6100e161010c366004611329565b6102e5565b61012461011f36600461135f565b610416565b6040516100f5929190611381565b610145610140366004611329565b610454565b60408051825115158152602092830151151592810192909252016100f5565b610177610172366004611329565b61059f565b60405190151581526020016100f5565b61012461019536600461135f565b6105d6565b6100e16101a8366004611329565b610603565b6101776101bb366004611329565b61072e565b6100eb61075a565b6100e16101d6366004611329565b610782565b336101e581610854565b610238576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b6102418261099f565b6102738260007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b6001019190610b2f565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f6e76fb4c77256006d9c38ec7d82b45a8c8f3c27b1d6766fffc42dfb8de68449290600090a25050565b60007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b60020154919050565b336102ef81610d07565b61033d576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b8161034781610d12565b610395576040517f6170384e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b6103c78360007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6001019190610d1d565b6103d083610e11565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fdc5a48d79e2e147530ff63ecdbed5a5a66adb9d5cf339384d5d076da197c40b590600090a2505050565b606060006104497fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6002018585610fa1565b915091509250929050565b604080518082018252600080825260208201528151808301928390527fe43581b80000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff8316604483015290803063e43581b860648301602060405180830381865afa1580156104d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fd91906113df565b151581526040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602090910190309063a230c52490602401602060405180830381865afa158015610571573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059591906113df565b1515905292915050565b60006105d0827fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b600101906110c2565b92915050565b606060006104497fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb9161043f565b3361060d81610854565b61065b576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b8161066581610d12565b6106b3576040517f06a0278c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b6106df8360007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb916103bd565b6106e88361113e565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fb251eb052afc73ffd02ffe85ad79990a8b3fed60d76dbc2fa2fdd7123dffd91490600090a2505050565b60006105d0827fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756105c7565b60007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756102dc565b3361078c81610d07565b6107da576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161022f565b6107e3826111b5565b61080f8260007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975610269565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f1ebe834e73d60a5fec822c1e1727d34bc79f2ad977ed504581cc1822fe20fb5b90600090a25050565b60003073ffffffffffffffffffffffffffffffffffffffff8316148061090357506040517fe43581b800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063e43581b890602401602060405180830381865afa1580156108df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090391906113df565b806105d057506040517f617b0b9d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260016024820152309063617b0b9d906044015b602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d091906113df565b6040517f5d7b590f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201523090635d7b590f90602401600060405180830381600087803b158015610a0657600080fd5b505af1158015610a1a573d6000803e3d6000fd5b50505050610a457f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590565b600101546040517f1b09a28100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015290911690631b09a281906024015b600060405180830381600087803b158015610ab457600080fd5b505af1158015610ac8573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b1457600080fd5b505af1158015610b28573d6000803e3d6000fd5b5050505050565b6000610b3b84846110c2565b9050818015610b48575080155b15610b535750505050565b80610bba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e20736574000000604482015260640161022f565b60018085018054600092610bcd91611430565b81548110610bdd57610bdd611447565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110610c3957610c39611447565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480610ca757610ca7611476565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b60006105d082611233565b60006105d0826112b1565b6000610d2984846110c2565b9050818015610d355750805b15610d405750505050565b8015610da8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e2073657400000000000000000000604482015260640161022f565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063a230c52490602401602060405180830381865afa158015610e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9f91906113df565b610f23576040517fca6d56dc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063ca6d56dc90602401600060405180830381600087803b158015610f0a57600080fd5b505af1158015610f1e573d6000803e3d6000fd5b505050505b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f1543455e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526201000090920490911690631543455e90602401610a9a565b6060600080848680549050610fb69190611430565b8411610fc25783610fcf565b8554610fcf908690611430565b905060008167ffffffffffffffff811115610fec57610fec6114a5565b604051908082528060200260200182016040528015611015578160200160208202803683370190505b50905060005b828110156110a8578761102e82896114d4565b8154811061103e5761103e611447565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061107b5761107b611447565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260010161101b565b50806110b483886114d4565b935093505050935093915050565b6001820154600090156111345773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061110c5761110c611447565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614611137565b60005b9392505050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517faf827ff700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063af827ff790602401610a9a565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f15190dcd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015262010000909204909116906315190dcd90602401610a9a565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c5249060240161095e565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092169063a230c5249060240161095e565b60006020828403121561133b57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461113757600080fd5b6000806040838503121561137257600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b828110156113d057815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161139e565b50505092019290925292915050565b6000602082840312156113f157600080fd5b8151801515811461113757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561144257611442611401565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082198211156114e7576114e7611401565b50019056fea2646970667358221220a1b934706aba28e070bcd134b58695f68b6ddfe1dc2fb94a3278ea256060f65d64736f6c634300080a0033", + "numDeployments": 24, + "solcInputHash": "86d80cd7711949cd078774435b1d68c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresGovernorsManager\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresMembersManager\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresValidGovernor\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresValidMember\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"GovernorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"GovernorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"MemberAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"MemberRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"addGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"addMember\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"flags\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isGovernor\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isMember\",\"type\":\"bool\"}],\"internalType\":\"struct FastAccessFacet.Flags\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isMember\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"memberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateMembers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"removeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"removeMember\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addGovernor(address)\":{\"params\":{\"who\":\"is the address to be added.\"}},\"addMember(address)\":{\"params\":{\"who\":\"is the address to be added.\"}},\"flags(address)\":{\"params\":{\"a\":\"is the address to retrieve flags for.\"},\"returns\":{\"_0\":\"A `Flags` struct.\"}},\"governorCount()\":{\"returns\":{\"_0\":\"An `uint256`.\"}},\"isGovernor(address)\":{\"params\":{\"who\":\"is the address to test.\"},\"returns\":{\"_0\":\"A `bool` equal to `true` when `candidate` is a governor.\"}},\"isMember(address)\":{\"params\":{\"who\":\"is the address to test.\"},\"returns\":{\"_0\":\"A `bool` equal to `true` when `candidate` is a member.\"}},\"memberCount()\":{\"returns\":{\"_0\":\"An `uint256`.\"}},\"paginateGovernors(uint256,uint256)\":{\"params\":{\"index\":\"is the offset at which the pagination operation should start.\",\"perPage\":\"is how many items should be returned.\"},\"returns\":{\"_0\":\"A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\"}},\"paginateMembers(uint256,uint256)\":{\"params\":{\"index\":\"is the offset at which the pagination operation should start.\",\"perPage\":\"is how many items should be returned.\"},\"returns\":{\"_0\":\"A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\"}},\"removeGovernor(address)\":{\"params\":{\"governor\":\"The address of the governor to be removed.\"}},\"removeMember(address)\":{\"params\":{\"member\":\"The address of the member to be removed.\"}}},\"title\":\"The Fast Smart Contract.\",\"version\":1},\"userdoc\":{\"errors\":{\"RequiresGovernorsManager(address)\":[{\"notice\":\"Happens when a function is called by an address that is not a governors manager.\"}],\"RequiresMembersManager(address)\":[{\"notice\":\"Happens when a function is called by an address that is not a members manager.\"}],\"RequiresValidGovernor(address)\":[{\"notice\":\"Happens when an address is used as a governor but is not valid.\"}],\"RequiresValidMember(address)\":[{\"notice\":\"Happens when an address is used as a member but is not valid.\"}]},\"events\":{\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"GovernorAdded(address)\":{\"notice\":\"Emited when a governor is added to the implementing contract.\"},\"GovernorRemoved(address)\":{\"notice\":\"Emited when a governor is removed to the implementing contract.\"},\"MemberAdded(address)\":{\"notice\":\"Emited when a member is added to the implementing contract.\"},\"MemberRemoved(address)\":{\"notice\":\"Emited when a member is removed to the implementing contract.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"}},\"kind\":\"user\",\"methods\":{\"addGovernor(address)\":{\"notice\":\"Adds a governor to the list of known governors.\"},\"addMember(address)\":{\"notice\":\"Adds a member to the list of known members.\"},\"flags(address)\":{\"notice\":\"Retrieves flags for a given address.\"},\"governorCount()\":{\"notice\":\"Queries the number of governors.\"},\"isGovernor(address)\":{\"notice\":\"Queries whether a given address is a governor or not.\"},\"isMember(address)\":{\"notice\":\"Queries whether a given address is a member or not.\"},\"memberCount()\":{\"notice\":\"Queries the number of members.\"},\"paginateGovernors(uint256,uint256)\":{\"notice\":\"Queries pages of governors based on a start index and a page size.\"},\"paginateMembers(uint256,uint256)\":{\"notice\":\"Queries pages of members based on a start index and a page size.\"},\"removeGovernor(address)\":{\"notice\":\"Removes a governor from this contract.Requires that the caller is a governor of this Issuer.Emits a `AHasGovernors.GovernorRemoved` event.\"},\"removeMember(address)\":{\"notice\":\"Removes a member from this contract.Requires that the caller is a member of this Issuer.Emits a `AHasMembers.MemberRemoved` event.\"}},\"notice\":\"The FAST Access facet is the source of truth when it comes to permissioning and ACLs within a given FAST.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastAccessFacet.sol\":\"FastAccessFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@opengsn/contracts/src/forwarder/IForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"@openzeppelin/contracts/interfaces/IERC165.sol\\\";\\n\\n/**\\n * @title The Forwarder Interface\\n * @notice The contracts implementing this interface take a role of authorization, authentication and replay protection\\n * for contracts that choose to trust a `Forwarder`, instead of relying on a mechanism built into the Ethereum protocol.\\n *\\n * @notice if the `Forwarder` contract decides that an incoming `ForwardRequest` is valid, it must append 20 bytes that\\n * represent the caller to the `data` field of the request and send this new data to the target address (the `to` field)\\n *\\n * :warning: **Warning** :warning: The Forwarder can have a full control over a `Recipient` contract.\\n * Any vulnerability in a `Forwarder` implementation can make all of its `Recipient` contracts susceptible!\\n * Recipient contracts should only trust forwarders that passed through security audit,\\n * otherwise they are susceptible to identity theft.\\n */\\ninterface IForwarder is IERC165 {\\n\\n /**\\n * @notice A representation of a request for a `Forwarder` to send `data` on behalf of a `from` to a target (`to`).\\n */\\n struct ForwardRequest {\\n address from;\\n address to;\\n uint256 value;\\n uint256 gas;\\n uint256 nonce;\\n bytes data;\\n uint256 validUntilTime;\\n }\\n\\n event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue);\\n\\n event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr);\\n\\n /**\\n * @param from The address of a sender.\\n * @return The nonce for this address.\\n */\\n function getNonce(address from)\\n external view\\n returns(uint256);\\n\\n /**\\n * @notice Verify the transaction is valid and can be executed.\\n * Implementations must validate the signature and the nonce of the request are correct.\\n * Does not revert and returns successfully if the input is valid.\\n * Reverts if any validation has failed. For instance, if either signature or nonce are incorrect.\\n * Reverts if `domainSeparator` or `requestTypeHash` are not registered as well.\\n */\\n function verify(\\n ForwardRequest calldata forwardRequest,\\n bytes32 domainSeparator,\\n bytes32 requestTypeHash,\\n bytes calldata suffixData,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * @notice Executes a transaction specified by the `ForwardRequest`.\\n * The transaction is first verified and then executed.\\n * The success flag and returned bytes array of the `CALL` are returned as-is.\\n *\\n * This method would revert only in case of a verification error.\\n *\\n * All the target errors are reported using the returned success flag and returned bytes array.\\n *\\n * @param forwardRequest All requested transaction parameters.\\n * @param domainSeparator The domain used when signing this request.\\n * @param requestTypeHash The request type used when signing this request.\\n * @param suffixData The ABI-encoded extension data for the current `RequestType` used when signing this request.\\n * @param signature The client signature to be validated.\\n *\\n * @return success The success flag of the underlying `CALL` to the target address.\\n * @return ret The byte array returned by the underlying `CALL` to the target address.\\n */\\n function execute(\\n ForwardRequest calldata forwardRequest,\\n bytes32 domainSeparator,\\n bytes32 requestTypeHash,\\n bytes calldata suffixData,\\n bytes calldata signature\\n )\\n external payable\\n returns (bool success, bytes memory ret);\\n\\n /**\\n * @notice Register a new Request typehash.\\n *\\n * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712.\\n *\\n * @param typeName The name of the request type.\\n * @param typeSuffix Any extra data after the generic params. Must contain add at least one param.\\n * The generic ForwardRequest type is always registered by the constructor.\\n */\\n function registerRequestType(string calldata typeName, string calldata typeSuffix) external;\\n\\n /**\\n * @notice Register a new domain separator.\\n *\\n * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712.\\n *\\n * @notice The domain separator must have the following fields: `name`, `version`, `chainId`, `verifyingContract`.\\n * The `chainId` is the current network's `chainId`, and the `verifyingContract` is this Forwarder's address.\\n * This method accepts the domain name and version to create and register the domain separator value.\\n * @param name The domain's display name.\\n * @param version The domain/protocol version.\\n */\\n function registerDomainSeparator(string calldata name, string calldata version) external;\\n}\\n\",\"keccak256\":\"0x28669953bd3dcc98a5f959fa3cac97444584b6fbe59341681b9a59f11a83b171\",\"license\":\"GPL-3.0-only\"},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0xd04b0f06e0666f29cf7cccc82894de541e19bb30a765b107b1e40bb7fe5f7d7a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x32b378bdd83c63676854bbc408fbeea2471ba3821c888ec8703a963cbf5b4030\",\"license\":\"MIT\"},\"contracts/common/AHasContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// import \\\"hardhat/console.sol\\\";\\n\\n/**\\n * @title The Context behaviour abstract contract.\\n * @notice The AHasContext abstract contract is in charge of adding the required\\n * base implementation of ERC-2771 - see: https://eips.ethereum.org/EIPS/eip-2771\\n * the key difference is that `isTrustedForwarder` becomes an internal method.\\n */\\nabstract contract AHasContext {\\n /// @dev Must be implemented by the inheriting contract.\\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool);\\n\\n // The following is copied from:\\n // https://github.com/opengsn/gsn/blob/v3.0.0-beta.10/packages/contracts/src/ERC2771Recipient.sol\\n // With a slight change to call `_isTrustedForwarder` instead of `isTrustedForwarder`.\\n\\n /// @notice Default implemention.\\n function _msgSender() internal view virtual returns (address ret) {\\n // console.log(\\\"msg.sender\\\", msg.sender);\\n // console.log(\\\"msg.data\\\", msg.data);\\n if (msg.data.length >= 20 && _isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n // console.log(\\\"ret \\\", ret);\\n return ret;\\n }\\n\\n /// @notice Default implemention.\\n function _msgData() internal view virtual returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && _isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length - 20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7d7e74084b45b6230202e359843f9c0e7797308f3d0ddfce5cd4a5a8003853a\",\"license\":\"MIT\"},\"contracts/common/AHasForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/LibHasForwarder.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IERC165.sol\\\"; // Interface Support.\\n\\nimport \\\"@opengsn/contracts/src/forwarder/IForwarder.sol\\\";\\n\\n/**\\n * @title The Forwarder behaviour abstract contract.\\n * @notice The AHasForwarder abstract contract is in charge of adding the Forwarder\\n * functionality to any contract inheriting from it.\\n */\\nabstract contract AHasForwarder {\\n /// Errors.\\n\\n /**\\n * @notice Happens when a function is called by a non forwarder manager.\\n * @param who is the address that called the function.\\n */\\n error RequiresForwarderManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a forwarder is set on an implementing contract.\\n * @param forwarderAddress is the address of the trusted forwarder.\\n */\\n event ForwarderChanged(address forwarderAddress);\\n\\n // SEE: https://github.com/opengsn/gsn/blob/v3.0.0-beta.10/packages/contracts/src/ERC2771Recipient.sol\\n\\n /**\\n * @notice ERC2771Recipient implementation.\\n * @param _forwarderAddress the forwarder address.\\n * @return bool if the forwarder is trusted.\\n */\\n function isTrustedForwarder(address _forwarderAddress) public view returns (bool) {\\n return _forwarderAddress == LibHasForwarder.data().forwarderAddress;\\n }\\n\\n /**\\n * @notice ERC2771Recipient implementation.\\n * @param _forwarderAddress the forwarder address.\\n */\\n function setTrustedForwarder(address _forwarderAddress) external onlyForwarderManager {\\n if (!IERC165(_forwarderAddress).supportsInterface(type(IForwarder).interfaceId))\\n revert ICustomErrors.InterfaceNotSupported(\\\"IForwarder\\\");\\n\\n LibHasForwarder.Data storage ds = LibHasForwarder.data();\\n ds.forwarderAddress = _forwarderAddress;\\n\\n emit ForwarderChanged(_forwarderAddress);\\n }\\n\\n /**\\n * WARNING: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder.\\n * @notice Method is not a required method to allow Recipients to trust multiple Forwarders. Not recommended yet.\\n * @return forwarderAddress The address of the Forwarder contract that is being used.\\n */\\n function getTrustedForwarder() public view virtual returns (address forwarderAddress) {\\n return LibHasForwarder.data().forwarderAddress;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a forwarder manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidForwarderManager(address who) internal view virtual returns (bool);\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the forwarder manager.\\n modifier onlyForwarderManager() virtual {\\n if (!isValidForwarderManager(msg.sender)) revert RequiresForwarderManager(msg.sender);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x96bdf4d90ba871d0b6cdc3c4217d02b41e0ef9f71d8fb5579d382cbe75dc71aa\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasGovernors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Default implementation - points to `_msgSender()`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(_msgSender()) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(_msgSender()) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xd1f8fc31da0062248ab8f238b67e499ee0004232415aceaa8f4f4600fee16706\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasMembers.sol\\\";\\n\\n/**\\n * @title The Members behaviour abstract contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Default implementation - points to `msg.sender`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(_msgSender()) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(_msgSender()) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x92011882d076ba62aac90c181c8f374566ca5c683441570a7239fd89851e97ff\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibHasForwarder {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasForwarder.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xa9930c2ffa1b605b0243ba36b3020146bcba5a29c05a711f5ca7c705a8e851ca;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we store the trusted forwarder address.\\n address forwarderAddress;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41d08f6cc69c5133d4b853803fab0c4b05f1f0d7c31331c4aa5b590b8dac0c9b\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"../marketplace/MarketplaceAccessFacet.sol\\\";\\nimport \\\"../issuer/IssuerAccessFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The FAST Access facet is the source of truth when it comes to\\n * permissioning and ACLs within a given FAST.\\n */\\ncontract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers, AHasContext {\\n using LibAddressSet for LibAddressSet.Data;\\n /// Structs.\\n\\n /**\\n * @notice This structure isn't used anywhere in storage. Instead, it\\n * allows various methods of the contract to return all the flags\\n * associated with a given address in one go.\\n */\\n struct Flags {\\n /// @notice Whether or not the item in scope is considered a governor of this FAST.\\n bool isGovernor;\\n /// @notice Whether or not the item in scope is considered a member of this FAST.\\n bool isMember;\\n }\\n\\n /// AHasContext implementation.\\n\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n // Override base classes to use the AHasContext implementation.\\n function _msgSender() internal view override(AHasMembers, AHasGovernors, AHasContext) returns (address) {\\n return AHasContext._msgSender();\\n }\\n\\n /// AHasGovernors implementation.\\n\\n function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n\\n function isValidGovernor(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onGovernorAdded(address governor) internal override(AHasGovernors) {\\n // If the governor isn't a FAST member yet, add them.\\n if (!AHasMembers(this).isMember(governor)) AHasMembers(this).addMember(governor);\\n // Notify issuer that this governor was added to this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorAddedToFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onGovernorRemoved(address governor) internal override(AHasGovernors) {\\n // Notify issuer that this governor was removed from this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorRemovedFromFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return\\n // The current contract should be able to manage its own members.\\n address(this) == who ||\\n // Governors can manage members.\\n AHasGovernors(this).isGovernor(who) ||\\n // Automatons with the correct privilege can manage members.\\n AHasAutomatons(address(this)).automatonCan(who, FAST_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal view override(AHasMembers) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onMemberAdded(address member) internal override(AHasMembers) {\\n // Notify marketplace that this member was added to this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberAddedToFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onMemberRemoved(address member) internal override(AHasMembers) {\\n // Notify token facet that this member was removed.\\n FastTokenFacet(address(this)).beforeRemovingMember(member);\\n // Notify marketplace that this member was removed from this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberRemovedFromFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// Flags.\\n\\n /**\\n * @notice Retrieves flags for a given address.\\n * @param a is the address to retrieve flags for.\\n * @return A `Flags` struct.\\n */\\n function flags(address a) external view returns (Flags memory) {\\n return Flags({isGovernor: AHasGovernors(address(this)).isGovernor(a), isMember: AHasMembers(this).isMember(a)});\\n }\\n}\\n\",\"keccak256\":\"0x38f3f5446880829a09bc75190ab90612fd0e26ff215ddcfbff08fc862f334c00\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/FastFrontendFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"./lib/LibFastDistributions.sol\\\";\\nimport \\\"./lib/LibFastCrowdfunds.sol\\\";\\n\\n/**\\n * @notice A facet dedicated to view / UI only methods. This facet should never hold any method that\\n * is not either `pure` or `view`, except to emit events.\\n */\\ncontract FastFrontendFacet is AFastFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Data structures.\\n\\n /**\\n * @notice This struct groups the common attributes of a FAST.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n /// @notice The `address` of the FAST.\\n address addr;\\n /// @notice The `name` of the FAST (ERC20).\\n string name;\\n /// @notice The `symbol` of the FAST (ERC20).\\n string symbol;\\n /// @notice The `decimals` of the FAST (ERC20).\\n uint8 decimals;\\n /// @notice The `totalSupply` of the FAST (ERC20).\\n uint256 totalSupply;\\n /// @notice Whether the FAST is semi public or not.\\n bool isSemiPublic;\\n /// @notice Whether the FAST has a fixed supply or continious.\\n bool hasFixedSupply;\\n /// @notice Whether the transfers are enabled or not for this FAST.\\n bool transfersDisabled;\\n /// @notice The default crowdfunds basis point fee.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n /// @notice The reserve balance.\\n uint256 reserveBalance;\\n /// @notice The number of members the FAST has.\\n uint256 memberCount;\\n /// @notice The number of governors for the FAST.\\n uint256 governorCount;\\n }\\n\\n /**\\n * @notice Member level details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct PrivilegesDetails {\\n /// @notice The Member's address.\\n address addr;\\n /// @notice The Member's balance.\\n uint256 balance;\\n /// @notice The Member's ETH balance.\\n uint256 ethBalance;\\n /// @notice Whether or not the address is a Member.\\n bool isMember;\\n /// @notice Whether or not the address is a Governor.\\n bool isGovernor;\\n /// @notice Automaton flags assigned to this address.\\n uint32 automatonPrivileges;\\n }\\n\\n /// Emitters.\\n\\n /**\\n * @notice Called by diamond facets, signals that FAST details may have changed.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be another facet of the diamond.\\n * Emits `DetailsChanged`, see `IFastEvents.DetailsChanged`\\n */\\n function emitDetailsChanged() external onlyDiamondFacet {\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n emit DetailsChanged({\\n transfersDisabled: LibFast.data().transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n memberCount: LibHasMembers.data().memberSet.values.length,\\n governorCount: LibHasGovernors.data().governorSet.values.length,\\n totalSupply: tokenData.totalSupply,\\n reserveBalance: tokenData.balances[LibHelpers.ZERO_ADDRESS]\\n });\\n }\\n\\n /// Public functions.\\n\\n /**\\n * @notice Gets the details of a FAST.\\n * @return The details for the current FAST, see `Details`.\\n */\\n function details() public view returns (Details memory) {\\n LibFast.Data storage topStorage = LibFast.data();\\n LibFastToken.Data storage tokenStorage = LibFastToken.data();\\n return\\n Details({\\n addr: address(this),\\n name: tokenStorage.name,\\n symbol: tokenStorage.symbol,\\n decimals: tokenStorage.decimals,\\n totalSupply: tokenStorage.totalSupply,\\n isSemiPublic: topStorage.isSemiPublic,\\n hasFixedSupply: topStorage.hasFixedSupply,\\n transfersDisabled: topStorage.transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n reserveBalance: tokenStorage.balances[LibHelpers.ZERO_ADDRESS],\\n memberCount: AHasMembers(address(this)).memberCount(),\\n governorCount: LibHasGovernors.data().governorSet.values.length\\n });\\n }\\n\\n /**\\n * @notice Gets detailed address privileges details.\\n * @param addr The address to get the privileges for.\\n * @return A FAST member's details, see `MemberDetails`.\\n */\\n function detailedPrivileges(address addr) public view returns (PrivilegesDetails memory) {\\n return\\n PrivilegesDetails({\\n addr: addr,\\n balance: LibFastToken.data().balances[addr],\\n ethBalance: (payable(addr).balance),\\n isMember: AHasMembers(address(this)).isMember(addr),\\n isGovernor: AHasGovernors(address(this)).isGovernor(addr),\\n automatonPrivileges: AHasAutomatons(address(this)).automatonPrivileges(addr)\\n });\\n }\\n\\n function paginateDetailedMembers(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n LibHasMembers.Data storage membersData = LibHasMembers.data();\\n (address[] memory members, uint256 nextCursor) = LibPaginate.addresses(membersData.memberSet.values, index, perPage);\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](members.length);\\n uint256 length = members.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(members[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedGovernors(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n (address[] memory governors, uint256 nextCursor) = LibPaginate.addresses(\\n LibHasGovernors.data().governorSet.values,\\n index,\\n perPage\\n );\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](governors.length);\\n uint256 length = governors.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(governors[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedDistributions(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Distribution.Details[] memory, uint256) {\\n (address[] memory distributions, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastDistributions.data().distributionSet.values,\\n index,\\n perPage\\n );\\n Distribution.Details[] memory values = new Distribution.Details[](distributions.length);\\n uint256 length = distributions.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Distribution(distributions[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n /**\\n * @dev Paginates detailed crowdfunds.\\n * @param index The index of the first crowdfund to return.\\n * @param perPage The number of crowdfunds to return.\\n * @return An array of crowdfund details, see `CrowdfundDetails`.\\n */\\n function paginateDetailedCrowdfunds(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Crowdfund.Details[] memory, uint256) {\\n (address[] memory crowdfunds, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastCrowdfunds.data().crowdfundSet.values,\\n index,\\n perPage\\n );\\n Crowdfund.Details[] memory values = new Crowdfund.Details[](crowdfunds.length);\\n uint256 length = crowdfunds.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Crowdfund(crowdfunds[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n}\\n\",\"keccak256\":\"0xdf236a27eb3441e06a4d9aa972a1677f4aed718cb4028f13462bfc7c87670729\",\"license\":\"MIT\"},\"contracts/fast/FastHistoryFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastHistory.sol\\\";\\n\\n/**\\n * @notice Although past events could be scrapped from the chain, we want to\\n * the frontend to be capable of listing past transfers and minting / burning events.\\n * This facet is in charge of performing archival of these things.\\n */\\ncontract FastHistoryFacet is AFastFacet {\\n /// Minting history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are minted.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Mint` on top of the stack.\\n */\\n function minted(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the mint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Mint, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are burnt.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Burn` on top of the stack.\\n */\\n function burnt(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the unmint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Burn, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice Returns the number of supply proofs (minting and burning together) ever created.\\n * @return A `uint256`.\\n */\\n function supplyProofCount() external view returns (uint256) {\\n return LibFastHistory.data().supplyProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of supply proofs (minting and burning together).\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.SupplyProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateSupplyProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n return LibPaginate.supplyProofs(LibFastHistory.data().supplyProofs, cursor, perPage);\\n }\\n\\n /// Transfer history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever a transfer has completed successfuly.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Keeps track of the operation in various tracking structures, so that it can be queried later by `sender` and `recipient`.\\n * - Pushes a transfer proof to the main transfer proof tracking stack.\\n */\\n function transfered(\\n address spender,\\n address from,\\n address to,\\n uint256 amount,\\n string calldata ref\\n ) external onlyDiamondFacet {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n // Keep track of the transfer proof ID for the sender and for the recipient.\\n s.transferProofInvolvements[from].push(s.transferProofs.length);\\n s.transferProofInvolvements[to].push(s.transferProofs.length);\\n // Keep track of the transfer proof globally.\\n s.transferProofs.push(\\n LibFastHistory.TransferProof({\\n spender: spender,\\n from: from,\\n to: to,\\n amount: amount,\\n blockNumber: block.number,\\n ref: ref\\n })\\n );\\n }\\n\\n /**\\n * @notice Returns the number of transfer proofs ever created.\\n * @return A `uint256`.\\n */\\n function transferProofCount() external view returns (uint256) {\\n return LibFastHistory.data().transferProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of transfer proofs.\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateTransferProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n return LibPaginate.transferProofs(LibFastHistory.data().transferProofs, cursor, perPage);\\n }\\n\\n /**\\n * @notice Counts all past inbound and outbound transfers involving a given address.\\n * @param involvee is the address for which to get the transfer proofs.\\n */\\n function transferProofByInvolveeCount(address involvee) external view returns (uint256) {\\n return LibFastHistory.data().transferProofInvolvements[involvee].length;\\n }\\n\\n /**\\n * @notice Returns pages of indices of past inbound and outbound transfer proofs by involvee.\\n * @dev This function is reading from an indexing data structure. Each index points to a record\\n * in the main transfer proof storage, and can then be found in `transferProofs` at returned indices.\\n * @param involvee is the address for which to retrieve a page of data.\\n * @param cursor is where to start.\\n * @param perPage is how many records at most should be returned.\\n */\\n function paginateTransferProofIndicesByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (uint256[] memory, uint256) {\\n return LibPaginate.uint256s(LibFastHistory.data().transferProofInvolvements[involvee], cursor, perPage);\\n }\\n\\n /**\\n * @notice Returns a page of inbound and outbound transfer proofs based on an involvee.#\\n * @param involvee is the address for which to fetch the data.\\n * @param cursor is where to start.\\n * @param perPage is how many items at most to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing the results and the cursor to the next page.\\n */\\n function paginateTransferProofsByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n uint256[] storage collection = s.transferProofInvolvements[involvee];\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = s.transferProofs[collection[cursor + i]];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0x6c517db2a7885a0991311827bb240e6003e1ceabe24f7d7fd245b3c0b0b5e08b\",\"license\":\"MIT\"},\"contracts/fast/FastTokenFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../lib/LibDiamond.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"../marketplace/MarketplaceTokenHoldersFacet.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastAccessFacet.sol\\\";\\nimport \\\"./FastHistoryFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\n\\ncontract FastTokenFacet is AFastFacet, IERC20 {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Constants.\\n\\n string internal constant DEAD_TOKENS_RETRIEVAL = \\\"Dead tokens retrieval\\\";\\n\\n /// Minting methods.\\n\\n /**\\n * @notice Mints an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that either the token has continuous supply, or that no tokens have been minted yet.\\n * - Increases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.minted`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Minted(amount, ref)` event.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function mint(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // We want to make sure that either of these two is true:\\n // - The token doesn't have fixed supply.\\n // - The token has fixed supply but has no tokens yet (First and only mint).\\n if (FastTopFacet(address(this)).hasFixedSupply() && (s.totalSupply != 0 || this.balanceOf(address(0)) != 0))\\n revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Prepare the minted amount on the zero address.\\n s.balances[address(0)] += amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).minted(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Minted(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Burns an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic.\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that the token has continuous supply.\\n * - Requires that there are enough funds in the reserve to cover for `amount` being burnt.\\n * - Decreases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.burnt(amount, ref)`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Burnt(amount, ref)`.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function burn(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n if (FastTopFacet(address(this)).hasFixedSupply()) revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Remove the minted amount from the zero address.\\n s.balances[address(0)] -= amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).burnt(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Burnt(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Allows an Issuer member to move an arbitrary account's holdings back to the reserve,\\n * as per regulatory requirements.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires that the caller is a member of the Issuer contract.\\n * - If the amount held by `holder` is not zero\\n * - The balance of `holder` should be set to zero.\\n * - The reserve's balance should be increased by how much was on the holder's account.\\n * - Total supply should be decreased by that amount too.\\n * - The `holder`'s address should not be tracked as a token holder in this FAST anymore.\\n * - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore.\\n * - A `Transfer(holder, reserve, amount)` event should be emited.\\n * - If the amount previously held by `holder` was not zero,\\n * - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\\n * @param holder is the address for which to move the tokens from.\\n */\\n function retrieveDeadTokens(address holder) external onlyIssuerMember {\\n // Cache how many tokens the holder has.\\n uint256 amount = balanceOf(holder);\\n // Note: The amount **can** be zero in this function.\\n\\n // Grab a pointer to the token storage.\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // These should only run if the amount is zero, as they result in a no-op.\\n if (amount > 0) {\\n // Set the holder balance to zero.\\n s.balances[holder] = 0;\\n // Increment the reserve's balance.\\n s.balances[address(0)] += amount;\\n // The tokens aren't in circulation anymore - decrease total supply.\\n s.totalSupply -= amount;\\n }\\n\\n // Since the holder's account is now empty, make sure to keep track of it both\\n // in this FAST and in the marketplace.\\n s.tokenHolders.remove(holder, true);\\n MarketplaceTokenHoldersFacet(LibFast.data().marketplace).fastBalanceChanged(holder, 0);\\n\\n // Keep track of this transfer in history facet.\\n FastHistoryFacet(address(this)).transfered(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n\\n // This operation can be seen as a regular transfer between holder and reserve. Emit.\\n emit FastTransfer(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n emit IERC20.Transfer(holder, address(0), amount);\\n\\n // If amount wasn't zero, total supply and reserve balance have changed - emit.\\n if (amount > 0) FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n // ERC20 implementation and transfer related methods.\\n\\n /**\\n * @notice The name of this FAST (ERC20 standard).\\n * @return string Name of the FAST.\\n */\\n function name() external view returns (string memory) {\\n return LibFastToken.data().name;\\n }\\n\\n /**\\n * @notice The symbol of this FAST (ERC20 standard).\\n * @return string Symbol of the FAST.\\n */\\n function symbol() external view returns (string memory) {\\n return LibFastToken.data().symbol;\\n }\\n\\n /**\\n * @notice The `decimals` of this FAST (ERC20 standard).\\n * @return uint256 Number of decimals the FAST has.\\n */\\n function decimals() external view returns (uint256) {\\n return LibFastToken.data().decimals;\\n }\\n\\n /**\\n * @notice The total supply of the FAST (ERC20 standard).\\n * @return uint256 Total supply of the FAST.\\n */\\n function totalSupply() external view override(IERC20) returns (uint256) {\\n return LibFastToken.data().totalSupply;\\n }\\n\\n /**\\n * @notice The balance of the passed owner (ERC20 standard).\\n * @param owner The owners address to get the balance of.\\n * @return uint256 The current balance of this owner's account.\\n */\\n function balanceOf(address owner) public view override(IERC20) returns (uint256) {\\n return LibFastToken.data().balances[owner];\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. */\\n function transfer(address to, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(\\n TransferArgs({\\n spender: msg.sender,\\n from: msg.sender,\\n to: to,\\n amount: amount,\\n ref: LibFastToken.DEFAULT_TRANSFER_REFERENCE\\n })\\n );\\n return true;\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`. */\\n function transferWithRef(address to, uint256 amount, string calldata ref) external returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: msg.sender, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view override(IERC20) returns (uint256) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // If the allowance being queried is owned by the reserve, and `spender` is\\n // an Issuer member, `spender` owns the full balance of `owner`. If they are\\n // not an Issuer member then their allowance is zero. Otherwise, the regular given\\n // allowance for `spender` over `owner` applies.\\n if (owner == address(0)) return AHasMembers(LibFast.data().issuer).isMember(spender) ? s.balances[owner] : 0;\\n else return s.allowances[owner][spender];\\n }\\n\\n /**\\n * @notice This method directly calls `performApproval`, setting its `from` paramter to the sender of\\n * the transaction.\\n * @param spender is the address to allow spending from the caller's wallet.\\n * @param amount is how much to **increase** the allowance.\\n */\\n function approve(address spender, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performApproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice This method directly calls `performDisapproval`, setting its `from` parameter to the sender of\\n * the transaction.\\n * @param spender is the address to disallow spending from the caller's wallet.\\n * @param amount is how much to **decrease** the allowance.\\n */\\n function disapprove(address spender, uint256 amount) external onlyMember(msg.sender) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performDisapproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`, the `ref` will be defaulted.\\n function transferFrom(address from, address to, uint256 amount) external override(IERC20) returns (bool) {\\n transferFromWithRef(from, to, amount, LibFastToken.DEFAULT_TRANSFER_REFERENCE);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`.\\n function transferFromWithRef(address from, address to, uint256 amount, string memory ref) public returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: from, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n // Allowances query operations.\\n\\n function givenAllowanceCount(address owner) external view returns (uint256) {\\n return LibFastToken.data().allowancesByOwner[owner].values.length;\\n }\\n\\n function paginateAllowancesByOwner(\\n address owner,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesByOwner[owner].values, index, perPage);\\n }\\n\\n function receivedAllowanceCount(address spender) external view returns (uint256) {\\n return LibFastToken.data().allowancesBySpender[spender].values.length;\\n }\\n\\n function paginateAllowancesBySpender(\\n address spender,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesBySpender[spender].values, index, perPage);\\n }\\n\\n // These functions would be internal / private if we weren't using the diamond pattern.\\n // Instead, they're `onlyDiamondFacet` - eg can only be called by facets of the current\\n // FAST.\\n\\n struct TransferArgs {\\n address spender;\\n address from;\\n address to;\\n uint256 amount;\\n string ref;\\n }\\n\\n /**\\n * @notice This is the internal method that gets called whenever a transfer is initiated. Both `transfer`,\\n * `transferWithRef`, and their variants internally call this function.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that transfers are enabled for this FAST.\\n * - Requires that `from` and `to` are different addresses.\\n * - Requires that `from` membership is active in the marketplace.\\n * - If `from` is not the reserve, requires that `from` is a valid token holder.\\n * - If `from` is the reserve, requires that the message sender is an issuer member.\\n * - Requires that `to` is a valid token holder.\\n * - Requires that the amount is a positive value.\\n * - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address,\\n * - The allowance given by the `from` address to the `spender` covers for the `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Decreases the allowance given by `from` to `spender`.\\n * - If the new allowance reaches zero,\\n * - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions.\\n * - Decreases the balance of the `owner` address.\\n * - Increases the balance of the `to` address by `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Requires that there are enough transfer credits to cover for `amount`.\\n * - Decreases the transfer credits by `amount`.\\n * - If the `to` address is the reserve,\\n * - Decreases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Else, if the `from` address is the reserve,\\n * - Increases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Calls `FastHistoryFacet.transfered`.\\n * - Emits a `Transfer(from, to, amount)` event.\\n */\\n function performTransfer(TransferArgs calldata p) external onlyDiamondFacet {\\n // TODO: Make this function return instead of raising errors.\\n\\n // Grab a pointer to our top-level storage.\\n LibFast.Data storage topData = LibFast.data();\\n\\n // Requires that transfers are enabled for this FAST.\\n if (FastTopFacet(address(this)).transfersDisabled()) revert ICustomErrors.RequiresTransfersEnabled();\\n // Requires that `from` and `to` are different addresses.\\n else if (p.from == p.to) revert ICustomErrors.RequiresDifferentSenderAndRecipient(p.from);\\n // Requires that allowance transfers from the reserve are performed by issuer members only.\\n else if (p.from == address(0) && !AHasMembers(topData.issuer).isMember(p.spender))\\n revert ICustomErrors.RequiresIssuerMembership(p.spender);\\n // Requires that the `from` address can hold tokens.\\n else if (!canHoldTokens(p.from)) revert ICustomErrors.RequiresValidTokenHolder(p.from);\\n // Requires that the `from` address marketplace membership is active if not the reserve.\\n else if (p.from != address(0) && !IHasActiveMembers(LibFast.data().marketplace).isActiveMember(p.from))\\n revert ICustomErrors.RequiresMarketplaceActiveMembership(p.from);\\n // Requires that the `to` address can hold tokens.\\n else if (!canHoldTokens(p.to)) revert ICustomErrors.RequiresValidTokenHolder(p.to);\\n\\n // For any non-zero amount, update balances and allowances, notify other contracts, etc.\\n if (p.amount != 0) {\\n // Grab a pointer to our token storage.\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n\\n // If this is an allowance transfer and if the `from` account is not the reserve...\\n if (p.spender != p.from && p.from != address(0)) {\\n // Decrease allowance.\\n uint256 newAllowance = tokenData.allowances[p.from][p.spender] -= p.amount;\\n // If the allowance reached zero, we want to remove that allowance from\\n // the various other places where we keep track of it.\\n if (newAllowance == 0) {\\n tokenData.allowancesByOwner[p.from].remove(p.spender, true);\\n tokenData.allowancesBySpender[p.spender].remove(p.from, true);\\n }\\n }\\n\\n // Keep track of the balances - `from` spends (decrease), `to` receives (increase).\\n uint256 fromBalance = (tokenData.balances[p.from] -= p.amount);\\n uint256 toBalance = (tokenData.balances[p.to] += p.amount);\\n\\n // Keep track of who has what FAST.\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.from, fromBalance);\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.to, toBalance);\\n\\n // Keep track of who holds this token.\\n balanceChanged(p.from, fromBalance);\\n balanceChanged(p.to, toBalance);\\n\\n // If the funds are going to the reserve...\\n if (p.to == address(0)) {\\n // Decrease total supply.\\n tokenData.totalSupply -= p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n // If the funds are moving from the zero address...\\n else if (p.from == address(0)) {\\n // Increase total supply.\\n tokenData.totalSupply += p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n // Keep track of the transfer in the history facet.\\n FastHistoryFacet(address(this)).transfered(p.spender, p.from, p.to, p.amount, p.ref);\\n\\n // Emit!\\n emit FastTransfer(p.spender, p.from, p.to, p.amount, p.ref);\\n emit Transfer(p.from, p.to, p.amount);\\n }\\n\\n /**\\n * @notice Increases the allowance given by `from` to `spender` by `amount`.\\n * Note that this function should run and emit even if the amount passed is zero.\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that `onlyTokenHolder` passes for the `from` address.\\n * - Requires that the `amount` is positive number.\\n * - Increases the allowance given by `from` to `spender` by `amount`.\\n * - Update the allowance lookup tables in both directions.\\n * - Emits an `Approval(from, spender, amount)`.\\n * @param from is the wallet from which to give the allowance.\\n * @param spender is the receiver of the allowance.\\n * @param amount is how much to **increase** the current allowance by.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performApproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n // Allowance cannot be given over the reserve.\\n if (from == address(0)) revert ICustomErrors.UnsupportedOperation();\\n // Require that the `from` address can hold tokens.\\n else if (!canHoldTokens(from)) revert ICustomErrors.RequiresValidTokenHolder(from);\\n\\n if (amount > 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // Note that we are not exactly following ERC20 here - we don't want to **set** the allowance to `amount`\\n // to mitigate a possible attack.\\n // See https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.gmr6zdg47087.\\n s.allowances[from][spender] += amount;\\n // Keep track of given and received allowances.\\n s.allowancesByOwner[from].add(spender, true);\\n s.allowancesBySpender[spender].add(from, true);\\n }\\n\\n // Emit!\\n emit IERC20.Approval(from, spender, amount);\\n }\\n\\n /**\\n * @notice Decreases allowance given by `from` to `spender` by `amount`.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - The allowance given by `from` to `spender` is decreased by `amount`.\\n * - Whether the allowance reached zero, stop tracking it by owner and by spender.\\n * - Emit a `Disapproval(from, spender, amount)` event.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performDisapproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n if (amount != 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove allowance.\\n s.allowances[from][spender] -= amount;\\n\\n // Whenever the allowance reaches zero, stop tracking it by owner and spender.\\n if (s.allowances[from][spender] == 0) {\\n s.allowancesByOwner[from].remove(spender, true);\\n s.allowancesBySpender[spender].remove(from, true);\\n }\\n }\\n\\n // Emit!\\n emit Disapproval(from, spender, amount);\\n }\\n\\n // WARNING: This method contains two loops. We know that this should never\\n // happen in solidity. However:\\n // - In the context of our private chain, gas is cheap.\\n // - It can only be called by a governor.\\n function beforeRemovingMember(address member) external onlyDiamondFacet {\\n if (balanceOf(member) != 0) revert ICustomErrors.RequiresPositiveBalance(member);\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove all given allowances.\\n {\\n address[] storage gaData = s.allowancesByOwner[member].values;\\n while (gaData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address spender = gaData[0];\\n this.performDisapproval(member, spender, s.allowances[member][spender]);\\n }\\n }\\n\\n // Remove all received allowances.\\n {\\n address[] storage raData = s.allowancesBySpender[member].values;\\n while (raData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address owner = raData[0];\\n this.performDisapproval(owner, member, s.allowances[owner][member]);\\n }\\n }\\n }\\n\\n function holders() external view returns (address[] memory) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n return s.tokenHolders.values;\\n }\\n\\n function balanceChanged(address holder, uint256 balance) private {\\n // Return early if this is the zero address.\\n if (holder == address(0)) return;\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.tokenHolders.contains(holder))\\n s.tokenHolders.add(holder, false);\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.tokenHolders.contains(holder)) s.tokenHolders.remove(holder, false);\\n }\\n\\n // Private and helper methods.\\n\\n /**\\n * @notice Ensures that the given address is a member of the current FAST or the Zero Address.\\n *\\n * Business logic:\\n * - If the candidate is the reserve, it is a valid token holder.\\n * - If the FAST is semi-public,\\n * - We require that candidate is a member of the Marketplace contract and is active in it.\\n * - Otherwise,\\n * - Require that the candidate is a member of the FAST.\\n * @param candidate The address to check.\\n * @return A boolean set to `true` if `candidate` can hold tokens, `false` otherwise.\\n */\\n function canHoldTokens(address candidate) private view returns (bool) {\\n // Zero address can hold tokens, in any cases.\\n if (candidate == address(0)) return true;\\n // If the FAST is semi public, any member of the marketplace can hold tokens.\\n else if (FastTopFacet(address(this)).isSemiPublic()) {\\n return AHasMembers(LibFast.data().marketplace).isMember(candidate);\\n }\\n // FAST is private, only members of the fast can hold tokens.\\n else {\\n return AHasMembers(address(this)).isMember(candidate);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7a4b4820614c5dd57658ecfe853ec6daed8c1f87e14f3dd81adc03cda9780ed7\",\"license\":\"MIT\"},\"contracts/fast/FastTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./lib/IFastEvents.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\n\\ncontract FastTopFacet is AFastFacet {\\n // Getters and setters for global flags.\\n\\n /**\\n * @notice Get the Issuer address.\\n * @return address Address of Issuer.\\n */\\n function issuerAddress() external view returns (address) {\\n return LibFast.data().issuer;\\n }\\n\\n /**\\n * @notice Get the Marketplace address.\\n * @return address Address of Marketplace.\\n */\\n function marketplaceAddress() external view returns (address) {\\n return LibFast.data().marketplace;\\n }\\n\\n /**\\n * @notice Is this FAST a semi public FAST?\\n * @return bool Yes/no semi public.\\n */\\n function isSemiPublic() external view returns (bool) {\\n return LibFast.data().isSemiPublic;\\n }\\n\\n /**\\n * @notice Is this FAST a fixed supply FAST?\\n * @return bool Yes/no fixed supply.\\n */\\n function hasFixedSupply() external view returns (bool) {\\n return LibFast.data().hasFixedSupply;\\n }\\n\\n /**\\n * @notice Are transfers enabled across this FAST?\\n * @return boolean `true` if transfers are disabled, `false` if transfers are enabled.\\n */\\n function transfersDisabled() external view returns (bool) {\\n return LibFast.data().transfersDisabled;\\n }\\n\\n // Setters for global flags.\\n\\n /**\\n * @notice Allows to switch from a private scheme to a semi-public scheme,\\n * but not the other way around, unless the total supply is zero.\\n * @param flag Set the semi public flag to true/false.\\n */\\n function setIsSemiPublic(bool flag) external onlyIssuerMember {\\n // Someone is trying to toggle back to private?... No can do!\\n if (this.isSemiPublic() && FastTokenFacet(address(this)).totalSupply() != 0) {\\n revert ICustomErrors.UnsupportedOperation();\\n }\\n LibFast.data().isSemiPublic = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /**\\n * @notice Allows an issuer member to enable or disable all transfers within this FAST.\\n * @param flag Set the transfer capability to active or not.\\n */\\n function setTransfersDisabled(bool flag) external onlyIssuerMemberOrIssuerContract {\\n LibFast.Data storage d = LibFast.data();\\n // Only make changes and emit if the new flag is different than the old one.\\n if (d.transfersDisabled != flag) {\\n // Set flag.\\n d.transfersDisabled = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n /**\\n * @notice Retrieves the group slug to which this FAST belongs.\\n * @return string The group slug string.\\n */\\n function group() external view returns (string memory) {\\n return LibFast.data().group;\\n }\\n\\n /**\\n * @notice Assigns the FAST into a group given its slug.\\n * It should only be callable by the Issuer contract.\\n * @param newGroup is the slug for the new group for this FAST.\\n */\\n function setGroup(string calldata newGroup) external onlyIssuerContract {\\n // Set group slug.\\n LibFast.data().group = newGroup;\\n }\\n}\\n\",\"keccak256\":\"0xc92847559953aa4130a76c0ddf63d9f9e90cf26351153fa691aea503210f7c8d\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0x64ac3bc4aaa8ea06efef19407baed93a5e960c2b822e732517efc2c991e96795\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastCrowdfunds.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastCrowdfunds {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 2;\\n /// @notice This is keccak256('Fast.storage.Crowdfunds'):\\n bytes32 internal constant STORAGE_SLOT = 0xc843fbb8f0f5694376d391c1687b800112a6eed97820d8e7a2b82618dd1b69ed;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed crowdfund contract is held here.\\n LibAddressSet.Data crowdfundSet;\\n /// @notice The default crowdfund fee for this FAST.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3f43bc03bbdd3d7d1e2dc957e060310ba97eea02ce64ac91082cc30c9e7c82b7\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastDistributions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastDistributions {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Distributions'):\\n bytes32 internal constant STORAGE_SLOT = 0xe865e85b076245a187a9d3cc15c47264cd0b46df4afd899817bd2e16523485ad;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed distribution contract is held here.\\n LibAddressSet.Data distributionSet;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dbd277dde92dc23bd8fd81a005783e50903690b3acf4ca9e98f6dea3570426e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with token related logic.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastToken {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Token'):\\n bytes32 internal constant STORAGE_SLOT = 0xb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261;\\n\\n // Constants.\\n\\n string internal constant DEFAULT_TRANSFER_REFERENCE = \\\"Unspecified - via ERC20\\\";\\n\\n // Data structures.\\n\\n /**\\n * @notice The token data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // ERC20 related properties for this FAST Token.\\n /// @notice The name of the FAST.\\n string name;\\n /// @notice The symbol for this FAST.\\n string symbol;\\n /// @notice The decimal points used by this FAST.\\n uint8 decimals;\\n /// @notice The amount of tokens in circulation.\\n uint256 totalSupply;\\n /// @notice Legacy variable.\\n uint256 LEGACY_transferCredits;\\n /// @notice Our members balances are held here.\\n mapping(address => uint256) balances;\\n // Allowances are stored here.\\n /// @notice Allowance amounts are stored in here, via mapping of `owner.spender.amount`\\n mapping(address => mapping(address => uint256)) allowances;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by owner.\\n mapping(address => LibAddressSet.Data) allowancesByOwner;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by spender.\\n mapping(address => LibAddressSet.Data) allowancesBySpender;\\n /// @notice All of this FAST token holders.\\n LibAddressSet.Data tokenHolders;\\n }\\n\\n /**\\n * @notice Returns the token storage for the calling FAST.\\n * @return s a struct pointer for token FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf101b0347e095905f91f32ec41dcbe1dca1d8a84cc99664ca5254f21dcf3d8e9\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InterfaceNotSupported(string);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0xd6da7364331de0a387574a44c5a4e7555b63cfe4baaca4dfef42c5d2345f0683\",\"license\":\"MIT\"},\"contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n/// @title A facet providing diamond cut mechanisms.\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a method with `delegatecall`.\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xf548f40da69f2c54f4e03f92dc31094f6825669314b87266cce22e0a8f1a4c47\",\"license\":\"MIT\"},\"contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// Directly import IERC165 from OpenZeppelin contracts.\\n// Solves an issue with 2 conflicting definitions of IERC165.\\nimport {IERC165} from \\\"@openzeppelin/contracts/interfaces/IERC165.sol\\\";\\n\",\"keccak256\":\"0x4d40fa89830d0f833aacefdbab507408a29b692e37990192c6b5e4ce581db830\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\",\"keccak256\":\"0x8af6e7ffd7a4cbae707b539d4271f8a3e36e373ea1470706fe368b7e6e6c33f7\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/issuer/IssuerAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuerAccess.sol\\\";\\nimport \\\"./lib/IIssuerEvents.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\n\\ncontract IssuerAccessFacet is AIssuerFacet, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return AHasMembers(this).isMember(who);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n /// Membership management.\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor added to a FAST.\\n */\\n function governorAddedToFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].add(msg.sender, true);\\n\\n emit GovernorshipAdded(msg.sender, governor);\\n }\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor removed from a FAST.\\n */\\n function governorRemovedFromFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].remove(msg.sender, true);\\n\\n emit GovernorshipRemoved(msg.sender, governor);\\n }\\n\\n /** @notice Returns a list of FASTs that the passed address is a governor of.\\n * @param governor is the address to check governorships of.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateGovernorships(\\n address governor,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuerAccess.data().fastGovernorships[governor].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0xb8eb9a8eb626f61ecc5627b927bdd81a97f38b05e621e903f77000e63a21b37c\",\"license\":\"MIT\"},\"contracts/issuer/IssuerTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuer.sol\\\";\\n\\ncontract IssuerTopFacet is AIssuerFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n // FAST management related methods.\\n\\n /**\\n * @notice Queries whether a given address is a known and registered FAST contract.\\n * @param fast The address of the contract to check.\\n * @return A boolean.\\n */\\n function isFastRegistered(address fast) external view returns (bool) {\\n return LibIssuer.data().fastSet.contains(fast);\\n }\\n\\n /**\\n * @notice Allows to retrieve the address of a FAST diamond given its symbol.\\n * @param symbol The symbol of the FAST diamond to get the address of.\\n * @return The address of the corresponding FAST diamond, or the Zero Address if not found.\\n */\\n function fastBySymbol(string calldata symbol) external view returns (address) {\\n return LibIssuer.data().fastSymbols[symbol];\\n }\\n\\n /**\\n * @notice Allows the registration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be registered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastRegistered` event.\\n */\\n function registerFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n if (s.fastSymbols[symbol] != address(0)) {\\n revert ICustomErrors.DuplicateEntry();\\n }\\n\\n // Add the FAST to our list.\\n s.fastSet.add(fast, false);\\n // Add the fast symbol to our list.\\n s.fastSymbols[symbol] = fast;\\n\\n // Emit!\\n emit FastRegistered(fast);\\n }\\n\\n /**\\n * @notice Allows the unregistration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be unregistered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastUnregistered` event.\\n */\\n function unregisterFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n\\n // Disable transfers in the FAST.\\n FastTopFacet(fast).setTransfersDisabled(true);\\n\\n // Remove the FAST from our lists.\\n s.fastSet.remove(fast, false);\\n delete s.fastSymbols[symbol];\\n\\n // Emit!\\n emit FastUnregistered(fast);\\n }\\n\\n /**\\n * @notice Counts the number of FAST diamonds registered with this Issuer.\\n * @return The number of FAST diamonds registered with this Issuer.\\n */\\n function fastCount() external view returns (uint256) {\\n return LibIssuer.data().fastSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a starting cursor and a number of records per page.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFasts(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to move collected ERC20 fees from this contract\\n * to an arbitrary address.\\n * @param token is the address of the ERC20 to be collected.\\n * @param amount is how much should be moved from the ERC20 to the collection address.\\n * @param to is the collection address - eg the address that will receive the ERC20 tokens.\\n */\\n function transferERC20Tokens(IERC20 token, uint256 amount, address to) public onlyMember(msg.sender) {\\n require(token.transfer(to, amount));\\n }\\n\\n /**\\n * @notice Allows to assign FASTs to groups.\\n * @param fast The FAST address to assign.\\n * @param newGroup The name of the group in which the FAST should be placed.\\n */\\n function setFastGroup(address fast, string calldata newGroup) external onlyMember(msg.sender) {\\n string memory oldGroup = FastTopFacet(fast).group();\\n // Remove FAST from old group.\\n if (bytes(oldGroup).length > 0) LibIssuer.data().fastGroups[oldGroup].remove(fast, false);\\n // Add FAST to new group.\\n if (bytes(newGroup).length > 0) LibIssuer.data().fastGroups[newGroup].add(fast, false);\\n // Set group name at FAST level.\\n FastTopFacet(fast).setGroup(newGroup);\\n // Emit!\\n emit FastGroupChanged(fast, oldGroup, newGroup);\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a group, starting cursor and a number of records per page.\\n * @param group The group to paginate.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFastsInGroup(\\n string calldata group,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastGroups[group].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0x1f0e0e3a107552b4155e3fbc2f7cdba5d482e3de23b1abaff858f5cbaf1a70ec\",\"license\":\"MIT\"},\"contracts/issuer/lib/AIssuerFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./IIssuerEvents.sol\\\";\\n\\n/**\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AIssuerFacet is IIssuerEvents {\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresIssuerMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x4ab53f3e2ce4e78f13c93f46c10c581c0b5ebc520979191d6092d2d7f7aa733c\",\"license\":\"MIT\"},\"contracts/issuer/lib/IIssuerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// WARNING: These events must be maintained 1:1 with LibIssuerEvents!\\n// They also should never be emitted directly, they only help us defining\\n// typescript types!\\ninterface IIssuerEvents {\\n /// FAST registration events.\\n\\n /**\\n * @notice Emited when a new FAST is registered.\\n * @param fast The address of the newly registered FAST diamond.\\n */\\n event FastRegistered(address indexed fast);\\n /**\\n * @notice Emited when a FAST is removed from the Issuer contract.\\n * @param fast The address of the unregistered FAST.\\n */\\n event FastUnregistered(address indexed fast);\\n\\n /// FAST groupping events.\\n\\n event FastGroupChanged(address indexed fast, string indexed oldGroup, string indexed newGroup);\\n\\n /// Governors.\\n\\n event GovernorshipRemoved(address indexed fast, address indexed governor);\\n event GovernorshipAdded(address indexed fast, address indexed governor);\\n}\\n\",\"keccak256\":\"0x7ab2611cedeaf69aba2461e083ce436cde93f53e0ebf7ae882bf1800a839f543\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuer {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xd681d5f1de7bc4b7442c088939dc202585e09699e92a94c9717ace8d0f4fcaa5;\\n\\n // Data structures.\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // This is where we keep our list of deployed fast FASTs.\\n LibAddressSet.Data fastSet;\\n // We keep track of the FAST symbols that were already used - string to FAST address.\\n mapping(string => address) fastSymbols;\\n // We also keep track of the FAST groups here - slug to FAST address set.\\n mapping(string => LibAddressSet.Data) fastGroups;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x82972d98e290aa68b6fa14dee5e9f3e0ca3d80604e96435ea437e9f92891f7e9\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuerAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuerAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0x3ceaa4d5edf9c96fbd56140abe6389d65a87143d4f11819874ff2fe0ae9574db;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // For a given address we store list of FASTs where that address is a governor.\\n mapping(address => LibAddressSet.Data) fastGovernorships;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x225043d709577f7c580aa46637ef2910336dc0ef75a508a1252484fa45558fca\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x0e12d54c3afccb656312e8bc7c31d16feb3718a421d2ea732024f608ccb6aab4\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasForwarder.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"./lib/LibMarketplaceAccess.sol\\\";\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./MarketplaceAutomatonsFacet.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Access facet is in charge of keeping track of marketplace members.\\n */\\ncontract MarketplaceAccessFacet is AMarketplaceFacet, AHasMembers, AHasContext, IHasActiveMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasContext implementation.\\n\\n // TODO: Could _isTrustedForwarder actually have it's default implementation point to\\n // IHasForwarder(address(this)).isTrustedForwarder(forwarder) or similar?\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n // Override base classes to use the AHasContext implementation.\\n function _msgSender() internal view override(AHasMembers, AHasContext) returns (address) {\\n return AHasContext._msgSender();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return _isIssuerMember(who) || AHasAutomatons(address(this)).automatonCan(who, MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n function onMemberRemoved(address member) internal view override(AHasMembers) {\\n LibMarketplaceAccess.Data storage s = LibMarketplaceAccess.data();\\n // Ensure that member doesn't have any FAST membership.\\n if (s.fastMemberships[member].values.length != 0) revert ICustomErrors.RequiresNoFastMemberships(member);\\n }\\n\\n /// FAST memberships functions.\\n\\n /**\\n * @notice Allows to query FAST memberships for a given member address.\\n * @param member Is the address to check.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n */\\n function fastMemberships(\\n address member,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibMarketplaceAccess.data().fastMemberships[member].values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a new FAST membership has been added.\\n */\\n function memberAddedToFast(address member) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the member's FAST membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].add(_msgSender(), true);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a FAST membership has been removed.\\n */\\n function memberRemovedFromFast(address member) external {\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].remove(_msgSender(), true);\\n }\\n\\n /// IHasActiveMembers implementation.\\n\\n /**\\n * @notice Given a member returns it's activation status.\\n * @param candidate The address to check activation status on.\\n */\\n function isActiveMember(address candidate) external view override(IHasActiveMembers) returns (bool) {\\n return AHasMembers(this).isMember(candidate) && !LibMarketplaceAccess.data().deactivatedMemberSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Activates a member at the Marketplace level.\\n * @param member The member to remove from the deactivation member set.\\n */\\n function activateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to activate an already active member.\\n if (this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceDeactivatedMember(member);\\n // Remove the member from the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.remove(member, false);\\n // Emit!\\n emit MemberActivated(member);\\n }\\n\\n /**\\n * @notice Deactivates a member at the Marketplace level.\\n * @param member The member to add to the deactivation member set.\\n */\\n function deactivateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to deactivate an already deactivated member.\\n if (!this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceActiveMembership(member);\\n // Add the member to the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.add(member, false);\\n // Emit!\\n emit MemberDeactivated(member);\\n }\\n}\\n\",\"keccak256\":\"0x7a8f193f18b8c2f39d38aafb2c7cb936b07fff612299a4620ac932cc9ee4766e\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS = 1;\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract MarketplaceAutomatonsFacet is AMarketplaceFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0xa2a142702268b2d33ddd7703c23f36274161cb2b9b707369e703ebbfa2f5a53c\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceTokenHoldersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./lib/LibMarketplaceTokenHolders.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../common/AHasForwarder.sol\\\";\\n\\n/** @dev The Marketplace FAST balances facet.\\n */\\ncontract MarketplaceTokenHoldersFacet is AMarketplaceFacet, AHasContext {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasContext implementation.\\n\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n /** @dev The callback used when a balance changes on a FAST.\\n */\\n function fastBalanceChanged(address account, uint256 balance) external {\\n // Return early if this is the zero address.\\n if (account == address(0)) {\\n return;\\n }\\n\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n\\n // Get the storage pointer and balance of the token holder.\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.fastHoldings[account].contains(_msgSender())) {\\n s.fastHoldings[account].add(_msgSender(), false);\\n }\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.fastHoldings[account].contains(_msgSender())) {\\n s.fastHoldings[account].remove(_msgSender(), false);\\n }\\n }\\n\\n /** @dev A way to get a list of FASTs for an account.\\n * @return list of FAST addresses.\\n */\\n function holdings(address account) external view returns (address[] memory) {\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n return s.fastHoldings[account].values;\\n }\\n}\\n\",\"keccak256\":\"0xb8fb7178c40f36efc80271a2441cdcea03f072452a99650e550a737c50bced15\",\"license\":\"MIT\"},\"contracts/marketplace/lib/AMarketplaceFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibMarketplace.sol\\\";\\nimport \\\"./IMarketplaceEvents.sol\\\";\\n\\n/**\\n * @notice This contract is a group of modifiers that can be used by any Marketplace facets to guard against\\n * certain permissions.\\n */\\nabstract contract AMarketplaceFacet is IMarketplaceEvents {\\n /// Internal ACL functions.\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibMarketplace.data().issuer).isMember(who);\\n }\\n\\n // Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() virtual {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Requires that the message sender is a member of the linked Issuer.\\n */\\n modifier onlyIssuerMember() virtual {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n /**\\n * @notice Requires that the given address is a member of the marketplace.\\n * @param who is the address to be checked.\\n */\\n modifier onlyMember(address who) virtual {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xb9569fef0cef86a40828714a131f6dafb98ae4cd21ff44e710f8e57413bd6ffb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/IMarketplaceEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface IMarketplaceEvents {\\n /// @dev See `IHasActiveMembers`.\\n event MemberActivated(address indexed member);\\n /// @dev See `IHasActiveMembers`.\\n event MemberDeactivated(address indexed member);\\n /// @dev Emitted when a FAST deployment is requested.\\n event FastDeploymentRequested(uint256 indexed index);\\n}\\n\",\"keccak256\":\"0xeb89df40f51b42b444f698f8d13cf4318396f9393d7fab049c131e2f6bd45b4d\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibMarketplace {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xb59ec141376cee83f618e10e881bbb4789cdeee27e0d441a8c37ead3cb8b93c1;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03c52542f4b27ba631639502855cdc9d5e56347c254595b42a7d6567441933bb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0xecb992c7a1185ca18ac50bc1672192fb67e7c3e74465887a8fcaab265dab37bd;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we keep track of our member FAST memberships.\\n mapping(address => LibAddressSet.Data) fastMemberships;\\n /// @notice This is where we keep track of our deactivated memberships.\\n LibAddressSet.Data deactivatedMemberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac8cc51395e6e5b357b72f0cb3b4b681b5cbe0e0338692fde4d1087bc98b03eb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceTokenHolders.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceTokenHolders {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.TokenHolders.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xecf50453542504034bd40d376fb1408ada3025f2fe86ca1b9b4b1440b8d4a2f4;\\n\\n struct Data {\\n /// @dev The latest intializer version that was called.\\n uint16 version;\\n /// @dev The tracked FAST holdings of a user.\\n mapping(address => LibAddressSet.Data) fastHoldings;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa6edcacafdaaac79b202288095948b7b3bee0e01f7d4b4efb8eee3425f9a8c04\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506115ee806100206000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063a230c52411610081578063e43581b81161005b578063e43581b8146101ad578063e8c9fd45146101c0578063eecdac88146101c857600080fd5b8063a230c52414610164578063c6549ba414610187578063ca6d56dc1461019a57600080fd5b80633c4a25d0116100b25780633c4a25d0146100fe5780635a4c75d5146101115780639fef0c011461013257600080fd5b80630b1ca49a146100ce57806311aee380146100e3575b600080fd5b6100e16100dc3660046113f5565b6101db565b005b6100eb6102bf565b6040519081526020015b60405180910390f35b6100e161010c3660046113f5565b6102ec565b61012461011f36600461142b565b610424565b6040516100f592919061144d565b6101456101403660046113f5565b610462565b60408051825115158152602092830151151592810192909252016100f5565b6101776101723660046113f5565b6105ad565b60405190151581526020016100f5565b61012461019536600461142b565b6105e4565b6100e16101a83660046113f5565b610611565b6101776101bb3660046113f5565b610743565b6100eb61076f565b6100e16101d63660046113f5565b610797565b6101e3610870565b6101ec8161087f565b61023f576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b610248826109ca565b61027a8260007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b6001019190610b5a565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f6e76fb4c77256006d9c38ec7d82b45a8c8f3c27b1d6766fffc42dfb8de68449290600090a25050565b60007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b60020154919050565b6102f4610870565b6102fd81610d32565b61034b576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b8161035581610d3d565b6103a3576040517f6170384e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b6103d58360007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6001019190610d48565b6103de83610e3c565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fdc5a48d79e2e147530ff63ecdbed5a5a66adb9d5cf339384d5d076da197c40b590600090a2505050565b606060006104577fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6002018585610fcc565b915091509250929050565b604080518082018252600080825260208201528151808301928390527fe43581b80000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff8316604483015290803063e43581b860648301602060405180830381865afa1580156104e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050b91906114ab565b151581526040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602090910190309063a230c52490602401602060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a391906114ab565b1515905292915050565b60006105de827fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b600101906110ed565b92915050565b606060006104577fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb9161044d565b610619610870565b6106228161087f565b610670576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b8161067a81610d3d565b6106c8576040517f06a0278c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b6106f48360007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb916103cb565b6106fd83611169565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fb251eb052afc73ffd02ffe85ad79990a8b3fed60d76dbc2fa2fdd7123dffd91490600090a2505050565b60006105de827fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756105d5565b60007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756102e3565b61079f610870565b6107a881610d32565b6107f6576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b6107ff826111e0565b61082b8260007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975610270565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f1ebe834e73d60a5fec822c1e1727d34bc79f2ad977ed504581cc1822fe20fb5b90600090a25050565b600061087a61125e565b905090565b60003073ffffffffffffffffffffffffffffffffffffffff8316148061092e57506040517fe43581b800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063e43581b890602401602060405180830381865afa15801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e91906114ab565b806105de57506040517f617b0b9d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260016024820152309063617b0b9d906044015b602060405180830381865afa1580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105de91906114ab565b6040517f5d7b590f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201523090635d7b590f90602401600060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b50505050610a707f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590565b600101546040517f1b09a28100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015290911690631b09a281906024015b600060405180830381600087803b158015610adf57600080fd5b505af1158015610af3573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b3f57600080fd5b505af1158015610b53573d6000803e3d6000fd5b5050505050565b6000610b6684846110ed565b9050818015610b73575080155b15610b7e5750505050565b80610be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e207365740000006044820152606401610236565b60018085018054600092610bf8916114fc565b81548110610c0857610c08611513565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110610c6457610c64611513565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480610cd257610cd2611542565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b60006105de826112aa565b60006105de82611328565b6000610d5484846110ed565b9050818015610d605750805b15610d6b5750505050565b8015610dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e20736574000000000000000000006044820152606401610236565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063a230c52490602401602060405180830381865afa158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906114ab565b610f4e576040517fca6d56dc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063ca6d56dc90602401600060405180830381600087803b158015610f3557600080fd5b505af1158015610f49573d6000803e3d6000fd5b505050505b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f1543455e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526201000090920490911690631543455e90602401610ac5565b6060600080848680549050610fe191906114fc565b8411610fed5783610ffa565b8554610ffa9086906114fc565b905060008167ffffffffffffffff81111561101757611017611571565b604051908082528060200260200182016040528015611040578160200160208202803683370190505b50905060005b828110156110d3578761105982896115a0565b8154811061106957611069611513565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106110a6576110a6611513565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101611046565b50806110df83886115a0565b935093505050935093915050565b60018201546000901561115f5773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061113757611137611513565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614611162565b60005b9392505050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517faf827ff700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063af827ff790602401610ac5565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f15190dcd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015262010000909204909116906315190dcd90602401610ac5565b6000601436108015906112755750611275336113a0565b156112a557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c52490602401610989565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092169063a230c52490602401610989565b6040517f572b6c0500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152600090309063572b6c0590602401610989565b60006020828403121561140757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461116257600080fd5b6000806040838503121561143e57600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b8281101561149c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161146a565b50505092019290925292915050565b6000602082840312156114bd57600080fd5b8151801515811461116257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561150e5761150e6114cd565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082198211156115b3576115b36114cd565b50019056fea2646970667358221220ee96ca93a9b5f2fd9d7e289cf6f619e19a1c4e6d0a87306a5e667cba64199aa264736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063a230c52411610081578063e43581b81161005b578063e43581b8146101ad578063e8c9fd45146101c0578063eecdac88146101c857600080fd5b8063a230c52414610164578063c6549ba414610187578063ca6d56dc1461019a57600080fd5b80633c4a25d0116100b25780633c4a25d0146100fe5780635a4c75d5146101115780639fef0c011461013257600080fd5b80630b1ca49a146100ce57806311aee380146100e3575b600080fd5b6100e16100dc3660046113f5565b6101db565b005b6100eb6102bf565b6040519081526020015b60405180910390f35b6100e161010c3660046113f5565b6102ec565b61012461011f36600461142b565b610424565b6040516100f592919061144d565b6101456101403660046113f5565b610462565b60408051825115158152602092830151151592810192909252016100f5565b6101776101723660046113f5565b6105ad565b60405190151581526020016100f5565b61012461019536600461142b565b6105e4565b6100e16101a83660046113f5565b610611565b6101776101bb3660046113f5565b610743565b6100eb61076f565b6100e16101d63660046113f5565b610797565b6101e3610870565b6101ec8161087f565b61023f576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b610248826109ca565b61027a8260007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b6001019190610b5a565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f6e76fb4c77256006d9c38ec7d82b45a8c8f3c27b1d6766fffc42dfb8de68449290600090a25050565b60007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b60020154919050565b6102f4610870565b6102fd81610d32565b61034b576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b8161035581610d3d565b6103a3576040517f6170384e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b6103d58360007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6001019190610d48565b6103de83610e3c565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fdc5a48d79e2e147530ff63ecdbed5a5a66adb9d5cf339384d5d076da197c40b590600090a2505050565b606060006104577fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629755b6002018585610fcc565b915091509250929050565b604080518082018252600080825260208201528151808301928390527fe43581b80000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff8316604483015290803063e43581b860648301602060405180830381865afa1580156104e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050b91906114ab565b151581526040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602090910190309063a230c52490602401602060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a391906114ab565b1515905292915050565b60006105de827fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb915b600101906110ed565b92915050565b606060006104577fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb9161044d565b610619610870565b6106228161087f565b610670576040517f8574fa9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b8161067a81610d3d565b6106c8576040517f06a0278c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b6106f48360007fd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb916103cb565b6106fd83611169565b60405173ffffffffffffffffffffffffffffffffffffffff8416907fb251eb052afc73ffd02ffe85ad79990a8b3fed60d76dbc2fa2fdd7123dffd91490600090a2505050565b60006105de827fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756105d5565b60007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd48629756102e3565b61079f610870565b6107a881610d32565b6107f6576040517f2021add900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610236565b6107ff826111e0565b61082b8260007fdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975610270565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f1ebe834e73d60a5fec822c1e1727d34bc79f2ad977ed504581cc1822fe20fb5b90600090a25050565b600061087a61125e565b905090565b60003073ffffffffffffffffffffffffffffffffffffffff8316148061092e57506040517fe43581b800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063e43581b890602401602060405180830381865afa15801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e91906114ab565b806105de57506040517f617b0b9d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260016024820152309063617b0b9d906044015b602060405180830381865afa1580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105de91906114ab565b6040517f5d7b590f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201523090635d7b590f90602401600060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b50505050610a707f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590565b600101546040517f1b09a28100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015290911690631b09a281906024015b600060405180830381600087803b158015610adf57600080fd5b505af1158015610af3573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b3f57600080fd5b505af1158015610b53573d6000803e3d6000fd5b5050505050565b6000610b6684846110ed565b9050818015610b73575080155b15610b7e5750505050565b80610be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e207365740000006044820152606401610236565b60018085018054600092610bf8916114fc565b81548110610c0857610c08611513565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110610c6457610c64611513565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480610cd257610cd2611542565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b60006105de826112aa565b60006105de82611328565b6000610d5484846110ed565b9050818015610d605750805b15610d6b5750505050565b8015610dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e20736574000000000000000000006044820152606401610236565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063a230c52490602401602060405180830381865afa158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906114ab565b610f4e576040517fca6d56dc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152309063ca6d56dc90602401600060405180830381600087803b158015610f3557600080fd5b505af1158015610f49573d6000803e3d6000fd5b505050505b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f1543455e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526201000090920490911690631543455e90602401610ac5565b6060600080848680549050610fe191906114fc565b8411610fed5783610ffa565b8554610ffa9086906114fc565b905060008167ffffffffffffffff81111561101757611017611571565b604051908082528060200260200182016040528015611040578160200160208202803683370190505b50905060005b828110156110d3578761105982896115a0565b8154811061106957611069611513565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106110a6576110a6611513565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101611046565b50806110df83886115a0565b935093505050935093915050565b60018201546000901561115f5773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061113757611137611513565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614611162565b60005b9392505050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517faf827ff700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063af827ff790602401610ac5565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517f15190dcd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015262010000909204909116906315190dcd90602401610ac5565b6000601436108015906112755750611275336113a0565b156112a557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c52490602401610989565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092169063a230c52490602401610989565b6040517f572b6c0500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152600090309063572b6c0590602401610989565b60006020828403121561140757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461116257600080fd5b6000806040838503121561143e57600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b8281101561149c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161146a565b50505092019290925292915050565b6000602082840312156114bd57600080fd5b8151801515811461116257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561150e5761150e6114cd565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082198211156115b3576115b36114cd565b50019056fea2646970667358221220ee96ca93a9b5f2fd9d7e289cf6f619e19a1c4e6d0a87306a5e667cba64199aa264736f6c634300080a0033", "devdoc": { "kind": "dev", "methods": { @@ -714,9 +664,6 @@ ] }, "events": { - "Approval(address,address,uint256)": { - "notice": "See `ERC20.Approval`." - }, "Burnt(uint256,string,address)": { "notice": "Emited whenever an burning happens in a FAST." }, @@ -749,9 +696,6 @@ }, "Minted(uint256,string,address)": { "notice": "Emited whenever an issuance happens in a FAST." - }, - "Transfer(address,address,uint256)": { - "notice": "See `ERC20.Transfer`." } }, "kind": "user", diff --git a/deployments/mumbai/FastAutomatonsFacet.json b/deployments/mumbai/FastAutomatonsFacet.json index d4395d94..5d1781e7 100644 --- a/deployments/mumbai/FastAutomatonsFacet.json +++ b/deployments/mumbai/FastAutomatonsFacet.json @@ -1,5 +1,5 @@ { - "address": "0x305C0e7E3BDD77Db1B7d9AdF3C8144644948D459", + "address": "0xbEb0F3628672727DC7e0764Dfc9107112d3f88D2", "abi": [ { "inputs": [ @@ -12,31 +12,6 @@ "name": "RequiresAutomatonsManager", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -289,31 +264,6 @@ "name": "Minted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, { "inputs": [ { @@ -450,44 +400,44 @@ "type": "function" } ], - "transactionHash": "0x81940f017e224d67ecb0fe83ce2d9b3acf88562888d811618ceeec209acc3fff", + "transactionHash": "0x5d7431ba2c7d8214cf3290ff758ff2badc546210dd60199a47f6cd27b4a95d0f", "receipt": { "to": "0x6DF2D25d8C6FD680730ee658b530A05a99BB769a", "from": "0x717634cfe06FFAB2CEAA7fcf1b9019813f4B25FE", "contractAddress": null, - "transactionIndex": 5, - "gasUsed": "722221", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000008000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", - "blockHash": "0x5d3804b9fad688723337a85f6cff9167f41f530b2ca3e03484d744940de0bccd", - "transactionHash": "0x81940f017e224d67ecb0fe83ce2d9b3acf88562888d811618ceeec209acc3fff", + "transactionIndex": 8, + "gasUsed": "722419", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", + "blockHash": "0x155b47d38ffe4c4e54522accd911fc0e38dfe2bb8042b5531a28ba77e3c257b0", + "transactionHash": "0x5d7431ba2c7d8214cf3290ff758ff2badc546210dd60199a47f6cd27b4a95d0f", "logs": [ { - "transactionIndex": 5, - "blockNumber": 37998156, - "transactionHash": "0x81940f017e224d67ecb0fe83ce2d9b3acf88562888d811618ceeec209acc3fff", + "transactionIndex": 8, + "blockNumber": 46174043, + "transactionHash": "0x5d7431ba2c7d8214cf3290ff758ff2badc546210dd60199a47f6cd27b4a95d0f", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000717634cfe06ffab2ceaa7fcf1b9019813f4b25fe", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" ], - "data": "0x0000000000000000000000000000000000000000000000000003d948c53b430000000000000000000000000000000000000000000000000014ce2a0d8b4b300b000000000000000000000000000000000000000000000ce11d8efd7a6c6307f400000000000000000000000000000000000000000000000014ca50c4c60fed0b000000000000000000000000000000000000000000000ce11d92d6c3319e4af4", - "logIndex": 14, - "blockHash": "0x5d3804b9fad688723337a85f6cff9167f41f530b2ca3e03484d744940de0bccd" + "data": "0x00000000000000000000000000000000000000000000000000066a9733af5b00000000000000000000000000000000000000000000000000139bc9d6b9c1f5a70000000000000000000000000000000000000000000023b6cd185734432457c900000000000000000000000000000000000000000000000013955f3f86129aa70000000000000000000000000000000000000000000023b6cd1ec1cb76d3b2c9", + "logIndex": 19, + "blockHash": "0x155b47d38ffe4c4e54522accd911fc0e38dfe2bb8042b5531a28ba77e3c257b0" } ], - "blockNumber": 37998156, - "cumulativeGasUsed": "1577732", + "blockNumber": 46174043, + "cumulativeGasUsed": "2374186", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 21, - "solcInputHash": "abd8ffc99037ef41cdad00fb626630ba", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresAutomatonsManager\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"privileges\",\"type\":\"uint32\"}],\"name\":\"AutomatonPrivilegesSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"}],\"name\":\"AutomatonRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"privilege\",\"type\":\"uint32\"}],\"name\":\"automatonCan\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"automatonCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"}],\"name\":\"automatonPrivileges\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"}],\"name\":\"isAutomaton\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateAutomatons\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"}],\"name\":\"removeAutomaton\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"privileges\",\"type\":\"uint32\"}],\"name\":\"setAutomatonPrivileges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"automatonCount()\":{\"returns\":{\"_0\":\"The number of automatons in this marketplace.\"}},\"automatonPrivileges(address)\":{\"params\":{\"automaton\":\"is the address to test.\"},\"returns\":{\"_0\":\"An `uint256` bitfield.\"}},\"isAutomaton(address)\":{\"params\":{\"candidate\":\"is the address to test.\"},\"returns\":{\"_0\":\"A `boolean` flag.\"}},\"paginateAutomatons(uint256,uint256)\":{\"params\":{\"cursor\":\"is the index at which to start.\",\"perPage\":\"is how many records should be returned at most.\"},\"returns\":{\"_0\":\"A `address[]` list of values at most `perPage` big.\",\"_1\":\"A `uint256` index to the next page.\"}},\"removeAutomaton(address)\":{\"params\":{\"candidate\":\"is the automaton to remove.\"}},\"setAutomatonPrivileges(address,uint32)\":{\"params\":{\"candidate\":\"is the automaton address to which the privileges should be assigned.\",\"privileges\":\"is a bitfield of privileges to apply.\"}}},\"title\":\"The Fast Smart Contract.\",\"version\":1},\"userdoc\":{\"errors\":{\"RequiresAutomatonsManager(address)\":[{\"notice\":\"Errors.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"notice\":\"See `ERC20.Approval`.\"},\"AutomatonPrivilegesSet(address,uint32)\":{\"notice\":\"Emited when an automaton is added or changed.\"},\"AutomatonRemoved(address)\":{\"notice\":\"Emited when an automaton is removed.\"},\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"},\"Transfer(address,address,uint256)\":{\"notice\":\"See `ERC20.Transfer`.\"}},\"kind\":\"user\",\"methods\":{\"automatonCount()\":{\"notice\":\"Counts the numbers of automatons present in this Fast.\"},\"automatonPrivileges(address)\":{\"notice\":\"Returns the privileges for a given automaton address, or zero if no privileges exist.\"},\"isAutomaton(address)\":{\"notice\":\"Queries whether a given address is an automaton for this Fast or not.\"},\"paginateAutomatons(uint256,uint256)\":{\"notice\":\"Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\"},\"removeAutomaton(address)\":{\"notice\":\"Removes an automaton completely.\"},\"setAutomatonPrivileges(address,uint32)\":{\"notice\":\"Sets privileges for a given automaton address.\"}},\"notice\":\"The Fast Automatons facet is in charge of keeping track of automaton accounts.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastAutomatonsFacet.sol\":\"FastAutomatonsFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x953780331b801357c0324bc901c9d11733823f3e424fde528eb9524f704499e0\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasGovernors.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(msg.sender) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(msg.sender) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xf7bd69c212ce87774af9365e3565993f253cabd67557d3a7d317e679d5b4385b\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(msg.sender) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(msg.sender) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xe9876fc4ec6dadc0d7e37e5562cb359b4b1dc6d188651893e73fc541be1e56a3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Transfer`.\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n /// @notice See `ERC20.Approval`.\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0xff980c3127905dd501245d89f5293d4ee16d0ef46cefea19f06e6915e178527c\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0x62cf23c6bccffebc753940b8f9260626f04455dd305736aee200d8d1545eb3e4\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title ERC20 standard as defined in the EIP.\\ninterface IERC20 {\\n /**\\n * @notice Allows to query the total number of tokens in circulation.\\n * @return An `uint256` representing how many tokens are currently in circulation.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Allows to query the balance of a given address.\\n * @param account is the address for which the balance shall be queried.\\n * @return An `uint256` - the balance for the given address.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @notice Moves `amount` tokens from the caller's account to `recipient`.\\n * @param recipient is the address to which the funds should be sent to, if successful.\\n * @param amount is the amount of tokens to transfef.\\n * @return A `bool` which value is `true` when the operation was successful.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner`\\n * through `transferFrom`. This is zero by default.\\n * @dev This value changes when `approve`, `disapprove` and `transferFrom` / `transferFromWithRef` are called.\\n * @param owner is the owner of the funds.\\n * @param spender is the address for which the allowance should be queried.\\n * @return A `uint256` representing the remaining allowance of `spender` over `owner`'s funds.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @notice Increases the allowance of `spender` by `amount`.\\n * @param spender is the address towards which the allowance should be given.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Attempts to transfer `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's allowance.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x79731c983219a24087d3bb925b9dd5c3cb3c85ebfdcd45afce5826bc2d53710f\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610c25806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063911a56cc1161005b578063911a56cc1461012e578063b70cc72a14610141578063b87c747514610154578063ccf90c74146101c457600080fd5b80633e39e4cf14610082578063617b0b9d1461009757806376a7383d1461010d575b600080fd5b610095610090366004610a07565b6101f4565b005b6100f86100a5366004610a07565b73ffffffffffffffffffffffffffffffffffffffff9190911660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918660205260409020541663ffffffff16151590565b60405190151581526020015b60405180910390f35b61012061011b366004610a47565b610325565b604051610104929190610a69565b61009561013c366004610ac7565b61035f565b6100f861014f366004610ac7565b61047c565b6101af610162366004610ac7565b73ffffffffffffffffffffffffffffffffffffffff1660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9186602052604090205463ffffffff1690565b60405163ffffffff9091168152602001610104565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918554604051908152602001610104565b336101fe816104ae565b610251576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918361029e7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848560016104b9565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff881690811790915590519092917f5fd56a5aab6279a81e4acca954bf23ce5ffea9c6351189f4faf647731c38dffa91a350505050565b606060006103547f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918585856105ad565b915091509250929050565b33610369816104ae565b6103b7576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610248565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91836104047f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848460006106ce565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000169055517f4592667aee797226527dbacd5953afb6e4fd4263ffc6f671efc0441b45b098d49190a2505050565b60006104a87f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9184836108a6565b92915050565b60006104a882610922565b60006104c584846108a6565b90508180156104d15750805b156104dc5750505050565b8015610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e20736574000000000000000000006044820152606401610248565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60606000808486805490506105c29190610b11565b84116105ce57836105db565b85546105db908690610b11565b905060008167ffffffffffffffff8111156105f8576105f8610b28565b604051908082528060200260200182016040528015610621578160200160208202803683370190505b50905060005b828110156106b4578761063a8289610b57565b8154811061064a5761064a610b6f565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061068757610687610b6f565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101610627565b50806106c08388610b57565b935093505050935093915050565b60006106da84846108a6565b90508180156106e7575080155b156106f25750505050565b80610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e207365740000006044820152606401610248565b6001808501805460009261076c91610b11565b8154811061077c5761077c610b6f565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8781168452918890526040808420549290911680845292208190556001870180549293509091839190839081106107d8576107d8610b6f565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905591871681529087905260408120556001860180548061084657610846610b9e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b6001820154600090156109185773ffffffffffffffffffffffffffffffffffffffff821660008181526020859052604090205460018501805490919081106108f0576108f0610b6f565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461091b565b60005b9392505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa1580156109ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a89190610bcd565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a0257600080fd5b919050565b60008060408385031215610a1a57600080fd5b610a23836109de565b9150602083013563ffffffff81168114610a3c57600080fd5b809150509250929050565b60008060408385031215610a5a57600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b82811015610ab857815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101610a86565b50505092019290925292915050565b600060208284031215610ad957600080fd5b61091b826109de565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015610b2357610b23610ae2565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008219821115610b6a57610b6a610ae2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060208284031215610bdf57600080fd5b8151801515811461091b57600080fdfea2646970667358221220c857a5404ca597dd3c32b92fd1315567f19bd513c2028e86e49f681ba866b89364736f6c634300080a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063911a56cc1161005b578063911a56cc1461012e578063b70cc72a14610141578063b87c747514610154578063ccf90c74146101c457600080fd5b80633e39e4cf14610082578063617b0b9d1461009757806376a7383d1461010d575b600080fd5b610095610090366004610a07565b6101f4565b005b6100f86100a5366004610a07565b73ffffffffffffffffffffffffffffffffffffffff9190911660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918660205260409020541663ffffffff16151590565b60405190151581526020015b60405180910390f35b61012061011b366004610a47565b610325565b604051610104929190610a69565b61009561013c366004610ac7565b61035f565b6100f861014f366004610ac7565b61047c565b6101af610162366004610ac7565b73ffffffffffffffffffffffffffffffffffffffff1660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9186602052604090205463ffffffff1690565b60405163ffffffff9091168152602001610104565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918554604051908152602001610104565b336101fe816104ae565b610251576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918361029e7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848560016104b9565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff881690811790915590519092917f5fd56a5aab6279a81e4acca954bf23ce5ffea9c6351189f4faf647731c38dffa91a350505050565b606060006103547f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918585856105ad565b915091509250929050565b33610369816104ae565b6103b7576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610248565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91836104047f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848460006106ce565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000169055517f4592667aee797226527dbacd5953afb6e4fd4263ffc6f671efc0441b45b098d49190a2505050565b60006104a87f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9184836108a6565b92915050565b60006104a882610922565b60006104c584846108a6565b90508180156104d15750805b156104dc5750505050565b8015610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e20736574000000000000000000006044820152606401610248565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60606000808486805490506105c29190610b11565b84116105ce57836105db565b85546105db908690610b11565b905060008167ffffffffffffffff8111156105f8576105f8610b28565b604051908082528060200260200182016040528015610621578160200160208202803683370190505b50905060005b828110156106b4578761063a8289610b57565b8154811061064a5761064a610b6f565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061068757610687610b6f565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101610627565b50806106c08388610b57565b935093505050935093915050565b60006106da84846108a6565b90508180156106e7575080155b156106f25750505050565b80610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e207365740000006044820152606401610248565b6001808501805460009261076c91610b11565b8154811061077c5761077c610b6f565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8781168452918890526040808420549290911680845292208190556001870180549293509091839190839081106107d8576107d8610b6f565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905591871681529087905260408120556001860180548061084657610846610b9e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b6001820154600090156109185773ffffffffffffffffffffffffffffffffffffffff821660008181526020859052604090205460018501805490919081106108f0576108f0610b6f565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461091b565b60005b9392505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa1580156109ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a89190610bcd565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a0257600080fd5b919050565b60008060408385031215610a1a57600080fd5b610a23836109de565b9150602083013563ffffffff81168114610a3c57600080fd5b809150509250929050565b60008060408385031215610a5a57600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b82811015610ab857815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101610a86565b50505092019290925292915050565b600060208284031215610ad957600080fd5b61091b826109de565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015610b2357610b23610ae2565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008219821115610b6a57610b6a610ae2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060208284031215610bdf57600080fd5b8151801515811461091b57600080fdfea2646970667358221220c857a5404ca597dd3c32b92fd1315567f19bd513c2028e86e49f681ba866b89364736f6c634300080a0033", + "numDeployments": 22, + "solcInputHash": "86d80cd7711949cd078774435b1d68c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresAutomatonsManager\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"privileges\",\"type\":\"uint32\"}],\"name\":\"AutomatonPrivilegesSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"}],\"name\":\"AutomatonRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"privilege\",\"type\":\"uint32\"}],\"name\":\"automatonCan\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"automatonCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"automaton\",\"type\":\"address\"}],\"name\":\"automatonPrivileges\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"}],\"name\":\"isAutomaton\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateAutomatons\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"}],\"name\":\"removeAutomaton\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"privileges\",\"type\":\"uint32\"}],\"name\":\"setAutomatonPrivileges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"automatonCount()\":{\"returns\":{\"_0\":\"The number of automatons in this marketplace.\"}},\"automatonPrivileges(address)\":{\"params\":{\"automaton\":\"is the address to test.\"},\"returns\":{\"_0\":\"An `uint256` bitfield.\"}},\"isAutomaton(address)\":{\"params\":{\"candidate\":\"is the address to test.\"},\"returns\":{\"_0\":\"A `boolean` flag.\"}},\"paginateAutomatons(uint256,uint256)\":{\"params\":{\"cursor\":\"is the index at which to start.\",\"perPage\":\"is how many records should be returned at most.\"},\"returns\":{\"_0\":\"A `address[]` list of values at most `perPage` big.\",\"_1\":\"A `uint256` index to the next page.\"}},\"removeAutomaton(address)\":{\"params\":{\"candidate\":\"is the automaton to remove.\"}},\"setAutomatonPrivileges(address,uint32)\":{\"params\":{\"candidate\":\"is the automaton address to which the privileges should be assigned.\",\"privileges\":\"is a bitfield of privileges to apply.\"}}},\"title\":\"The Fast Smart Contract.\",\"version\":1},\"userdoc\":{\"errors\":{\"RequiresAutomatonsManager(address)\":[{\"notice\":\"Errors.\"}]},\"events\":{\"AutomatonPrivilegesSet(address,uint32)\":{\"notice\":\"Emited when an automaton is added or changed.\"},\"AutomatonRemoved(address)\":{\"notice\":\"Emited when an automaton is removed.\"},\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"}},\"kind\":\"user\",\"methods\":{\"automatonCount()\":{\"notice\":\"Counts the numbers of automatons present in this Fast.\"},\"automatonPrivileges(address)\":{\"notice\":\"Returns the privileges for a given automaton address, or zero if no privileges exist.\"},\"isAutomaton(address)\":{\"notice\":\"Queries whether a given address is an automaton for this Fast or not.\"},\"paginateAutomatons(uint256,uint256)\":{\"notice\":\"Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\"},\"removeAutomaton(address)\":{\"notice\":\"Removes an automaton completely.\"},\"setAutomatonPrivileges(address,uint32)\":{\"notice\":\"Sets privileges for a given automaton address.\"}},\"notice\":\"The Fast Automatons facet is in charge of keeping track of automaton accounts.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastAutomatonsFacet.sol\":\"FastAutomatonsFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x32b378bdd83c63676854bbc408fbeea2471ba3821c888ec8703a963cbf5b4030\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasGovernors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Default implementation - points to `_msgSender()`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(_msgSender()) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(_msgSender()) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xd1f8fc31da0062248ab8f238b67e499ee0004232415aceaa8f4f4600fee16706\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasMembers.sol\\\";\\n\\n/**\\n * @title The Members behaviour abstract contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Default implementation - points to `msg.sender`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(_msgSender()) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(_msgSender()) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x92011882d076ba62aac90c181c8f374566ca5c683441570a7239fd89851e97ff\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0x64ac3bc4aaa8ea06efef19407baed93a5e960c2b822e732517efc2c991e96795\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InterfaceNotSupported(string);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0xd6da7364331de0a387574a44c5a4e7555b63cfe4baaca4dfef42c5d2345f0683\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\",\"keccak256\":\"0x8af6e7ffd7a4cbae707b539d4271f8a3e36e373ea1470706fe368b7e6e6c33f7\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c25806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063911a56cc1161005b578063911a56cc1461012e578063b70cc72a14610141578063b87c747514610154578063ccf90c74146101c457600080fd5b80633e39e4cf14610082578063617b0b9d1461009757806376a7383d1461010d575b600080fd5b610095610090366004610a07565b6101f4565b005b6100f86100a5366004610a07565b73ffffffffffffffffffffffffffffffffffffffff9190911660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918660205260409020541663ffffffff16151590565b60405190151581526020015b60405180910390f35b61012061011b366004610a47565b610325565b604051610104929190610a69565b61009561013c366004610ac7565b61035f565b6100f861014f366004610ac7565b61047c565b6101af610162366004610ac7565b73ffffffffffffffffffffffffffffffffffffffff1660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9186602052604090205463ffffffff1690565b60405163ffffffff9091168152602001610104565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918554604051908152602001610104565b336101fe816104ae565b610251576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918361029e7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848560016104b9565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff881690811790915590519092917f5fd56a5aab6279a81e4acca954bf23ce5ffea9c6351189f4faf647731c38dffa91a350505050565b606060006103547f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918585856105ad565b915091509250929050565b33610369816104ae565b6103b7576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610248565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91836104047f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848460006106ce565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000169055517f4592667aee797226527dbacd5953afb6e4fd4263ffc6f671efc0441b45b098d49190a2505050565b60006104a87f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9184836108a6565b92915050565b60006104a882610922565b60006104c584846108a6565b90508180156104d15750805b156104dc5750505050565b8015610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e20736574000000000000000000006044820152606401610248565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60606000808486805490506105c29190610b11565b84116105ce57836105db565b85546105db908690610b11565b905060008167ffffffffffffffff8111156105f8576105f8610b28565b604051908082528060200260200182016040528015610621578160200160208202803683370190505b50905060005b828110156106b4578761063a8289610b57565b8154811061064a5761064a610b6f565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061068757610687610b6f565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101610627565b50806106c08388610b57565b935093505050935093915050565b60006106da84846108a6565b90508180156106e7575080155b156106f25750505050565b80610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e207365740000006044820152606401610248565b6001808501805460009261076c91610b11565b8154811061077c5761077c610b6f565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8781168452918890526040808420549290911680845292208190556001870180549293509091839190839081106107d8576107d8610b6f565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905591871681529087905260408120556001860180548061084657610846610b9e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b6001820154600090156109185773ffffffffffffffffffffffffffffffffffffffff821660008181526020859052604090205460018501805490919081106108f0576108f0610b6f565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461091b565b60005b9392505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa1580156109ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a89190610bcd565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a0257600080fd5b919050565b60008060408385031215610a1a57600080fd5b610a23836109de565b9150602083013563ffffffff81168114610a3c57600080fd5b809150509250929050565b60008060408385031215610a5a57600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b82811015610ab857815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101610a86565b50505092019290925292915050565b600060208284031215610ad957600080fd5b61091b826109de565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015610b2357610b23610ae2565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008219821115610b6a57610b6a610ae2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060208284031215610bdf57600080fd5b8151801515811461091b57600080fdfea2646970667358221220398e017c367a5ed5e97057e59c5daa91f83da79225a65371540450b595466c8a64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063911a56cc1161005b578063911a56cc1461012e578063b70cc72a14610141578063b87c747514610154578063ccf90c74146101c457600080fd5b80633e39e4cf14610082578063617b0b9d1461009757806376a7383d1461010d575b600080fd5b610095610090366004610a07565b6101f4565b005b6100f86100a5366004610a07565b73ffffffffffffffffffffffffffffffffffffffff9190911660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918660205260409020541663ffffffff16151590565b60405190151581526020015b60405180910390f35b61012061011b366004610a47565b610325565b604051610104929190610a69565b61009561013c366004610ac7565b61035f565b6100f861014f366004610ac7565b61047c565b6101af610162366004610ac7565b73ffffffffffffffffffffffffffffffffffffffff1660009081527f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9186602052604090205463ffffffff1690565b60405163ffffffff9091168152602001610104565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918554604051908152602001610104565b336101fe816104ae565b610251576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918361029e7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848560016104b9565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff881690811790915590519092917f5fd56a5aab6279a81e4acca954bf23ce5ffea9c6351189f4faf647731c38dffa91a350505050565b606060006103547f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b918585856105ad565b915091509250929050565b33610369816104ae565b6103b7576040517f972aa5a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610248565b7f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91836104047f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b91848460006106ce565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260038301602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000169055517f4592667aee797226527dbacd5953afb6e4fd4263ffc6f671efc0441b45b098d49190a2505050565b60006104a87f3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9184836108a6565b92915050565b60006104a882610922565b60006104c584846108a6565b90508180156104d15750805b156104dc5750505050565b8015610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e20736574000000000000000000006044820152606401610248565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60606000808486805490506105c29190610b11565b84116105ce57836105db565b85546105db908690610b11565b905060008167ffffffffffffffff8111156105f8576105f8610b28565b604051908082528060200260200182016040528015610621578160200160208202803683370190505b50905060005b828110156106b4578761063a8289610b57565b8154811061064a5761064a610b6f565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061068757610687610b6f565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101610627565b50806106c08388610b57565b935093505050935093915050565b60006106da84846108a6565b90508180156106e7575080155b156106f25750505050565b80610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e207365740000006044820152606401610248565b6001808501805460009261076c91610b11565b8154811061077c5761077c610b6f565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8781168452918890526040808420549290911680845292208190556001870180549293509091839190839081106107d8576107d8610b6f565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905591871681529087905260408120556001860180548061084657610846610b9e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b6001820154600090156109185773ffffffffffffffffffffffffffffffffffffffff821660008181526020859052604090205460018501805490919081106108f0576108f0610b6f565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461091b565b60005b9392505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa1580156109ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a89190610bcd565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a0257600080fd5b919050565b60008060408385031215610a1a57600080fd5b610a23836109de565b9150602083013563ffffffff81168114610a3c57600080fd5b809150509250929050565b60008060408385031215610a5a57600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b82811015610ab857815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101610a86565b50505092019290925292915050565b600060208284031215610ad957600080fd5b61091b826109de565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015610b2357610b23610ae2565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008219821115610b6a57610b6a610ae2565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060208284031215610bdf57600080fd5b8151801515811461091b57600080fdfea2646970667358221220398e017c367a5ed5e97057e59c5daa91f83da79225a65371540450b595466c8a64736f6c634300080a0033", "devdoc": { "kind": "dev", "methods": { @@ -546,9 +496,6 @@ ] }, "events": { - "Approval(address,address,uint256)": { - "notice": "See `ERC20.Approval`." - }, "AutomatonPrivilegesSet(address,uint32)": { "notice": "Emited when an automaton is added or changed." }, @@ -575,9 +522,6 @@ }, "Minted(uint256,string,address)": { "notice": "Emited whenever an issuance happens in a FAST." - }, - "Transfer(address,address,uint256)": { - "notice": "See `ERC20.Transfer`." } }, "kind": "user", diff --git a/deployments/mumbai/FastTokenFacet.json b/deployments/mumbai/FastTokenFacet.json index 0658820d..4fc1e254 100644 --- a/deployments/mumbai/FastTokenFacet.json +++ b/deployments/mumbai/FastTokenFacet.json @@ -1,5 +1,5 @@ { - "address": "0xeB0e5aBfe38e825264be2ABeeC5D6148DD563439", + "address": "0x5Bce9610b96d50D71D8bD91a3DE858A96f6a5AFC", "abi": [ { "inputs": [], @@ -884,56 +884,49 @@ "type": "function" } ], - "transactionHash": "0x68d72c9e9f633c96abb639e33442e536ac778652e866eb3437ce43b3cc1556be", + "transactionHash": "0x7e61da0aa6ab4f6b2f67ae7eeccc7773bc6f134c9d34d4ea964f9871704c9fb5", "receipt": { "to": "0x6DF2D25d8C6FD680730ee658b530A05a99BB769a", "from": "0x717634cfe06FFAB2CEAA7fcf1b9019813f4B25FE", "contractAddress": null, - "transactionIndex": 9, - "gasUsed": "3170428", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000008000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", - "blockHash": "0x717de85d13d66c19778dfa1d069332452e9aef90368967f03746194b23d35d05", - "transactionHash": "0x68d72c9e9f633c96abb639e33442e536ac778652e866eb3437ce43b3cc1556be", + "transactionIndex": 5, + "gasUsed": "3171324", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", + "blockHash": "0x9dcce725cfcf4222cb358e57bc528a2f3688c3ea1cb703f1b80525e5eb271295", + "transactionHash": "0x7e61da0aa6ab4f6b2f67ae7eeccc7773bc6f134c9d34d4ea964f9871704c9fb5", "logs": [ { - "transactionIndex": 9, - "blockNumber": 37998159, - "transactionHash": "0x68d72c9e9f633c96abb639e33442e536ac778652e866eb3437ce43b3cc1556be", + "transactionIndex": 5, + "blockNumber": 46174046, + "transactionHash": "0x7e61da0aa6ab4f6b2f67ae7eeccc7773bc6f134c9d34d4ea964f9871704c9fb5", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000717634cfe06ffab2ceaa7fcf1b9019813f4b25fe", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" ], - "data": "0x0000000000000000000000000000000000000000000000000010e53b3016c40000000000000000000000000000000000000000000000000014ca50c4c55f9a3b000000000000000000000000000000000000000000000ce11da7321dcc5f8e5300000000000000000000000000000000000000000000000014b96b899548d63b000000000000000000000000000000000000000000000ce11db81758fc765253", - "logIndex": 13, - "blockHash": "0x717de85d13d66c19778dfa1d069332452e9aef90368967f03746194b23d35d05" + "data": "0x00000000000000000000000000000000000000000000000001414e88ff3d060400000000000000000000000000000000000000000000000013955f3f85623b770000000000000000000000000000000000000000000023b6cfc505bba5bfc22c000000000000000000000000000000000000000000000000125410b6862535730000000000000000000000000000000000000000000023b6d1065444a4fcc830", + "logIndex": 9, + "blockHash": "0x9dcce725cfcf4222cb358e57bc528a2f3688c3ea1cb703f1b80525e5eb271295" } ], - "blockNumber": 37998159, - "cumulativeGasUsed": "4269561", + "blockNumber": 46174046, + "cumulativeGasUsed": "3500493", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 23, - "solcInputHash": "abd8ffc99037ef41cdad00fb626630ba", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InternalMethod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequiresContinuousSupply\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"RequiresDifferentSenderAndRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresFastMembership\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresIssuerMembership\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresMarketplaceActiveMembership\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"}],\"name\":\"RequiresPositiveBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequiresTransfersEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresValidTokenHolder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"beforeRemovingMember\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"disapprove\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"givenAllowanceCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"holders\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateAllowancesByOwner\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateAllowancesBySpender\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performDisapproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"internalType\":\"struct FastTokenFacet.TransferArgs\",\"name\":\"p\",\"type\":\"tuple\"}],\"name\":\"performTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"receivedAllowanceCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"}],\"name\":\"retrieveDeadTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"transferFromWithRef\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"transferWithRef\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"This value changes when `approve`, `disapprove` and `transferFrom` / `transferFromWithRef` are called.\",\"params\":{\"owner\":\"is the owner of the funds.\",\"spender\":\"is the address for which the allowance should be queried.\"},\"returns\":{\"_0\":\"A `uint256` representing the remaining allowance of `spender` over `owner`'s funds.\"}},\"approve(address,uint256)\":{\"params\":{\"amount\":\"is how much to **increase** the allowance.\",\"spender\":\"is the address to allow spending from the caller's wallet.\"}},\"balanceOf(address)\":{\"params\":{\"owner\":\"The owners address to get the balance of.\"},\"returns\":{\"_0\":\"uint256 The current balance of this owner's account.\"}},\"burn(uint256,string)\":{\"params\":{\"amount\":\"The number of FAST tokens to mint.\",\"ref\":\"A reference for this minting operation.\"}},\"decimals()\":{\"returns\":{\"_0\":\"uint256 Number of decimals the FAST has.\"}},\"disapprove(address,uint256)\":{\"params\":{\"amount\":\"is how much to **decrease** the allowance.\",\"spender\":\"is the address to disallow spending from the caller's wallet.\"}},\"mint(uint256,string)\":{\"params\":{\"amount\":\"The number of FAST tokens to mint.\",\"ref\":\"A reference for this minting operation.\"}},\"name()\":{\"returns\":{\"_0\":\"string Name of the FAST.\"}},\"performApproval(address,address,uint256)\":{\"params\":{\"amount\":\"is how much to **increase** the current allowance by. Note: This function runs when amount is zero, and will emit.\",\"from\":\"is the wallet from which to give the allowance.\",\"spender\":\"is the receiver of the allowance.\"}},\"retrieveDeadTokens(address)\":{\"params\":{\"holder\":\"is the address for which to move the tokens from.\"}},\"symbol()\":{\"returns\":{\"_0\":\"string Symbol of the FAST.\"}},\"totalSupply()\":{\"returns\":{\"_0\":\"uint256 Total supply of the FAST.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"notice\":\"See `ERC20.Approval`.\"},\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"},\"Transfer(address,address,uint256)\":{\"notice\":\"See `ERC20.Transfer`.\"}},\"kind\":\"user\",\"methods\":{\"allowance(address,address)\":{\"notice\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through `transferFrom`. This is zero by default.\"},\"approve(address,uint256)\":{\"notice\":\"This method directly calls `performApproval`, setting its `from` paramter to the sender of the transaction.\"},\"balanceOf(address)\":{\"notice\":\"The balance of the passed owner (ERC20 standard).\"},\"burn(uint256,string)\":{\"notice\":\"Burns an amount of FAST tokens. A reference can be passed to identify why this happened for example. Business logic. - Modifiers: - Requires the caller to be a member of the Issuer contract. - Requires that the token has continuous supply. - Requires that there are enough funds in the reserve to cover for `amount` being burnt. - Decreases the reserve balance by `amount`. - Calls `FastHistoryFacet.burnt(amount, ref)`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Emits a `Burnt(amount, ref)`.\"},\"decimals()\":{\"notice\":\"The `decimals` of this FAST (ERC20 standard).\"},\"disapprove(address,uint256)\":{\"notice\":\"This method directly calls `performDisapproval`, setting its `from` parameter to the sender of the transaction.\"},\"mint(uint256,string)\":{\"notice\":\"Mints an amount of FAST tokens. A reference can be passed to identify why this happened for example. Business logic: - Modifiers: - Requires the caller to be a member of the Issuer contract. - Requires that either the token has continuous supply, or that no tokens have been minted yet. - Increases the reserve balance by `amount`. - Calls `FastHistoryFacet.minted`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Emits a `Minted(amount, ref)` event.\"},\"name()\":{\"notice\":\"The name of this FAST (ERC20 standard).\"},\"performApproval(address,address,uint256)\":{\"notice\":\"Increases the allowance given by `from` to `spender` by `amount`. Note that this function should run and emit even if the amount passed is zero. Business logic: - Modifiers: - Only facets of the current diamond should be able to call this. - Requires that `onlyTokenHolder` passes for the `from` address. - Requires that the `amount` is positive number. - Increases the allowance given by `from` to `spender` by `amount`. - Update the allowance lookup tables in both directions. - Emits an `Approval(from, spender, amount)`.\"},\"performDisapproval(address,address,uint256)\":{\"notice\":\"Decreases allowance given by `from` to `spender` by `amount`. Business logic: - Modifiers: - Only facets of the current diamond should be able to call this. - The allowance given by `from` to `spender` is decreased by `amount`. - Whether the allowance reached zero, stop tracking it by owner and by spender. - Emit a `Disapproval(from, spender, amount)` event. Note: This function runs when amount is zero, and will emit.\"},\"performTransfer((address,address,address,uint256,string))\":{\"notice\":\"This is the internal method that gets called whenever a transfer is initiated. Both `transfer`, `transferWithRef`, and their variants internally call this function. Business logic: - Modifiers: - Only facets of the current diamond should be able to call this. - Requires that transfers are enabled for this FAST. - Requires that `from` and `to` are different addresses. - Requires that `from` membership is active in the marketplace. - If `from` is not the reserve, requires that `from` is a valid token holder. - If `from` is the reserve, requires that the message sender is an issuer member. - Requires that `to` is a valid token holder. - Requires that the amount is a positive value. - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address, - The allowance given by the `from` address to the `spender` covers for the `amount`. - If we are **not** transfering **from** the reserve, - Decreases the allowance given by `from` to `spender`. - If the new allowance reaches zero, - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions. - Decreases the balance of the `owner` address. - Increases the balance of the `to` address by `amount`. - If we are **not** transfering **from** the reserve, - Requires that there are enough transfer credits to cover for `amount`. - Decreases the transfer credits by `amount`. - If the `to` address is the reserve, - Decreases the total supply by `amount`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Else, if the `from` address is the reserve, - Increases the total supply by `amount`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Calls `FastHistoryFacet.transfered`. - Emits a `Transfer(from, to, amount)` event.\"},\"retrieveDeadTokens(address)\":{\"notice\":\"Allows an Issuer member to move an arbitrary account's holdings back to the reserve, as per regulatory requirements. Business logic: - Modifiers: - Requires that the caller is a member of the Issuer contract. - If the amount held by `holder` is not zero - The balance of `holder` should be set to zero. - The reserve's balance should be increased by how much was on the holder's account. - Total supply should be decreased by that amount too. - The `holder`'s address should not be tracked as a token holder in this FAST anymore. - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore. - A `Transfer(holder, reserve, amount)` event should be emited. - If the amount previously held by `holder` was not zero, - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\"},\"symbol()\":{\"notice\":\"The symbol of this FAST (ERC20 standard).\"},\"totalSupply()\":{\"notice\":\"The total supply of the FAST (ERC20 standard).\"},\"transfer(address,uint256)\":{\"notice\":\"See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. \"},\"transferFrom(address,address,uint256)\":{\"notice\":\"See `performTransfer`, the `ref` will be defaulted.\"},\"transferFromWithRef(address,address,uint256,string)\":{\"notice\":\"See `performTransfer`.\"},\"transferWithRef(address,uint256,string)\":{\"notice\":\"See `performTransfer`, the spender will be equal to the `owner`. \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastTokenFacet.sol\":\"FastTokenFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x953780331b801357c0324bc901c9d11733823f3e424fde528eb9524f704499e0\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasGovernors.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(msg.sender) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(msg.sender) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xf7bd69c212ce87774af9365e3565993f253cabd67557d3a7d317e679d5b4385b\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(msg.sender) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(msg.sender) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xe9876fc4ec6dadc0d7e37e5562cb359b4b1dc6d188651893e73fc541be1e56a3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"../marketplace/MarketplaceAccessFacet.sol\\\";\\nimport \\\"../issuer/IssuerAccessFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The FAST Access facet is the source of truth when it comes to\\n * permissioning and ACLs within a given FAST.\\n */\\ncontract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n /// Structs.\\n\\n /**\\n * @notice This structure isn't used anywhere in storage. Instead, it\\n * allows various methods of the contract to return all the flags\\n * associated with a given address in one go.\\n */\\n struct Flags {\\n /// @notice Whether or not the item in scope is considered a governor of this FAST.\\n bool isGovernor;\\n /// @notice Whether or not the item in scope is considered a member of this FAST.\\n bool isMember;\\n }\\n\\n /// AHasGovernors implementation.\\n\\n function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n\\n function isValidGovernor(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onGovernorAdded(address governor) internal override(AHasGovernors) {\\n // If the governor isn't a FAST member yet, add them.\\n if (!AHasMembers(this).isMember(governor)) AHasMembers(this).addMember(governor);\\n // Notify issuer that this governor was added to this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorAddedToFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onGovernorRemoved(address governor) internal override(AHasGovernors) {\\n // Notify issuer that this governor was removed from this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorRemovedFromFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return\\n // The current contract should be able to manage its own members.\\n address(this) == who ||\\n // Governors can manage members.\\n AHasGovernors(this).isGovernor(who) ||\\n // Automatons with the correct privilege can manage members.\\n AHasAutomatons(address(this)).automatonCan(who, FAST_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal view override(AHasMembers) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onMemberAdded(address member) internal override(AHasMembers) {\\n // Notify marketplace that this member was added to this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberAddedToFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onMemberRemoved(address member) internal override(AHasMembers) {\\n // Notify token facet that this member was removed.\\n FastTokenFacet(address(this)).beforeRemovingMember(member);\\n // Notify marketplace that this member was removed from this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberRemovedFromFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// Flags.\\n\\n /**\\n * @notice Retrieves flags for a given address.\\n * @param a is the address to retrieve flags for.\\n * @return A `Flags` struct.\\n */\\n function flags(address a) external view returns (Flags memory) {\\n return Flags({isGovernor: AHasGovernors(address(this)).isGovernor(a), isMember: AHasMembers(this).isMember(a)});\\n }\\n}\\n\",\"keccak256\":\"0x50e406e05c99d2240cdd8ce53f94ddc868fee0482aabc8d9c6596fc3d9fb2a00\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/FastFrontendFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"./lib/LibFastDistributions.sol\\\";\\nimport \\\"./lib/LibFastCrowdfunds.sol\\\";\\n\\n/**\\n * @notice A facet dedicated to view / UI only methods. This facet should never hold any method that\\n * is not either `pure` or `view`, except to emit events.\\n */\\ncontract FastFrontendFacet is AFastFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Data structures.\\n\\n /**\\n * @notice This struct groups the common attributes of a FAST.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n /// @notice The `address` of the FAST.\\n address addr;\\n /// @notice The `name` of the FAST (ERC20).\\n string name;\\n /// @notice The `symbol` of the FAST (ERC20).\\n string symbol;\\n /// @notice The `decimals` of the FAST (ERC20).\\n uint8 decimals;\\n /// @notice The `totalSupply` of the FAST (ERC20).\\n uint256 totalSupply;\\n /// @notice Whether the FAST is semi public or not.\\n bool isSemiPublic;\\n /// @notice Whether the FAST has a fixed supply or continious.\\n bool hasFixedSupply;\\n /// @notice Whether the transfers are enabled or not for this FAST.\\n bool transfersDisabled;\\n /// @notice The default crowdfunds basis point fee.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n /// @notice The reserve balance.\\n uint256 reserveBalance;\\n /// @notice The number of members the FAST has.\\n uint256 memberCount;\\n /// @notice The number of governors for the FAST.\\n uint256 governorCount;\\n }\\n\\n /**\\n * @notice Member level details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct PrivilegesDetails {\\n /// @notice The Member's address.\\n address addr;\\n /// @notice The Member's balance.\\n uint256 balance;\\n /// @notice The Member's ETH balance.\\n uint256 ethBalance;\\n /// @notice Whether or not the address is a Member.\\n bool isMember;\\n /// @notice Whether or not the address is a Governor.\\n bool isGovernor;\\n /// @notice Automaton flags assigned to this address.\\n uint32 automatonPrivileges;\\n }\\n\\n /// Emitters.\\n\\n /**\\n * @notice Called by diamond facets, signals that FAST details may have changed.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be another facet of the diamond.\\n * Emits `DetailsChanged`, see `IFastEvents.DetailsChanged`\\n */\\n function emitDetailsChanged() external onlyDiamondFacet {\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n emit DetailsChanged({\\n transfersDisabled: LibFast.data().transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n memberCount: LibHasMembers.data().memberSet.values.length,\\n governorCount: LibHasGovernors.data().governorSet.values.length,\\n totalSupply: tokenData.totalSupply,\\n reserveBalance: tokenData.balances[LibHelpers.ZERO_ADDRESS]\\n });\\n }\\n\\n /// Public functions.\\n\\n /**\\n * @notice Gets the details of a FAST.\\n * @return The details for the current FAST, see `Details`.\\n */\\n function details() public view returns (Details memory) {\\n LibFast.Data storage topStorage = LibFast.data();\\n LibFastToken.Data storage tokenStorage = LibFastToken.data();\\n return\\n Details({\\n addr: address(this),\\n name: tokenStorage.name,\\n symbol: tokenStorage.symbol,\\n decimals: tokenStorage.decimals,\\n totalSupply: tokenStorage.totalSupply,\\n isSemiPublic: topStorage.isSemiPublic,\\n hasFixedSupply: topStorage.hasFixedSupply,\\n transfersDisabled: topStorage.transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n reserveBalance: tokenStorage.balances[LibHelpers.ZERO_ADDRESS],\\n memberCount: AHasMembers(address(this)).memberCount(),\\n governorCount: LibHasGovernors.data().governorSet.values.length\\n });\\n }\\n\\n /**\\n * @notice Gets detailed address privileges details.\\n * @param addr The address to get the privileges for.\\n * @return A FAST member's details, see `MemberDetails`.\\n */\\n function detailedPrivileges(address addr) public view returns (PrivilegesDetails memory) {\\n return\\n PrivilegesDetails({\\n addr: addr,\\n balance: LibFastToken.data().balances[addr],\\n ethBalance: (payable(addr).balance),\\n isMember: AHasMembers(address(this)).isMember(addr),\\n isGovernor: AHasGovernors(address(this)).isGovernor(addr),\\n automatonPrivileges: AHasAutomatons(address(this)).automatonPrivileges(addr)\\n });\\n }\\n\\n function paginateDetailedMembers(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n LibHasMembers.Data storage membersData = LibHasMembers.data();\\n (address[] memory members, uint256 nextCursor) = LibPaginate.addresses(membersData.memberSet.values, index, perPage);\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](members.length);\\n uint256 length = members.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(members[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedGovernors(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n (address[] memory governors, uint256 nextCursor) = LibPaginate.addresses(\\n LibHasGovernors.data().governorSet.values,\\n index,\\n perPage\\n );\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](governors.length);\\n uint256 length = governors.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(governors[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedDistributions(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Distribution.Details[] memory, uint256) {\\n (address[] memory distributions, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastDistributions.data().distributionSet.values,\\n index,\\n perPage\\n );\\n Distribution.Details[] memory values = new Distribution.Details[](distributions.length);\\n uint256 length = distributions.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Distribution(distributions[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n /**\\n * @dev Paginates detailed crowdfunds.\\n * @param index The index of the first crowdfund to return.\\n * @param perPage The number of crowdfunds to return.\\n * @return An array of crowdfund details, see `CrowdfundDetails`.\\n */\\n function paginateDetailedCrowdfunds(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Crowdfund.Details[] memory, uint256) {\\n (address[] memory crowdfunds, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastCrowdfunds.data().crowdfundSet.values,\\n index,\\n perPage\\n );\\n Crowdfund.Details[] memory values = new Crowdfund.Details[](crowdfunds.length);\\n uint256 length = crowdfunds.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Crowdfund(crowdfunds[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n}\\n\",\"keccak256\":\"0xdf236a27eb3441e06a4d9aa972a1677f4aed718cb4028f13462bfc7c87670729\",\"license\":\"MIT\"},\"contracts/fast/FastHistoryFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastHistory.sol\\\";\\n\\n/**\\n * @notice Although past events could be scrapped from the chain, we want to\\n * the frontend to be capable of listing past transfers and minting / burning events.\\n * This facet is in charge of performing archival of these things.\\n */\\ncontract FastHistoryFacet is AFastFacet {\\n /// Minting history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are minted.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Mint` on top of the stack.\\n */\\n function minted(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the mint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Mint, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are burnt.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Burn` on top of the stack.\\n */\\n function burnt(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the unmint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Burn, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice Returns the number of supply proofs (minting and burning together) ever created.\\n * @return A `uint256`.\\n */\\n function supplyProofCount() external view returns (uint256) {\\n return LibFastHistory.data().supplyProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of supply proofs (minting and burning together).\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.SupplyProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateSupplyProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n return LibPaginate.supplyProofs(LibFastHistory.data().supplyProofs, cursor, perPage);\\n }\\n\\n /// Transfer history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever a transfer has completed successfuly.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Keeps track of the operation in various tracking structures, so that it can be queried later by `sender` and `recipient`.\\n * - Pushes a transfer proof to the main transfer proof tracking stack.\\n */\\n function transfered(\\n address spender,\\n address from,\\n address to,\\n uint256 amount,\\n string calldata ref\\n ) external onlyDiamondFacet {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n // Keep track of the transfer proof ID for the sender and for the recipient.\\n s.transferProofInvolvements[from].push(s.transferProofs.length);\\n s.transferProofInvolvements[to].push(s.transferProofs.length);\\n // Keep track of the transfer proof globally.\\n s.transferProofs.push(\\n LibFastHistory.TransferProof({\\n spender: spender,\\n from: from,\\n to: to,\\n amount: amount,\\n blockNumber: block.number,\\n ref: ref\\n })\\n );\\n }\\n\\n /**\\n * @notice Returns the number of transfer proofs ever created.\\n * @return A `uint256`.\\n */\\n function transferProofCount() external view returns (uint256) {\\n return LibFastHistory.data().transferProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of transfer proofs.\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateTransferProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n return LibPaginate.transferProofs(LibFastHistory.data().transferProofs, cursor, perPage);\\n }\\n\\n /**\\n * @notice Counts all past inbound and outbound transfers involving a given address.\\n * @param involvee is the address for which to get the transfer proofs.\\n */\\n function transferProofByInvolveeCount(address involvee) external view returns (uint256) {\\n return LibFastHistory.data().transferProofInvolvements[involvee].length;\\n }\\n\\n /**\\n * @notice Returns pages of indices of past inbound and outbound transfer proofs by involvee.\\n * @dev This function is reading from an indexing data structure. Each index points to a record\\n * in the main transfer proof storage, and can then be found in `transferProofs` at returned indices.\\n * @param involvee is the address for which to retrieve a page of data.\\n * @param cursor is where to start.\\n * @param perPage is how many records at most should be returned.\\n */\\n function paginateTransferProofIndicesByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (uint256[] memory, uint256) {\\n return LibPaginate.uint256s(LibFastHistory.data().transferProofInvolvements[involvee], cursor, perPage);\\n }\\n\\n /**\\n * @notice Returns a page of inbound and outbound transfer proofs based on an involvee.#\\n * @param involvee is the address for which to fetch the data.\\n * @param cursor is where to start.\\n * @param perPage is how many items at most to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing the results and the cursor to the next page.\\n */\\n function paginateTransferProofsByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n uint256[] storage collection = s.transferProofInvolvements[involvee];\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = s.transferProofs[collection[cursor + i]];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0x6c517db2a7885a0991311827bb240e6003e1ceabe24f7d7fd245b3c0b0b5e08b\",\"license\":\"MIT\"},\"contracts/fast/FastTokenFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../lib/LibDiamond.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"../marketplace/MarketplaceTokenHoldersFacet.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastAccessFacet.sol\\\";\\nimport \\\"./FastHistoryFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\n\\ncontract FastTokenFacet is AFastFacet, IERC20 {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Constants.\\n\\n string internal constant DEAD_TOKENS_RETRIEVAL = \\\"Dead tokens retrieval\\\";\\n\\n /// Minting methods.\\n\\n /**\\n * @notice Mints an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that either the token has continuous supply, or that no tokens have been minted yet.\\n * - Increases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.minted`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Minted(amount, ref)` event.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function mint(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // We want to make sure that either of these two is true:\\n // - The token doesn't have fixed supply.\\n // - The token has fixed supply but has no tokens yet (First and only mint).\\n if (FastTopFacet(address(this)).hasFixedSupply() && (s.totalSupply != 0 || this.balanceOf(address(0)) != 0))\\n revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Prepare the minted amount on the zero address.\\n s.balances[address(0)] += amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).minted(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Minted(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Burns an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic.\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that the token has continuous supply.\\n * - Requires that there are enough funds in the reserve to cover for `amount` being burnt.\\n * - Decreases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.burnt(amount, ref)`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Burnt(amount, ref)`.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function burn(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n if (FastTopFacet(address(this)).hasFixedSupply()) revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Remove the minted amount from the zero address.\\n s.balances[address(0)] -= amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).burnt(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Burnt(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Allows an Issuer member to move an arbitrary account's holdings back to the reserve,\\n * as per regulatory requirements.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires that the caller is a member of the Issuer contract.\\n * - If the amount held by `holder` is not zero\\n * - The balance of `holder` should be set to zero.\\n * - The reserve's balance should be increased by how much was on the holder's account.\\n * - Total supply should be decreased by that amount too.\\n * - The `holder`'s address should not be tracked as a token holder in this FAST anymore.\\n * - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore.\\n * - A `Transfer(holder, reserve, amount)` event should be emited.\\n * - If the amount previously held by `holder` was not zero,\\n * - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\\n * @param holder is the address for which to move the tokens from.\\n */\\n function retrieveDeadTokens(address holder) external onlyIssuerMember {\\n // Cache how many tokens the holder has.\\n uint256 amount = balanceOf(holder);\\n // Note: The amount **can** be zero in this function.\\n\\n // Grab a pointer to the token storage.\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // These should only run if the amount is zero, as they result in a no-op.\\n if (amount > 0) {\\n // Set the holder balance to zero.\\n s.balances[holder] = 0;\\n // Increment the reserve's balance.\\n s.balances[address(0)] += amount;\\n // The tokens aren't in circulation anymore - decrease total supply.\\n s.totalSupply -= amount;\\n }\\n\\n // Since the holder's account is now empty, make sure to keep track of it both\\n // in this FAST and in the marketplace.\\n s.tokenHolders.remove(holder, true);\\n MarketplaceTokenHoldersFacet(LibFast.data().marketplace).fastBalanceChanged(holder, 0);\\n\\n // Keep track of this transfer in history facet.\\n FastHistoryFacet(address(this)).transfered(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n\\n // This operation can be seen as a regular transfer between holder and reserve. Emit.\\n emit FastTransfer(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n emit Transfer(holder, address(0), amount);\\n\\n // If amount wasn't zero, total supply and reserve balance have changed - emit.\\n if (amount > 0) FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n // ERC20 implementation and transfer related methods.\\n\\n /**\\n * @notice The name of this FAST (ERC20 standard).\\n * @return string Name of the FAST.\\n */\\n function name() external view returns (string memory) {\\n return LibFastToken.data().name;\\n }\\n\\n /**\\n * @notice The symbol of this FAST (ERC20 standard).\\n * @return string Symbol of the FAST.\\n */\\n function symbol() external view returns (string memory) {\\n return LibFastToken.data().symbol;\\n }\\n\\n /**\\n * @notice The `decimals` of this FAST (ERC20 standard).\\n * @return uint256 Number of decimals the FAST has.\\n */\\n function decimals() external view returns (uint256) {\\n return LibFastToken.data().decimals;\\n }\\n\\n /**\\n * @notice The total supply of the FAST (ERC20 standard).\\n * @return uint256 Total supply of the FAST.\\n */\\n function totalSupply() external view override(IERC20) returns (uint256) {\\n return LibFastToken.data().totalSupply;\\n }\\n\\n /**\\n * @notice The balance of the passed owner (ERC20 standard).\\n * @param owner The owners address to get the balance of.\\n * @return uint256 The current balance of this owner's account.\\n */\\n function balanceOf(address owner) public view override(IERC20) returns (uint256) {\\n return LibFastToken.data().balances[owner];\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. */\\n function transfer(address to, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(\\n TransferArgs({\\n spender: msg.sender,\\n from: msg.sender,\\n to: to,\\n amount: amount,\\n ref: LibFastToken.DEFAULT_TRANSFER_REFERENCE\\n })\\n );\\n return true;\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`. */\\n function transferWithRef(address to, uint256 amount, string calldata ref) external returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: msg.sender, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view override(IERC20) returns (uint256) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // If the allowance being queried is owned by the reserve, and `spender` is\\n // an Issuer member, `spender` owns the full balance of `owner`. If they are\\n // not an Issuer member then their allowance is zero. Otherwise, the regular given\\n // allowance for `spender` over `owner` applies.\\n if (owner == address(0)) return AHasMembers(LibFast.data().issuer).isMember(spender) ? s.balances[owner] : 0;\\n else return s.allowances[owner][spender];\\n }\\n\\n /**\\n * @notice This method directly calls `performApproval`, setting its `from` paramter to the sender of\\n * the transaction.\\n * @param spender is the address to allow spending from the caller's wallet.\\n * @param amount is how much to **increase** the allowance.\\n */\\n function approve(address spender, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performApproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice This method directly calls `performDisapproval`, setting its `from` parameter to the sender of\\n * the transaction.\\n * @param spender is the address to disallow spending from the caller's wallet.\\n * @param amount is how much to **decrease** the allowance.\\n */\\n function disapprove(address spender, uint256 amount) external onlyMember(msg.sender) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performDisapproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`, the `ref` will be defaulted.\\n function transferFrom(address from, address to, uint256 amount) external override(IERC20) returns (bool) {\\n transferFromWithRef(from, to, amount, LibFastToken.DEFAULT_TRANSFER_REFERENCE);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`.\\n function transferFromWithRef(address from, address to, uint256 amount, string memory ref) public returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: from, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n // Allowances query operations.\\n\\n function givenAllowanceCount(address owner) external view returns (uint256) {\\n return LibFastToken.data().allowancesByOwner[owner].values.length;\\n }\\n\\n function paginateAllowancesByOwner(\\n address owner,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesByOwner[owner].values, index, perPage);\\n }\\n\\n function receivedAllowanceCount(address spender) external view returns (uint256) {\\n return LibFastToken.data().allowancesBySpender[spender].values.length;\\n }\\n\\n function paginateAllowancesBySpender(\\n address spender,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesBySpender[spender].values, index, perPage);\\n }\\n\\n // These functions would be internal / private if we weren't using the diamond pattern.\\n // Instead, they're `onlyDiamondFacet` - eg can only be called by facets of the current\\n // FAST.\\n\\n struct TransferArgs {\\n address spender;\\n address from;\\n address to;\\n uint256 amount;\\n string ref;\\n }\\n\\n /**\\n * @notice This is the internal method that gets called whenever a transfer is initiated. Both `transfer`,\\n * `transferWithRef`, and their variants internally call this function.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that transfers are enabled for this FAST.\\n * - Requires that `from` and `to` are different addresses.\\n * - Requires that `from` membership is active in the marketplace.\\n * - If `from` is not the reserve, requires that `from` is a valid token holder.\\n * - If `from` is the reserve, requires that the message sender is an issuer member.\\n * - Requires that `to` is a valid token holder.\\n * - Requires that the amount is a positive value.\\n * - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address,\\n * - The allowance given by the `from` address to the `spender` covers for the `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Decreases the allowance given by `from` to `spender`.\\n * - If the new allowance reaches zero,\\n * - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions.\\n * - Decreases the balance of the `owner` address.\\n * - Increases the balance of the `to` address by `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Requires that there are enough transfer credits to cover for `amount`.\\n * - Decreases the transfer credits by `amount`.\\n * - If the `to` address is the reserve,\\n * - Decreases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Else, if the `from` address is the reserve,\\n * - Increases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Calls `FastHistoryFacet.transfered`.\\n * - Emits a `Transfer(from, to, amount)` event.\\n */\\n function performTransfer(TransferArgs calldata p) external onlyDiamondFacet {\\n // TODO: Make this function return instead of raising errors.\\n\\n // Grab a pointer to our top-level storage.\\n LibFast.Data storage topData = LibFast.data();\\n\\n // Requires that transfers are enabled for this FAST.\\n if (FastTopFacet(address(this)).transfersDisabled()) revert ICustomErrors.RequiresTransfersEnabled();\\n // Requires that `from` and `to` are different addresses.\\n else if (p.from == p.to) revert ICustomErrors.RequiresDifferentSenderAndRecipient(p.from);\\n // Requires that allowance transfers from the reserve are performed by issuer members only.\\n else if (p.from == address(0) && !AHasMembers(topData.issuer).isMember(p.spender))\\n revert ICustomErrors.RequiresIssuerMembership(p.spender);\\n // Requires that the `from` address can hold tokens.\\n else if (!canHoldTokens(p.from)) revert ICustomErrors.RequiresValidTokenHolder(p.from);\\n // Requires that the `from` address marketplace membership is active if not the reserve.\\n else if (p.from != address(0) && !IHasActiveMembers(LibFast.data().marketplace).isActiveMember(p.from))\\n revert ICustomErrors.RequiresMarketplaceActiveMembership(p.from);\\n // Requires that the `to` address can hold tokens.\\n else if (!canHoldTokens(p.to)) revert ICustomErrors.RequiresValidTokenHolder(p.to);\\n\\n // For any non-zero amount, update balances and allowances, notify other contracts, etc.\\n if (p.amount != 0) {\\n // Grab a pointer to our token storage.\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n\\n // If this is an allowance transfer and if the `from` account is not the reserve...\\n if (p.spender != p.from && p.from != address(0)) {\\n // Decrease allowance.\\n uint256 newAllowance = tokenData.allowances[p.from][p.spender] -= p.amount;\\n // If the allowance reached zero, we want to remove that allowance from\\n // the various other places where we keep track of it.\\n if (newAllowance == 0) {\\n tokenData.allowancesByOwner[p.from].remove(p.spender, true);\\n tokenData.allowancesBySpender[p.spender].remove(p.from, true);\\n }\\n }\\n\\n // Keep track of the balances - `from` spends (decrease), `to` receives (increase).\\n uint256 fromBalance = (tokenData.balances[p.from] -= p.amount);\\n uint256 toBalance = (tokenData.balances[p.to] += p.amount);\\n\\n // Keep track of who has what FAST.\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.from, fromBalance);\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.to, toBalance);\\n\\n // Keep track of who holds this token.\\n balanceChanged(p.from, fromBalance);\\n balanceChanged(p.to, toBalance);\\n\\n // If the funds are going to the reserve...\\n if (p.to == address(0)) {\\n // Decrease total supply.\\n tokenData.totalSupply -= p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n // If the funds are moving from the zero address...\\n else if (p.from == address(0)) {\\n // Increase total supply.\\n tokenData.totalSupply += p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n // Keep track of the transfer in the history facet.\\n FastHistoryFacet(address(this)).transfered(p.spender, p.from, p.to, p.amount, p.ref);\\n\\n // Emit!\\n emit FastTransfer(p.spender, p.from, p.to, p.amount, p.ref);\\n emit Transfer(p.from, p.to, p.amount);\\n }\\n\\n /**\\n * @notice Increases the allowance given by `from` to `spender` by `amount`.\\n * Note that this function should run and emit even if the amount passed is zero.\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that `onlyTokenHolder` passes for the `from` address.\\n * - Requires that the `amount` is positive number.\\n * - Increases the allowance given by `from` to `spender` by `amount`.\\n * - Update the allowance lookup tables in both directions.\\n * - Emits an `Approval(from, spender, amount)`.\\n * @param from is the wallet from which to give the allowance.\\n * @param spender is the receiver of the allowance.\\n * @param amount is how much to **increase** the current allowance by.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performApproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n // Allowance cannot be given over the reserve.\\n if (from == address(0)) revert ICustomErrors.UnsupportedOperation();\\n // Require that the `from` address can hold tokens.\\n else if (!canHoldTokens(from)) revert ICustomErrors.RequiresValidTokenHolder(from);\\n\\n if (amount > 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // Note that we are not exactly following ERC20 here - we don't want to **set** the allowance to `amount`\\n // to mitigate a possible attack.\\n // See https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.gmr6zdg47087.\\n s.allowances[from][spender] += amount;\\n // Keep track of given and received allowances.\\n s.allowancesByOwner[from].add(spender, true);\\n s.allowancesBySpender[spender].add(from, true);\\n }\\n\\n // Emit!\\n emit Approval(from, spender, amount);\\n }\\n\\n /**\\n * @notice Decreases allowance given by `from` to `spender` by `amount`.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - The allowance given by `from` to `spender` is decreased by `amount`.\\n * - Whether the allowance reached zero, stop tracking it by owner and by spender.\\n * - Emit a `Disapproval(from, spender, amount)` event.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performDisapproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n if (amount != 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove allowance.\\n s.allowances[from][spender] -= amount;\\n\\n // Whenever the allowance reaches zero, stop tracking it by owner and spender.\\n if (s.allowances[from][spender] == 0) {\\n s.allowancesByOwner[from].remove(spender, true);\\n s.allowancesBySpender[spender].remove(from, true);\\n }\\n }\\n\\n // Emit!\\n emit Disapproval(from, spender, amount);\\n }\\n\\n // WARNING: This method contains two loops. We know that this should never\\n // happen in solidity. However:\\n // - In the context of our private chain, gas is cheap.\\n // - It can only be called by a governor.\\n function beforeRemovingMember(address member) external onlyDiamondFacet {\\n if (balanceOf(member) != 0) revert ICustomErrors.RequiresPositiveBalance(member);\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove all given allowances.\\n {\\n address[] storage gaData = s.allowancesByOwner[member].values;\\n while (gaData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address spender = gaData[0];\\n this.performDisapproval(member, spender, s.allowances[member][spender]);\\n }\\n }\\n\\n // Remove all received allowances.\\n {\\n address[] storage raData = s.allowancesBySpender[member].values;\\n while (raData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address owner = raData[0];\\n this.performDisapproval(owner, member, s.allowances[owner][member]);\\n }\\n }\\n }\\n\\n function holders() external view returns (address[] memory) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n return s.tokenHolders.values;\\n }\\n\\n function balanceChanged(address holder, uint256 balance) private {\\n // Return early if this is the zero address.\\n if (holder == address(0)) return;\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.tokenHolders.contains(holder))\\n s.tokenHolders.add(holder, false);\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.tokenHolders.contains(holder)) s.tokenHolders.remove(holder, false);\\n }\\n\\n // Private and helper methods.\\n\\n /**\\n * @notice Ensures that the given address is a member of the current FAST or the Zero Address.\\n *\\n * Business logic:\\n * - If the candidate is the reserve, it is a valid token holder.\\n * - If the FAST is semi-public,\\n * - We require that candidate is a member of the Marketplace contract and is active in it.\\n * - Otherwise,\\n * - Require that the candidate is a member of the FAST.\\n * @param candidate The address to check.\\n * @return A boolean set to `true` if `candidate` can hold tokens, `false` otherwise.\\n */\\n function canHoldTokens(address candidate) private view returns (bool) {\\n // Zero address can hold tokens, in any cases.\\n if (candidate == address(0)) return true;\\n // If the FAST is semi public, any member of the marketplace can hold tokens.\\n else if (FastTopFacet(address(this)).isSemiPublic()) {\\n return AHasMembers(LibFast.data().marketplace).isMember(candidate);\\n }\\n // FAST is private, only members of the fast can hold tokens.\\n else {\\n return AHasMembers(address(this)).isMember(candidate);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb0b8ce0ddc8771f8511dec440519b6266f4ec2dcb6f25087f03e81798d6463de\",\"license\":\"MIT\"},\"contracts/fast/FastTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./lib/IFastEvents.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\n\\ncontract FastTopFacet is AFastFacet {\\n // Getters and setters for global flags.\\n\\n /**\\n * @notice Get the Issuer address.\\n * @return address Address of Issuer.\\n */\\n function issuerAddress() external view returns (address) {\\n return LibFast.data().issuer;\\n }\\n\\n /**\\n * @notice Get the Marketplace address.\\n * @return address Address of Marketplace.\\n */\\n function marketplaceAddress() external view returns (address) {\\n return LibFast.data().marketplace;\\n }\\n\\n /**\\n * @notice Is this FAST a semi public FAST?\\n * @return bool Yes/no semi public.\\n */\\n function isSemiPublic() external view returns (bool) {\\n return LibFast.data().isSemiPublic;\\n }\\n\\n /**\\n * @notice Is this FAST a fixed supply FAST?\\n * @return bool Yes/no fixed supply.\\n */\\n function hasFixedSupply() external view returns (bool) {\\n return LibFast.data().hasFixedSupply;\\n }\\n\\n /**\\n * @notice Are transfers enabled across this FAST?\\n * @return boolean `true` if transfers are disabled, `false` if transfers are enabled.\\n */\\n function transfersDisabled() external view returns (bool) {\\n return LibFast.data().transfersDisabled;\\n }\\n\\n // Setters for global flags.\\n\\n /**\\n * @notice Allows to switch from a private scheme to a semi-public scheme,\\n * but not the other way around, unless the total supply is zero.\\n * @param flag Set the semi public flag to true/false.\\n */\\n function setIsSemiPublic(bool flag) external onlyIssuerMember {\\n // Someone is trying to toggle back to private?... No can do!\\n if (this.isSemiPublic() && FastTokenFacet(address(this)).totalSupply() != 0) {\\n revert ICustomErrors.UnsupportedOperation();\\n }\\n LibFast.data().isSemiPublic = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /**\\n * @notice Allows an issuer member to enable or disable all transfers within this FAST.\\n * @param flag Set the transfer capability to active or not.\\n */\\n function setTransfersDisabled(bool flag) external onlyIssuerMemberOrIssuerContract {\\n LibFast.Data storage d = LibFast.data();\\n // Only make changes and emit if the new flag is different than the old one.\\n if (d.transfersDisabled != flag) {\\n // Set flag.\\n d.transfersDisabled = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n /**\\n * @notice Retrieves the group slug to which this FAST belongs.\\n * @return string The group slug string.\\n */\\n function group() external view returns (string memory) {\\n return LibFast.data().group;\\n }\\n\\n /**\\n * @notice Assigns the FAST into a group given its slug.\\n * It should only be callable by the Issuer contract.\\n * @param newGroup is the slug for the new group for this FAST.\\n */\\n function setGroup(string calldata newGroup) external onlyIssuerContract {\\n // Set group slug.\\n LibFast.data().group = newGroup;\\n }\\n}\\n\",\"keccak256\":\"0xc92847559953aa4130a76c0ddf63d9f9e90cf26351153fa691aea503210f7c8d\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Transfer`.\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n /// @notice See `ERC20.Approval`.\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0xff980c3127905dd501245d89f5293d4ee16d0ef46cefea19f06e6915e178527c\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastCrowdfunds.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastCrowdfunds {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 2;\\n /// @notice This is keccak256('Fast.storage.Crowdfunds'):\\n bytes32 internal constant STORAGE_SLOT = 0xc843fbb8f0f5694376d391c1687b800112a6eed97820d8e7a2b82618dd1b69ed;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed crowdfund contract is held here.\\n LibAddressSet.Data crowdfundSet;\\n /// @notice The default crowdfund fee for this FAST.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3f43bc03bbdd3d7d1e2dc957e060310ba97eea02ce64ac91082cc30c9e7c82b7\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastDistributions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastDistributions {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Distributions'):\\n bytes32 internal constant STORAGE_SLOT = 0xe865e85b076245a187a9d3cc15c47264cd0b46df4afd899817bd2e16523485ad;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed distribution contract is held here.\\n LibAddressSet.Data distributionSet;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dbd277dde92dc23bd8fd81a005783e50903690b3acf4ca9e98f6dea3570426e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with token related logic.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastToken {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Token'):\\n bytes32 internal constant STORAGE_SLOT = 0xb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261;\\n\\n // Constants.\\n\\n string internal constant DEFAULT_TRANSFER_REFERENCE = \\\"Unspecified - via ERC20\\\";\\n\\n // Data structures.\\n\\n /**\\n * @notice The token data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // ERC20 related properties for this FAST Token.\\n /// @notice The name of the FAST.\\n string name;\\n /// @notice The symbol for this FAST.\\n string symbol;\\n /// @notice The decimal points used by this FAST.\\n uint8 decimals;\\n /// @notice The amount of tokens in circulation.\\n uint256 totalSupply;\\n /// @notice Legacy variable.\\n uint256 LEGACY_transferCredits;\\n /// @notice Our members balances are held here.\\n mapping(address => uint256) balances;\\n // Allowances are stored here.\\n /// @notice Allowance amounts are stored in here, via mapping of `owner.spender.amount`\\n mapping(address => mapping(address => uint256)) allowances;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by owner.\\n mapping(address => LibAddressSet.Data) allowancesByOwner;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by spender.\\n mapping(address => LibAddressSet.Data) allowancesBySpender;\\n /// @notice All of this FAST token holders.\\n LibAddressSet.Data tokenHolders;\\n }\\n\\n /**\\n * @notice Returns the token storage for the calling FAST.\\n * @return s a struct pointer for token FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf101b0347e095905f91f32ec41dcbe1dca1d8a84cc99664ca5254f21dcf3d8e9\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0x62cf23c6bccffebc753940b8f9260626f04455dd305736aee200d8d1545eb3e4\",\"license\":\"MIT\"},\"contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n/// @title A facet providing diamond cut mechanisms.\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a method with `delegatecall`.\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xf548f40da69f2c54f4e03f92dc31094f6825669314b87266cce22e0a8f1a4c47\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title ERC20 standard as defined in the EIP.\\ninterface IERC20 {\\n /**\\n * @notice Allows to query the total number of tokens in circulation.\\n * @return An `uint256` representing how many tokens are currently in circulation.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Allows to query the balance of a given address.\\n * @param account is the address for which the balance shall be queried.\\n * @return An `uint256` - the balance for the given address.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @notice Moves `amount` tokens from the caller's account to `recipient`.\\n * @param recipient is the address to which the funds should be sent to, if successful.\\n * @param amount is the amount of tokens to transfef.\\n * @return A `bool` which value is `true` when the operation was successful.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner`\\n * through `transferFrom`. This is zero by default.\\n * @dev This value changes when `approve`, `disapprove` and `transferFrom` / `transferFromWithRef` are called.\\n * @param owner is the owner of the funds.\\n * @param spender is the address for which the allowance should be queried.\\n * @return A `uint256` representing the remaining allowance of `spender` over `owner`'s funds.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @notice Increases the allowance of `spender` by `amount`.\\n * @param spender is the address towards which the allowance should be given.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Attempts to transfer `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's allowance.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x79731c983219a24087d3bb925b9dd5c3cb3c85ebfdcd45afce5826bc2d53710f\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/issuer/IssuerAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuerAccess.sol\\\";\\nimport \\\"./lib/IIssuerEvents.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\n\\ncontract IssuerAccessFacet is AIssuerFacet, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return AHasMembers(this).isMember(who);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n /// Membership management.\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor added to a FAST.\\n */\\n function governorAddedToFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].add(msg.sender, true);\\n\\n emit GovernorshipAdded(msg.sender, governor);\\n }\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor removed from a FAST.\\n */\\n function governorRemovedFromFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].remove(msg.sender, true);\\n\\n emit GovernorshipRemoved(msg.sender, governor);\\n }\\n\\n /** @notice Returns a list of FASTs that the passed address is a governor of.\\n * @param governor is the address to check governorships of.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateGovernorships(\\n address governor,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuerAccess.data().fastGovernorships[governor].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0xb8eb9a8eb626f61ecc5627b927bdd81a97f38b05e621e903f77000e63a21b37c\",\"license\":\"MIT\"},\"contracts/issuer/IssuerTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuer.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\ncontract IssuerTopFacet is AIssuerFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n // FAST management related methods.\\n\\n /**\\n * @notice Queries whether a given address is a known and registered FAST contract.\\n * @param fast The address of the contract to check.\\n * @return A boolean.\\n */\\n function isFastRegistered(address fast) external view returns (bool) {\\n return LibIssuer.data().fastSet.contains(fast);\\n }\\n\\n /**\\n * @notice Allows to retrieve the address of a FAST diamond given its symbol.\\n * @param symbol The symbol of the FAST diamond to get the address of.\\n * @return The address of the corresponding FAST diamond, or the Zero Address if not found.\\n */\\n function fastBySymbol(string calldata symbol) external view returns (address) {\\n return LibIssuer.data().fastSymbols[symbol];\\n }\\n\\n /**\\n * @notice Allows the registration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be registered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastRegistered` event.\\n */\\n function registerFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n if (s.fastSymbols[symbol] != address(0)) {\\n revert ICustomErrors.DuplicateEntry();\\n }\\n\\n // Add the FAST to our list.\\n s.fastSet.add(fast, false);\\n // Add the fast symbol to our list.\\n s.fastSymbols[symbol] = fast;\\n\\n // Emit!\\n emit FastRegistered(fast);\\n }\\n\\n /**\\n * @notice Allows the unregistration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be unregistered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastUnregistered` event.\\n */\\n function unregisterFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n\\n // Disable transfers in the FAST.\\n FastTopFacet(fast).setTransfersDisabled(true);\\n\\n // Remove the FAST from our lists.\\n s.fastSet.remove(fast, false);\\n delete s.fastSymbols[symbol];\\n\\n // Emit!\\n emit FastUnregistered(fast);\\n }\\n\\n /**\\n * @notice Counts the number of FAST diamonds registered with this Issuer.\\n * @return The number of FAST diamonds registered with this Issuer.\\n */\\n function fastCount() external view returns (uint256) {\\n return LibIssuer.data().fastSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a starting cursor and a number of records per page.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFasts(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to move collected ERC20 fees from this contract\\n * to an arbitrary address.\\n * @param token is the address of the ERC20 to be collected.\\n * @param amount is how much should be moved from the ERC20 to the collection address.\\n * @param to is the collection address - eg the address that will receive the ERC20 tokens.\\n */\\n function transferERC20Tokens(IERC20 token, uint256 amount, address to) public onlyMember(msg.sender) {\\n require(token.transfer(to, amount));\\n }\\n\\n /**\\n * @notice Allows to assign FASTs to groups.\\n * @param fast The FAST address to assign.\\n * @param newGroup The name of the group in which the FAST should be placed.\\n */\\n function setFastGroup(address fast, string calldata newGroup) external onlyMember(msg.sender) {\\n string memory oldGroup = FastTopFacet(fast).group();\\n // Remove FAST from old group.\\n if (bytes(oldGroup).length > 0) LibIssuer.data().fastGroups[oldGroup].remove(fast, false);\\n // Add FAST to new group.\\n if (bytes(newGroup).length > 0) LibIssuer.data().fastGroups[newGroup].add(fast, false);\\n // Set group name at FAST level.\\n FastTopFacet(fast).setGroup(newGroup);\\n // Emit!\\n emit FastGroupChanged(fast, oldGroup, newGroup);\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a group, starting cursor and a number of records per page.\\n * @param group The group to paginate.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFastsInGroup(\\n string calldata group,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastGroups[group].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0x99cd1b99fcbba93ea96e34d70b6a51cc50ebf6b2af22dab69d529a15ab2e7700\",\"license\":\"MIT\"},\"contracts/issuer/lib/AIssuerFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./IIssuerEvents.sol\\\";\\n\\n/**\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AIssuerFacet is IIssuerEvents {\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresIssuerMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x4ab53f3e2ce4e78f13c93f46c10c581c0b5ebc520979191d6092d2d7f7aa733c\",\"license\":\"MIT\"},\"contracts/issuer/lib/IIssuerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// WARNING: These events must be maintained 1:1 with LibIssuerEvents!\\n// They also should never be emitted directly, they only help us defining\\n// typescript types!\\ninterface IIssuerEvents {\\n /// FAST registration events.\\n\\n /**\\n * @notice Emited when a new FAST is registered.\\n * @param fast The address of the newly registered FAST diamond.\\n */\\n event FastRegistered(address indexed fast);\\n /**\\n * @notice Emited when a FAST is removed from the Issuer contract.\\n * @param fast The address of the unregistered FAST.\\n */\\n event FastUnregistered(address indexed fast);\\n\\n /// FAST groupping events.\\n\\n event FastGroupChanged(address indexed fast, string indexed oldGroup, string indexed newGroup);\\n\\n /// Governors.\\n\\n event GovernorshipRemoved(address indexed fast, address indexed governor);\\n event GovernorshipAdded(address indexed fast, address indexed governor);\\n}\\n\",\"keccak256\":\"0x7ab2611cedeaf69aba2461e083ce436cde93f53e0ebf7ae882bf1800a839f543\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuer {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xd681d5f1de7bc4b7442c088939dc202585e09699e92a94c9717ace8d0f4fcaa5;\\n\\n // Data structures.\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // This is where we keep our list of deployed fast FASTs.\\n LibAddressSet.Data fastSet;\\n // We keep track of the FAST symbols that were already used - string to FAST address.\\n mapping(string => address) fastSymbols;\\n // We also keep track of the FAST groups here - slug to FAST address set.\\n mapping(string => LibAddressSet.Data) fastGroups;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x82972d98e290aa68b6fa14dee5e9f3e0ca3d80604e96435ea437e9f92891f7e9\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuerAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuerAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0x3ceaa4d5edf9c96fbd56140abe6389d65a87143d4f11819874ff2fe0ae9574db;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // For a given address we store list of FASTs where that address is a governor.\\n mapping(address => LibAddressSet.Data) fastGovernorships;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x225043d709577f7c580aa46637ef2910336dc0ef75a508a1252484fa45558fca\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x0e12d54c3afccb656312e8bc7c31d16feb3718a421d2ea732024f608ccb6aab4\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"./lib/LibMarketplaceAccess.sol\\\";\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./MarketplaceAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Access facet is in charge of keeping track of marketplace members.\\n */\\ncontract MarketplaceAccessFacet is AMarketplaceFacet, AHasMembers, IHasActiveMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return _isIssuerMember(who) || AHasAutomatons(address(this)).automatonCan(who, MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n function onMemberRemoved(address member) internal view override(AHasMembers) {\\n LibMarketplaceAccess.Data storage s = LibMarketplaceAccess.data();\\n // Ensure that member doesn't have any FAST membership.\\n if (s.fastMemberships[member].values.length != 0) revert ICustomErrors.RequiresNoFastMemberships(member);\\n }\\n\\n /// FAST memberships functions.\\n\\n /**\\n * @notice Allows to query FAST memberships for a given member address.\\n * @param member Is the address to check.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n */\\n function fastMemberships(\\n address member,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibMarketplaceAccess.data().fastMemberships[member].values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a new FAST membership has been added.\\n */\\n function memberAddedToFast(address member) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the member's FAST membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].add(msg.sender, true);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a FAST membership has been removed.\\n */\\n function memberRemovedFromFast(address member) external {\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].remove(msg.sender, true);\\n }\\n\\n /// IHasActiveMembers implementation.\\n\\n /**\\n * @notice Given a member returns it's activation status.\\n * @param candidate The address to check activation status on.\\n */\\n function isActiveMember(address candidate) external view override(IHasActiveMembers) returns (bool) {\\n return AHasMembers(this).isMember(candidate) && !LibMarketplaceAccess.data().deactivatedMemberSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Activates a member at the Marketplace level.\\n * @param member The member to remove from the deactivation member set.\\n */\\n function activateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to activate an already active member.\\n if (this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceDeactivatedMember(member);\\n // Remove the member from the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.remove(member, false);\\n // Emit!\\n emit MemberActivated(member);\\n }\\n\\n /**\\n * @notice Deactivates a member at the Marketplace level.\\n * @param member The member to add to the deactivation member set.\\n */\\n function deactivateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to deactivate an already deactivated member.\\n if (!this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceActiveMembership(member);\\n // Add the member to the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.add(member, false);\\n // Emit!\\n emit MemberDeactivated(member);\\n }\\n}\\n\",\"keccak256\":\"0x87d6a82598a03377f78f625bee234bef4c62066dff99ae89484c8fb5f7f6b8a2\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS = 1;\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract MarketplaceAutomatonsFacet is AMarketplaceFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0xa2a142702268b2d33ddd7703c23f36274161cb2b9b707369e703ebbfa2f5a53c\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceTokenHoldersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./lib/LibMarketplaceTokenHolders.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/** @dev The Marketplace FAST balances facet.\\n */\\ncontract MarketplaceTokenHoldersFacet is AMarketplaceFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /** @dev The callback used when a balance changes on a FAST.\\n */\\n function fastBalanceChanged(address account, uint256 balance) external {\\n // Return early if this is the zero address.\\n if (account == address(0)) {\\n return;\\n }\\n\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n\\n // Get the storage pointer and balance of the token holder.\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.fastHoldings[account].contains(msg.sender)) {\\n s.fastHoldings[account].add(msg.sender, false);\\n }\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.fastHoldings[account].contains(msg.sender)) {\\n s.fastHoldings[account].remove(msg.sender, false);\\n }\\n }\\n\\n /** @dev A way to get a list of FASTs for an account.\\n * @return list of FAST addresses.\\n */\\n function holdings(address account) external view returns (address[] memory) {\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n return s.fastHoldings[account].values;\\n }\\n}\\n\",\"keccak256\":\"0x1ebb1ceb92cab41edadcff833ca641a3883329b23ccf602ffb4b464f08ffc918\",\"license\":\"MIT\"},\"contracts/marketplace/lib/AMarketplaceFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibMarketplace.sol\\\";\\nimport \\\"./IMarketplaceEvents.sol\\\";\\n\\n/**\\n * @notice This contract is a group of modifiers that can be used by any Marketplace facets to guard against\\n * certain permissions.\\n */\\nabstract contract AMarketplaceFacet is IMarketplaceEvents {\\n /// Internal ACL functions.\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibMarketplace.data().issuer).isMember(who);\\n }\\n\\n // Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() virtual {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Requires that the message sender is a member of the linked Issuer.\\n */\\n modifier onlyIssuerMember() virtual {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n /**\\n * @notice Requires that the given address is a member of the marketplace.\\n * @param who is the address to be checked.\\n */\\n modifier onlyMember(address who) virtual {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xb9569fef0cef86a40828714a131f6dafb98ae4cd21ff44e710f8e57413bd6ffb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/IMarketplaceEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface IMarketplaceEvents {\\n /// @dev See `IHasActiveMembers`.\\n event MemberActivated(address indexed member);\\n /// @dev See `IHasActiveMembers`.\\n event MemberDeactivated(address indexed member);\\n /// @dev Emitted when a FAST deployment is requested.\\n event FastDeploymentRequested(uint256 indexed index);\\n}\\n\",\"keccak256\":\"0xeb89df40f51b42b444f698f8d13cf4318396f9393d7fab049c131e2f6bd45b4d\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplace {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xb59ec141376cee83f618e10e881bbb4789cdeee27e0d441a8c37ead3cb8b93c1;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba63d4c8f5878ca351ca9fb34f5bc1937dd4a90efaccbc739948eaa3cbf4e526\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0xecb992c7a1185ca18ac50bc1672192fb67e7c3e74465887a8fcaab265dab37bd;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we keep track of our member FAST memberships.\\n mapping(address => LibAddressSet.Data) fastMemberships;\\n /// @notice This is where we keep track of our deactivated memberships.\\n LibAddressSet.Data deactivatedMemberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac8cc51395e6e5b357b72f0cb3b4b681b5cbe0e0338692fde4d1087bc98b03eb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceTokenHolders.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceTokenHolders {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.TokenHolders.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xecf50453542504034bd40d376fb1408ada3025f2fe86ca1b9b4b1440b8d4a2f4;\\n\\n struct Data {\\n /// @dev The latest intializer version that was called.\\n uint16 version;\\n /// @dev The tracked FAST holdings of a user.\\n mapping(address => LibAddressSet.Data) fastHoldings;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa6edcacafdaaac79b202288095948b7b3bee0e01f7d4b4efb8eee3425f9a8c04\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613892806100206000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c806370a08231116100e35780639c999d901161008c578063dd62ed3e11610066578063dd62ed3e1461044f578063e8edd0e314610462578063fbabdb061461047557600080fd5b80639c999d9014610416578063a9059cbb14610429578063c485bb961461043c57600080fd5b80638188f71c116100bd5780638188f71c146103a157806381a8f243146103b657806395d89b411461040e57600080fd5b806370a08231146103265780637641e6f31461037b57806377097fc81461038e57600080fd5b8063313ce567116101455780635480699a1161011f5780635480699a146102ed5780635d7b590f146103005780636bd7bd251461031357600080fd5b8063313ce5671461029b5780633a868224146102c557806344890ae0146102da57600080fd5b806318160ddd1161017657806318160ddd146102405780631fe02e531461026757806323b872dd1461028857600080fd5b806306675ba71461019d57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f56101ab3660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090206001015490565b6040519081526020015b60405180910390f35b610210610488565b6040516101ff919061314e565b61023061022b366004613161565b61053c565b60405190151581526020016101ff565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8265546101f5565b61027a61027536600461318b565b6105d7565b6040516101ff92919061320f565b610230610296366004613231565b610639565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82645460ff166101f5565b6102d86102d33660046130c8565b610687565b005b6102d86102e836600461326d565b610a40565b6102d86102fb366004613231565b6116dd565b6102d861030e3660046130c8565b61191e565b6102d8610321366004613231565b611c3f565b6101f56103343660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8267602052604090205490565b6102d86103893660046132f1565b611e08565b6102d861039c3660046132f1565b612062565b6103a961233e565b6040516101ff919061333d565b6101f56103c43660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604090206001015490565b6102106123d0565b61027a61042436600461318b565b612401565b610230610437366004613161565b612457565b61023061044a36600461337f565b612504565b6101f561045d366004613479565b6125bb565b6102306104703660046134ac565b61272d565b610230610483366004613161565b612821565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160010180546104b990613506565b80601f01602080910402602001604051908101604052809291908181526020018280546104e590613506565b80156105325780601f1061050757610100808354040283529160200191610532565b820191906000526020600020905b81548152906001019060200180831161051557829003601f168201915b5050505050905090565b6040517f5480699a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526000903090635480699a906064015b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b50505050600190505b92915050565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604081206060919061062d906001018585612982565b91509150935093915050565b600061067c8484846040518060400160405280601781526020017f556e737065636966696564202d20766961204552433230000000000000000000815250612504565b506001949350505050565b61069033612aa3565b6106cd576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826760205260409020547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261811561079a5773ffffffffffffffffffffffffffffffffffffffff8316600090815260068201602052604080822082905581805281208054849290610779908490613589565b925050819055508181600401600082825461079491906135a1565b90915550505b6107a9600a8201846001612b5e565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705600101546040517fc2a11fb300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152600060248301529091169063c2a11fb390604401600060405180830381600087803b15801561083f57600080fd5b505af1158015610853573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290517feee2dcc300000000000000000000000000000000000000000000000000000000815230935063eee2dcc392506108cd91339188916000918991906004016135b8565b600060405180830381600087803b1580156108e757600080fd5b505af11580156108fb573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290516000935073ffffffffffffffffffffffffffffffffffffffff8716925033917fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d59161097e91889161360a565b60405180910390a460405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a38115610a3b573073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a2257600080fd5b505af1158015610a36573d6000803e3d6000fd5b505050505b505050565b303314610a79576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590503073ffffffffffffffffffffffffffffffffffffffff1663034cd7256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d919061362b565b15610b44576040517f5bcaa04c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5460608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610b7a60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff161415610bf157610ba660408301602084016130c8565b6040517f6b3dcdc100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610c0360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16148015610ce05750805462010000900473ffffffffffffffffffffffffffffffffffffffff1663a230c524610c5160208501856130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde919061362b565b155b15610d3d57610cf260208301836130c8565b6040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610d55610d5060408401602085016130c8565b612d36565b610db457610d6960408301602084016130c8565b6040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610dc660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ec157507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166345ecd02f610e3260408501602086016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf919061362b565b155b15610f2157610ed660408301602084016130c8565b6040517f14c469d300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610f34610d5060608401604085016130c8565b610f4857610d6960608301604084016130c8565b6060820135156114fe577fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261610f8360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610fa660208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ff057506000610fd760408501602086016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561111c5760006060840135600783018261101160408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604001600090812091611047908801886130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461109091906135a1565b91829055509150508061111a576110f26110ad60208601866130c8565b60016008850160006110c560408a0160208b016130c8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000209190612b5e565b61111a61110560408601602087016130c8565b60016009850160006110c560208a018a6130c8565b505b60006060840135600683018261113860408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461118191906135a1565b9250508190559050600084606001358360060160008760400160208101906111a991906130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111f29190613589565b9182905550600186015490925073ffffffffffffffffffffffffffffffffffffffff16905063c2a11fb361122c60408801602089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101859052604401600060405180830381600087803b15801561129957600080fd5b505af11580156112ad573d6000803e3d6000fd5b50505050600184015473ffffffffffffffffffffffffffffffffffffffff1663c2a11fb36112e160608801604089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b15801561134e57600080fd5b505af1158015611362573d6000803e3d6000fd5b50611381925061137b91505060408701602088016130c8565b83612e9d565b61139a61139460608701604088016130c8565b82612e9d565b60006113ac60608701604088016130c8565b73ffffffffffffffffffffffffffffffffffffffff16141561144c5784606001358360040160008282546113e091906135a1565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561142f57600080fd5b505af1158015611443573d6000803e3d6000fd5b505050506114fa565b600061145e60408701602088016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614156114fa5784606001358360040160008282546114929190613589565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156114e157600080fd5b505af11580156114f5573d6000803e3d6000fd5b505050505b5050505b3063eee2dcc361151160208501856130c8565b61152160408601602087016130c8565b61153160608701604088016130c8565b6060870135611543608089018961364d565b6040518763ffffffff1660e01b8152600401611564969594939291906136fb565b600060405180830381600087803b15801561157e57600080fd5b505af1158015611592573d6000803e3d6000fd5b506115a79250505060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115cd60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115f060208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff167fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d56060860135611639608088018861364d565b6040516116489392919061374f565b60405180910390a461166060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff1661168660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84606001356040516116d191815260200190565b60405180910390a35050565b303314611716576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611763576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61176c83612d36565b6117ba576040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016106c4565b80156118b25773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611845908490613589565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600882016020526040902061187d90846001612f34565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098201602052604090206118b090856001612f34565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161191191815260200190565b60405180910390a3505050565b303314611957576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82676020526040902054156119eb576040517fd90c787400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090207fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261906001015b805415611b3557600081600081548110611a7157611a71613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff87811680855260078801845260408086209290931680865291909352928190205490517f6bd7bd2500000000000000000000000000000000000000000000000000000000815260048101929092526024820183905260448201529091503090636bd7bd2590606401600060405180830381600087803b158015611b1757600080fd5b505af1158015611b2b573d6000803e3d6000fd5b5050505050611a55565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090206001015b805415610a3b57600081600081548110611b7d57611b7d613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff9081168084526007870183526040808520928916808652929093528284205483517f6bd7bd25000000000000000000000000000000000000000000000000000000008152600481018390526024810193909352604483015291519193503092636bd7bd259260648084019382900301818387803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b5050505050611b61565b303314611c78576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611da95773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611d039084906135a1565b909155505073ffffffffffffffffffffffffffffffffffffffff8085166000908152600783016020908152604080832093871683529290522054611da75773ffffffffffffffffffffffffffffffffffffffff841660009081526008820160205260409020611d7490846001612b5e565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009820160205260409020611da790856001612b5e565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f94f4f5b45267f5e7454476505db5fe3cbb2ad25868e26303b8fc7c5074ba58908360405161191191815260200190565b611e1133612aa3565b611e49576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611edd919061362b565b15611f14576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080805260068201602052604081208054869290611f349084906135a1565b90915550506040517ff4c1210c000000000000000000000000000000000000000000000000000000008152309063f4c1210c90611f799087908790879060040161374f565b600060405180830381600087803b158015611f9357600080fd5b505af1158015611fa7573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611ff357600080fd5b505af1158015612007573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847f5ff47d76c9322f177ff7059963be58d30339f275e98dc74e464d2070a8138acd85856040516120549291906137a1565b60405180910390a350505050565b61206b33612aa3565b6120a3576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612113573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612137919061362b565b80156121c7575060048101541515806121c757506040517f70a082310000000000000000000000000000000000000000000000000000000081526000600482015230906370a0823190602401602060405180830381865afa1580156121a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c491906137b5565b15155b156121fe576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080526006820160205260408120805486929061221e908490613589565b90915550506040517faf2e757b000000000000000000000000000000000000000000000000000000008152309063af2e757b906122639087908790879060040161374f565b600060405180830381600087803b15801561227d57600080fd5b505af1158015612291573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156122dd57600080fd5b505af11580156122f1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847fc1177815a22ab58cdf6e40a80dfe322e9d00b7977bd78634869752fed8082f5685856040516120549291906137a1565b606060007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261600b81018054604080516020808402820181019092528281529394508301828280156123c557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161239a575b505050505091505090565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160020180546104b990613506565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604081206060919061062d906001018585612982565b6040805160a0810182523380825260208083019190915273ffffffffffffffffffffffffffffffffffffffff8516828401526060820184905282518084018452601781527f556e737065636966696564202d2076696120455243323000000000000000000091810191909152608082015290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161059a916004016137ce565b6040805160a08101825233815273ffffffffffffffffffffffffffffffffffffffff8681166020830152851681830152606081018490526080810183905290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161257e916004016137ce565b600060405180830381600087803b15801561259857600080fd5b505af11580156125ac573d6000803e3d6000fd5b50600198975050505050505050565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826173ffffffffffffffffffffffffffffffffffffffff84166126ef577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152620100009092049091169063a230c52490602401602060405180830381865afa15801561268f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b3919061362b565b6126be5760006126e7565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006820160205260409020545b9150506105d1565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600790920160209081526040808420928616845291905290205490506105d1565b60003073ffffffffffffffffffffffffffffffffffffffff166344890ae06040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815261257e91906004016137ce565b6040517fa230c5240000000000000000000000000000000000000000000000000000000081523360048201819052600091309063a230c52490602401602060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061362b565b6128ec576040517fb8c6719e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b6040517f6bd7bd2500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff85166024820152604481018490523090636bd7bd2590606401600060405180830381600087803b15801561296057600080fd5b505af1158015612974573d6000803e3d6000fd5b506001979650505050505050565b606060008084868054905061299791906135a1565b84116129a357836129b0565b85546129b09086906135a1565b905060008167ffffffffffffffff8111156129cd576129cd613350565b6040519080825280602002602001820160405280156129f6578160200160208202803683370190505b50905060005b82811015612a895787612a0f8289613589565b81548110612a1f57612a1f613772565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110612a5c57612a5c613772565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526001016129fc565b5080612a958388613589565b935093505050935093915050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c524906024015b602060405180830381865afa158015612b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d1919061362b565b6000612b6a8484613028565b9050818015612b77575080155b15612b825750505050565b80612be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e2073657400000060448201526064016106c4565b60018085018054600092612bfc916135a1565b81548110612c0c57612c0c613772565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110612c6857612c68613772565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480612cd657612cd661382d565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216612d5b57506001919050565b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015612da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dca919061362b565b15612e46577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063a230c52490602401612b1d565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063a230c52490602401612b1d565b919050565b73ffffffffffffffffffffffffffffffffffffffff8216612ebc575050565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82618115801590612ef65750612ef4600a820184613028565b155b15612f0a57610a3b600a8201846000612f34565b81158015612f205750612f20600a820184613028565b15610a3b57610a3b600a8201846000612b5e565b6000612f408484613028565b9050818015612f4c5750805b15612f575750505050565b8015612fbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e207365740000000000000000000060448201526064016106c4565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60018201546000901561309a5773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061307257613072613772565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461309d565b60005b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e9857600080fd5b6000602082840312156130da57600080fd5b61309d826130a4565b6000815180845260005b81811015613109576020818501810151868301820152016130ed565b8181111561311b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061309d60208301846130e3565b6000806040838503121561317457600080fd5b61317d836130a4565b946020939093013593505050565b6000806000606084860312156131a057600080fd5b6131a9846130a4565b95602085013595506040909401359392505050565b600081518084526020808501945080840160005b8381101561320457815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016131d2565b509495945050505050565b60408152600061322260408301856131be565b90508260208301529392505050565b60008060006060848603121561324657600080fd5b61324f846130a4565b925061325d602085016130a4565b9150604084013590509250925092565b60006020828403121561327f57600080fd5b813567ffffffffffffffff81111561329657600080fd5b820160a0818503121561309d57600080fd5b60008083601f8401126132ba57600080fd5b50813567ffffffffffffffff8111156132d257600080fd5b6020830191508360208285010111156132ea57600080fd5b9250929050565b60008060006040848603121561330657600080fd5b83359250602084013567ffffffffffffffff81111561332457600080fd5b613330868287016132a8565b9497909650939450505050565b60208152600061309d60208301846131be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561339557600080fd5b61339e856130a4565b93506133ac602086016130a4565b925060408501359150606085013567ffffffffffffffff808211156133d057600080fd5b818701915087601f8301126133e457600080fd5b8135818111156133f6576133f6613350565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561343c5761343c613350565b816040528281528a602084870101111561345557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561348c57600080fd5b613495836130a4565b91506134a3602084016130a4565b90509250929050565b600080600080606085870312156134c257600080fd5b6134cb856130a4565b935060208501359250604085013567ffffffffffffffff8111156134ee57600080fd5b6134fa878288016132a8565b95989497509550505050565b600181811c9082168061351a57607f821691505b60208210811415613554577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561359c5761359c61355a565b500190565b6000828210156135b3576135b361355a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015280861660408401525083606083015260a060808301526135ff60a08301846130e3565b979650505050505050565b82815260406020820152600061362360408301846130e3565b949350505050565b60006020828403121561363d57600080fd5b8151801515811461309d57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261368257600080fd5b83018035915067ffffffffffffffff82111561369d57600080fd5b6020019150368190038213156132ea57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015260a0608083015261374360a0830184866136b2565b98975050505050505050565b8381526040602082015260006137696040830184866136b2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020815260006136236020830184866136b2565b6000602082840312156137c757600080fd5b5051919050565b60208152600073ffffffffffffffffffffffffffffffffffffffff8084511660208401528060208501511660408401528060408501511660608401525060608301516080830152608083015160a08084015261362360c08401826130e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220641f06d79275507ebd1158902b2424f004c2655df90a58b5f8787204d2a894d764736f6c634300080a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101985760003560e01c806370a08231116100e35780639c999d901161008c578063dd62ed3e11610066578063dd62ed3e1461044f578063e8edd0e314610462578063fbabdb061461047557600080fd5b80639c999d9014610416578063a9059cbb14610429578063c485bb961461043c57600080fd5b80638188f71c116100bd5780638188f71c146103a157806381a8f243146103b657806395d89b411461040e57600080fd5b806370a08231146103265780637641e6f31461037b57806377097fc81461038e57600080fd5b8063313ce567116101455780635480699a1161011f5780635480699a146102ed5780635d7b590f146103005780636bd7bd251461031357600080fd5b8063313ce5671461029b5780633a868224146102c557806344890ae0146102da57600080fd5b806318160ddd1161017657806318160ddd146102405780631fe02e531461026757806323b872dd1461028857600080fd5b806306675ba71461019d57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f56101ab3660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090206001015490565b6040519081526020015b60405180910390f35b610210610488565b6040516101ff919061314e565b61023061022b366004613161565b61053c565b60405190151581526020016101ff565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8265546101f5565b61027a61027536600461318b565b6105d7565b6040516101ff92919061320f565b610230610296366004613231565b610639565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82645460ff166101f5565b6102d86102d33660046130c8565b610687565b005b6102d86102e836600461326d565b610a40565b6102d86102fb366004613231565b6116dd565b6102d861030e3660046130c8565b61191e565b6102d8610321366004613231565b611c3f565b6101f56103343660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8267602052604090205490565b6102d86103893660046132f1565b611e08565b6102d861039c3660046132f1565b612062565b6103a961233e565b6040516101ff919061333d565b6101f56103c43660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604090206001015490565b6102106123d0565b61027a61042436600461318b565b612401565b610230610437366004613161565b612457565b61023061044a36600461337f565b612504565b6101f561045d366004613479565b6125bb565b6102306104703660046134ac565b61272d565b610230610483366004613161565b612821565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160010180546104b990613506565b80601f01602080910402602001604051908101604052809291908181526020018280546104e590613506565b80156105325780601f1061050757610100808354040283529160200191610532565b820191906000526020600020905b81548152906001019060200180831161051557829003601f168201915b5050505050905090565b6040517f5480699a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526000903090635480699a906064015b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b50505050600190505b92915050565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604081206060919061062d906001018585612982565b91509150935093915050565b600061067c8484846040518060400160405280601781526020017f556e737065636966696564202d20766961204552433230000000000000000000815250612504565b506001949350505050565b61069033612aa3565b6106cd576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826760205260409020547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261811561079a5773ffffffffffffffffffffffffffffffffffffffff8316600090815260068201602052604080822082905581805281208054849290610779908490613589565b925050819055508181600401600082825461079491906135a1565b90915550505b6107a9600a8201846001612b5e565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705600101546040517fc2a11fb300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152600060248301529091169063c2a11fb390604401600060405180830381600087803b15801561083f57600080fd5b505af1158015610853573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290517feee2dcc300000000000000000000000000000000000000000000000000000000815230935063eee2dcc392506108cd91339188916000918991906004016135b8565b600060405180830381600087803b1580156108e757600080fd5b505af11580156108fb573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290516000935073ffffffffffffffffffffffffffffffffffffffff8716925033917fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d59161097e91889161360a565b60405180910390a460405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a38115610a3b573073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a2257600080fd5b505af1158015610a36573d6000803e3d6000fd5b505050505b505050565b303314610a79576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590503073ffffffffffffffffffffffffffffffffffffffff1663034cd7256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d919061362b565b15610b44576040517f5bcaa04c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5460608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610b7a60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff161415610bf157610ba660408301602084016130c8565b6040517f6b3dcdc100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610c0360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16148015610ce05750805462010000900473ffffffffffffffffffffffffffffffffffffffff1663a230c524610c5160208501856130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde919061362b565b155b15610d3d57610cf260208301836130c8565b6040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610d55610d5060408401602085016130c8565b612d36565b610db457610d6960408301602084016130c8565b6040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610dc660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ec157507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166345ecd02f610e3260408501602086016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf919061362b565b155b15610f2157610ed660408301602084016130c8565b6040517f14c469d300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610f34610d5060608401604085016130c8565b610f4857610d6960608301604084016130c8565b6060820135156114fe577fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261610f8360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610fa660208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ff057506000610fd760408501602086016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561111c5760006060840135600783018261101160408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604001600090812091611047908801886130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461109091906135a1565b91829055509150508061111a576110f26110ad60208601866130c8565b60016008850160006110c560408a0160208b016130c8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000209190612b5e565b61111a61110560408601602087016130c8565b60016009850160006110c560208a018a6130c8565b505b60006060840135600683018261113860408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461118191906135a1565b9250508190559050600084606001358360060160008760400160208101906111a991906130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111f29190613589565b9182905550600186015490925073ffffffffffffffffffffffffffffffffffffffff16905063c2a11fb361122c60408801602089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101859052604401600060405180830381600087803b15801561129957600080fd5b505af11580156112ad573d6000803e3d6000fd5b50505050600184015473ffffffffffffffffffffffffffffffffffffffff1663c2a11fb36112e160608801604089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b15801561134e57600080fd5b505af1158015611362573d6000803e3d6000fd5b50611381925061137b91505060408701602088016130c8565b83612e9d565b61139a61139460608701604088016130c8565b82612e9d565b60006113ac60608701604088016130c8565b73ffffffffffffffffffffffffffffffffffffffff16141561144c5784606001358360040160008282546113e091906135a1565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561142f57600080fd5b505af1158015611443573d6000803e3d6000fd5b505050506114fa565b600061145e60408701602088016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614156114fa5784606001358360040160008282546114929190613589565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156114e157600080fd5b505af11580156114f5573d6000803e3d6000fd5b505050505b5050505b3063eee2dcc361151160208501856130c8565b61152160408601602087016130c8565b61153160608701604088016130c8565b6060870135611543608089018961364d565b6040518763ffffffff1660e01b8152600401611564969594939291906136fb565b600060405180830381600087803b15801561157e57600080fd5b505af1158015611592573d6000803e3d6000fd5b506115a79250505060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115cd60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115f060208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff167fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d56060860135611639608088018861364d565b6040516116489392919061374f565b60405180910390a461166060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff1661168660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84606001356040516116d191815260200190565b60405180910390a35050565b303314611716576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611763576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61176c83612d36565b6117ba576040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016106c4565b80156118b25773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611845908490613589565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600882016020526040902061187d90846001612f34565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098201602052604090206118b090856001612f34565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161191191815260200190565b60405180910390a3505050565b303314611957576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82676020526040902054156119eb576040517fd90c787400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090207fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261906001015b805415611b3557600081600081548110611a7157611a71613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff87811680855260078801845260408086209290931680865291909352928190205490517f6bd7bd2500000000000000000000000000000000000000000000000000000000815260048101929092526024820183905260448201529091503090636bd7bd2590606401600060405180830381600087803b158015611b1757600080fd5b505af1158015611b2b573d6000803e3d6000fd5b5050505050611a55565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090206001015b805415610a3b57600081600081548110611b7d57611b7d613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff9081168084526007870183526040808520928916808652929093528284205483517f6bd7bd25000000000000000000000000000000000000000000000000000000008152600481018390526024810193909352604483015291519193503092636bd7bd259260648084019382900301818387803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b5050505050611b61565b303314611c78576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611da95773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611d039084906135a1565b909155505073ffffffffffffffffffffffffffffffffffffffff8085166000908152600783016020908152604080832093871683529290522054611da75773ffffffffffffffffffffffffffffffffffffffff841660009081526008820160205260409020611d7490846001612b5e565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009820160205260409020611da790856001612b5e565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f94f4f5b45267f5e7454476505db5fe3cbb2ad25868e26303b8fc7c5074ba58908360405161191191815260200190565b611e1133612aa3565b611e49576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611edd919061362b565b15611f14576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080805260068201602052604081208054869290611f349084906135a1565b90915550506040517ff4c1210c000000000000000000000000000000000000000000000000000000008152309063f4c1210c90611f799087908790879060040161374f565b600060405180830381600087803b158015611f9357600080fd5b505af1158015611fa7573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611ff357600080fd5b505af1158015612007573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847f5ff47d76c9322f177ff7059963be58d30339f275e98dc74e464d2070a8138acd85856040516120549291906137a1565b60405180910390a350505050565b61206b33612aa3565b6120a3576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612113573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612137919061362b565b80156121c7575060048101541515806121c757506040517f70a082310000000000000000000000000000000000000000000000000000000081526000600482015230906370a0823190602401602060405180830381865afa1580156121a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c491906137b5565b15155b156121fe576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080526006820160205260408120805486929061221e908490613589565b90915550506040517faf2e757b000000000000000000000000000000000000000000000000000000008152309063af2e757b906122639087908790879060040161374f565b600060405180830381600087803b15801561227d57600080fd5b505af1158015612291573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156122dd57600080fd5b505af11580156122f1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847fc1177815a22ab58cdf6e40a80dfe322e9d00b7977bd78634869752fed8082f5685856040516120549291906137a1565b606060007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261600b81018054604080516020808402820181019092528281529394508301828280156123c557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161239a575b505050505091505090565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160020180546104b990613506565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604081206060919061062d906001018585612982565b6040805160a0810182523380825260208083019190915273ffffffffffffffffffffffffffffffffffffffff8516828401526060820184905282518084018452601781527f556e737065636966696564202d2076696120455243323000000000000000000091810191909152608082015290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161059a916004016137ce565b6040805160a08101825233815273ffffffffffffffffffffffffffffffffffffffff8681166020830152851681830152606081018490526080810183905290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161257e916004016137ce565b600060405180830381600087803b15801561259857600080fd5b505af11580156125ac573d6000803e3d6000fd5b50600198975050505050505050565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826173ffffffffffffffffffffffffffffffffffffffff84166126ef577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152620100009092049091169063a230c52490602401602060405180830381865afa15801561268f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b3919061362b565b6126be5760006126e7565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006820160205260409020545b9150506105d1565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600790920160209081526040808420928616845291905290205490506105d1565b60003073ffffffffffffffffffffffffffffffffffffffff166344890ae06040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815261257e91906004016137ce565b6040517fa230c5240000000000000000000000000000000000000000000000000000000081523360048201819052600091309063a230c52490602401602060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061362b565b6128ec576040517fb8c6719e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b6040517f6bd7bd2500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff85166024820152604481018490523090636bd7bd2590606401600060405180830381600087803b15801561296057600080fd5b505af1158015612974573d6000803e3d6000fd5b506001979650505050505050565b606060008084868054905061299791906135a1565b84116129a357836129b0565b85546129b09086906135a1565b905060008167ffffffffffffffff8111156129cd576129cd613350565b6040519080825280602002602001820160405280156129f6578160200160208202803683370190505b50905060005b82811015612a895787612a0f8289613589565b81548110612a1f57612a1f613772565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110612a5c57612a5c613772565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526001016129fc565b5080612a958388613589565b935093505050935093915050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c524906024015b602060405180830381865afa158015612b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d1919061362b565b6000612b6a8484613028565b9050818015612b77575080155b15612b825750505050565b80612be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e2073657400000060448201526064016106c4565b60018085018054600092612bfc916135a1565b81548110612c0c57612c0c613772565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110612c6857612c68613772565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480612cd657612cd661382d565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216612d5b57506001919050565b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015612da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dca919061362b565b15612e46577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063a230c52490602401612b1d565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063a230c52490602401612b1d565b919050565b73ffffffffffffffffffffffffffffffffffffffff8216612ebc575050565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82618115801590612ef65750612ef4600a820184613028565b155b15612f0a57610a3b600a8201846000612f34565b81158015612f205750612f20600a820184613028565b15610a3b57610a3b600a8201846000612b5e565b6000612f408484613028565b9050818015612f4c5750805b15612f575750505050565b8015612fbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e207365740000000000000000000060448201526064016106c4565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60018201546000901561309a5773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061307257613072613772565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461309d565b60005b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e9857600080fd5b6000602082840312156130da57600080fd5b61309d826130a4565b6000815180845260005b81811015613109576020818501810151868301820152016130ed565b8181111561311b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061309d60208301846130e3565b6000806040838503121561317457600080fd5b61317d836130a4565b946020939093013593505050565b6000806000606084860312156131a057600080fd5b6131a9846130a4565b95602085013595506040909401359392505050565b600081518084526020808501945080840160005b8381101561320457815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016131d2565b509495945050505050565b60408152600061322260408301856131be565b90508260208301529392505050565b60008060006060848603121561324657600080fd5b61324f846130a4565b925061325d602085016130a4565b9150604084013590509250925092565b60006020828403121561327f57600080fd5b813567ffffffffffffffff81111561329657600080fd5b820160a0818503121561309d57600080fd5b60008083601f8401126132ba57600080fd5b50813567ffffffffffffffff8111156132d257600080fd5b6020830191508360208285010111156132ea57600080fd5b9250929050565b60008060006040848603121561330657600080fd5b83359250602084013567ffffffffffffffff81111561332457600080fd5b613330868287016132a8565b9497909650939450505050565b60208152600061309d60208301846131be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561339557600080fd5b61339e856130a4565b93506133ac602086016130a4565b925060408501359150606085013567ffffffffffffffff808211156133d057600080fd5b818701915087601f8301126133e457600080fd5b8135818111156133f6576133f6613350565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561343c5761343c613350565b816040528281528a602084870101111561345557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561348c57600080fd5b613495836130a4565b91506134a3602084016130a4565b90509250929050565b600080600080606085870312156134c257600080fd5b6134cb856130a4565b935060208501359250604085013567ffffffffffffffff8111156134ee57600080fd5b6134fa878288016132a8565b95989497509550505050565b600181811c9082168061351a57607f821691505b60208210811415613554577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561359c5761359c61355a565b500190565b6000828210156135b3576135b361355a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015280861660408401525083606083015260a060808301526135ff60a08301846130e3565b979650505050505050565b82815260406020820152600061362360408301846130e3565b949350505050565b60006020828403121561363d57600080fd5b8151801515811461309d57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261368257600080fd5b83018035915067ffffffffffffffff82111561369d57600080fd5b6020019150368190038213156132ea57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015260a0608083015261374360a0830184866136b2565b98975050505050505050565b8381526040602082015260006137696040830184866136b2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020815260006136236020830184866136b2565b6000602082840312156137c757600080fd5b5051919050565b60208152600073ffffffffffffffffffffffffffffffffffffffff8084511660208401528060208501511660408401528060408501511660608401525060608301516080830152608083015160a08084015261362360c08401826130e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220641f06d79275507ebd1158902b2424f004c2655df90a58b5f8787204d2a894d764736f6c634300080a0033", + "numDeployments": 24, + "solcInputHash": "86d80cd7711949cd078774435b1d68c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InternalMethod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequiresContinuousSupply\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"RequiresDifferentSenderAndRecipient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresFastMembership\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresIssuerMembership\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresMarketplaceActiveMembership\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"}],\"name\":\"RequiresPositiveBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequiresTransfersEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresValidTokenHolder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"}],\"name\":\"beforeRemovingMember\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"disapprove\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"givenAllowanceCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"holders\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateAllowancesByOwner\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"perPage\",\"type\":\"uint256\"}],\"name\":\"paginateAllowancesBySpender\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performDisapproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"internalType\":\"struct FastTokenFacet.TransferArgs\",\"name\":\"p\",\"type\":\"tuple\"}],\"name\":\"performTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"receivedAllowanceCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"}],\"name\":\"retrieveDeadTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"transferFromWithRef\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"transferWithRef\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"params\":{\"amount\":\"is how much to **increase** the allowance.\",\"spender\":\"is the address to allow spending from the caller's wallet.\"}},\"balanceOf(address)\":{\"params\":{\"owner\":\"The owners address to get the balance of.\"},\"returns\":{\"_0\":\"uint256 The current balance of this owner's account.\"}},\"burn(uint256,string)\":{\"params\":{\"amount\":\"The number of FAST tokens to mint.\",\"ref\":\"A reference for this minting operation.\"}},\"decimals()\":{\"returns\":{\"_0\":\"uint256 Number of decimals the FAST has.\"}},\"disapprove(address,uint256)\":{\"params\":{\"amount\":\"is how much to **decrease** the allowance.\",\"spender\":\"is the address to disallow spending from the caller's wallet.\"}},\"mint(uint256,string)\":{\"params\":{\"amount\":\"The number of FAST tokens to mint.\",\"ref\":\"A reference for this minting operation.\"}},\"name()\":{\"returns\":{\"_0\":\"string Name of the FAST.\"}},\"performApproval(address,address,uint256)\":{\"params\":{\"amount\":\"is how much to **increase** the current allowance by. Note: This function runs when amount is zero, and will emit.\",\"from\":\"is the wallet from which to give the allowance.\",\"spender\":\"is the receiver of the allowance.\"}},\"retrieveDeadTokens(address)\":{\"params\":{\"holder\":\"is the address for which to move the tokens from.\"}},\"symbol()\":{\"returns\":{\"_0\":\"string Symbol of the FAST.\"}},\"totalSupply()\":{\"returns\":{\"_0\":\"uint256 Total supply of the FAST.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"}},\"kind\":\"user\",\"methods\":{\"approve(address,uint256)\":{\"notice\":\"This method directly calls `performApproval`, setting its `from` paramter to the sender of the transaction.\"},\"balanceOf(address)\":{\"notice\":\"The balance of the passed owner (ERC20 standard).\"},\"burn(uint256,string)\":{\"notice\":\"Burns an amount of FAST tokens. A reference can be passed to identify why this happened for example. Business logic. - Modifiers: - Requires the caller to be a member of the Issuer contract. - Requires that the token has continuous supply. - Requires that there are enough funds in the reserve to cover for `amount` being burnt. - Decreases the reserve balance by `amount`. - Calls `FastHistoryFacet.burnt(amount, ref)`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Emits a `Burnt(amount, ref)`.\"},\"decimals()\":{\"notice\":\"The `decimals` of this FAST (ERC20 standard).\"},\"disapprove(address,uint256)\":{\"notice\":\"This method directly calls `performDisapproval`, setting its `from` parameter to the sender of the transaction.\"},\"mint(uint256,string)\":{\"notice\":\"Mints an amount of FAST tokens. A reference can be passed to identify why this happened for example. Business logic: - Modifiers: - Requires the caller to be a member of the Issuer contract. - Requires that either the token has continuous supply, or that no tokens have been minted yet. - Increases the reserve balance by `amount`. - Calls `FastHistoryFacet.minted`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Emits a `Minted(amount, ref)` event.\"},\"name()\":{\"notice\":\"The name of this FAST (ERC20 standard).\"},\"performApproval(address,address,uint256)\":{\"notice\":\"Increases the allowance given by `from` to `spender` by `amount`. Note that this function should run and emit even if the amount passed is zero. Business logic: - Modifiers: - Only facets of the current diamond should be able to call this. - Requires that `onlyTokenHolder` passes for the `from` address. - Requires that the `amount` is positive number. - Increases the allowance given by `from` to `spender` by `amount`. - Update the allowance lookup tables in both directions. - Emits an `Approval(from, spender, amount)`.\"},\"performDisapproval(address,address,uint256)\":{\"notice\":\"Decreases allowance given by `from` to `spender` by `amount`. Business logic: - Modifiers: - Only facets of the current diamond should be able to call this. - The allowance given by `from` to `spender` is decreased by `amount`. - Whether the allowance reached zero, stop tracking it by owner and by spender. - Emit a `Disapproval(from, spender, amount)` event. Note: This function runs when amount is zero, and will emit.\"},\"performTransfer((address,address,address,uint256,string))\":{\"notice\":\"This is the internal method that gets called whenever a transfer is initiated. Both `transfer`, `transferWithRef`, and their variants internally call this function. Business logic: - Modifiers: - Only facets of the current diamond should be able to call this. - Requires that transfers are enabled for this FAST. - Requires that `from` and `to` are different addresses. - Requires that `from` membership is active in the marketplace. - If `from` is not the reserve, requires that `from` is a valid token holder. - If `from` is the reserve, requires that the message sender is an issuer member. - Requires that `to` is a valid token holder. - Requires that the amount is a positive value. - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address, - The allowance given by the `from` address to the `spender` covers for the `amount`. - If we are **not** transfering **from** the reserve, - Decreases the allowance given by `from` to `spender`. - If the new allowance reaches zero, - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions. - Decreases the balance of the `owner` address. - Increases the balance of the `to` address by `amount`. - If we are **not** transfering **from** the reserve, - Requires that there are enough transfer credits to cover for `amount`. - Decreases the transfer credits by `amount`. - If the `to` address is the reserve, - Decreases the total supply by `amount`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Else, if the `from` address is the reserve, - Increases the total supply by `amount`. - Calls `FastFrontendFacet.emitDetailsChanged`. - Calls `FastHistoryFacet.transfered`. - Emits a `Transfer(from, to, amount)` event.\"},\"retrieveDeadTokens(address)\":{\"notice\":\"Allows an Issuer member to move an arbitrary account's holdings back to the reserve, as per regulatory requirements. Business logic: - Modifiers: - Requires that the caller is a member of the Issuer contract. - If the amount held by `holder` is not zero - The balance of `holder` should be set to zero. - The reserve's balance should be increased by how much was on the holder's account. - Total supply should be decreased by that amount too. - The `holder`'s address should not be tracked as a token holder in this FAST anymore. - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore. - A `Transfer(holder, reserve, amount)` event should be emited. - If the amount previously held by `holder` was not zero, - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\"},\"symbol()\":{\"notice\":\"The symbol of this FAST (ERC20 standard).\"},\"totalSupply()\":{\"notice\":\"The total supply of the FAST (ERC20 standard).\"},\"transfer(address,uint256)\":{\"notice\":\"See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. \"},\"transferFrom(address,address,uint256)\":{\"notice\":\"See `performTransfer`, the `ref` will be defaulted.\"},\"transferFromWithRef(address,address,uint256,string)\":{\"notice\":\"See `performTransfer`.\"},\"transferWithRef(address,uint256,string)\":{\"notice\":\"See `performTransfer`, the spender will be equal to the `owner`. \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastTokenFacet.sol\":\"FastTokenFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@opengsn/contracts/src/forwarder/IForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"@openzeppelin/contracts/interfaces/IERC165.sol\\\";\\n\\n/**\\n * @title The Forwarder Interface\\n * @notice The contracts implementing this interface take a role of authorization, authentication and replay protection\\n * for contracts that choose to trust a `Forwarder`, instead of relying on a mechanism built into the Ethereum protocol.\\n *\\n * @notice if the `Forwarder` contract decides that an incoming `ForwardRequest` is valid, it must append 20 bytes that\\n * represent the caller to the `data` field of the request and send this new data to the target address (the `to` field)\\n *\\n * :warning: **Warning** :warning: The Forwarder can have a full control over a `Recipient` contract.\\n * Any vulnerability in a `Forwarder` implementation can make all of its `Recipient` contracts susceptible!\\n * Recipient contracts should only trust forwarders that passed through security audit,\\n * otherwise they are susceptible to identity theft.\\n */\\ninterface IForwarder is IERC165 {\\n\\n /**\\n * @notice A representation of a request for a `Forwarder` to send `data` on behalf of a `from` to a target (`to`).\\n */\\n struct ForwardRequest {\\n address from;\\n address to;\\n uint256 value;\\n uint256 gas;\\n uint256 nonce;\\n bytes data;\\n uint256 validUntilTime;\\n }\\n\\n event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue);\\n\\n event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr);\\n\\n /**\\n * @param from The address of a sender.\\n * @return The nonce for this address.\\n */\\n function getNonce(address from)\\n external view\\n returns(uint256);\\n\\n /**\\n * @notice Verify the transaction is valid and can be executed.\\n * Implementations must validate the signature and the nonce of the request are correct.\\n * Does not revert and returns successfully if the input is valid.\\n * Reverts if any validation has failed. For instance, if either signature or nonce are incorrect.\\n * Reverts if `domainSeparator` or `requestTypeHash` are not registered as well.\\n */\\n function verify(\\n ForwardRequest calldata forwardRequest,\\n bytes32 domainSeparator,\\n bytes32 requestTypeHash,\\n bytes calldata suffixData,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * @notice Executes a transaction specified by the `ForwardRequest`.\\n * The transaction is first verified and then executed.\\n * The success flag and returned bytes array of the `CALL` are returned as-is.\\n *\\n * This method would revert only in case of a verification error.\\n *\\n * All the target errors are reported using the returned success flag and returned bytes array.\\n *\\n * @param forwardRequest All requested transaction parameters.\\n * @param domainSeparator The domain used when signing this request.\\n * @param requestTypeHash The request type used when signing this request.\\n * @param suffixData The ABI-encoded extension data for the current `RequestType` used when signing this request.\\n * @param signature The client signature to be validated.\\n *\\n * @return success The success flag of the underlying `CALL` to the target address.\\n * @return ret The byte array returned by the underlying `CALL` to the target address.\\n */\\n function execute(\\n ForwardRequest calldata forwardRequest,\\n bytes32 domainSeparator,\\n bytes32 requestTypeHash,\\n bytes calldata suffixData,\\n bytes calldata signature\\n )\\n external payable\\n returns (bool success, bytes memory ret);\\n\\n /**\\n * @notice Register a new Request typehash.\\n *\\n * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712.\\n *\\n * @param typeName The name of the request type.\\n * @param typeSuffix Any extra data after the generic params. Must contain add at least one param.\\n * The generic ForwardRequest type is always registered by the constructor.\\n */\\n function registerRequestType(string calldata typeName, string calldata typeSuffix) external;\\n\\n /**\\n * @notice Register a new domain separator.\\n *\\n * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712.\\n *\\n * @notice The domain separator must have the following fields: `name`, `version`, `chainId`, `verifyingContract`.\\n * The `chainId` is the current network's `chainId`, and the `verifyingContract` is this Forwarder's address.\\n * This method accepts the domain name and version to create and register the domain separator value.\\n * @param name The domain's display name.\\n * @param version The domain/protocol version.\\n */\\n function registerDomainSeparator(string calldata name, string calldata version) external;\\n}\\n\",\"keccak256\":\"0x28669953bd3dcc98a5f959fa3cac97444584b6fbe59341681b9a59f11a83b171\",\"license\":\"GPL-3.0-only\"},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0xd04b0f06e0666f29cf7cccc82894de541e19bb30a765b107b1e40bb7fe5f7d7a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x32b378bdd83c63676854bbc408fbeea2471ba3821c888ec8703a963cbf5b4030\",\"license\":\"MIT\"},\"contracts/common/AHasContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// import \\\"hardhat/console.sol\\\";\\n\\n/**\\n * @title The Context behaviour abstract contract.\\n * @notice The AHasContext abstract contract is in charge of adding the required\\n * base implementation of ERC-2771 - see: https://eips.ethereum.org/EIPS/eip-2771\\n * the key difference is that `isTrustedForwarder` becomes an internal method.\\n */\\nabstract contract AHasContext {\\n /// @dev Must be implemented by the inheriting contract.\\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool);\\n\\n // The following is copied from:\\n // https://github.com/opengsn/gsn/blob/v3.0.0-beta.10/packages/contracts/src/ERC2771Recipient.sol\\n // With a slight change to call `_isTrustedForwarder` instead of `isTrustedForwarder`.\\n\\n /// @notice Default implemention.\\n function _msgSender() internal view virtual returns (address ret) {\\n // console.log(\\\"msg.sender\\\", msg.sender);\\n // console.log(\\\"msg.data\\\", msg.data);\\n if (msg.data.length >= 20 && _isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n // console.log(\\\"ret \\\", ret);\\n return ret;\\n }\\n\\n /// @notice Default implemention.\\n function _msgData() internal view virtual returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && _isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length - 20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7d7e74084b45b6230202e359843f9c0e7797308f3d0ddfce5cd4a5a8003853a\",\"license\":\"MIT\"},\"contracts/common/AHasForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/LibHasForwarder.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IERC165.sol\\\"; // Interface Support.\\n\\nimport \\\"@opengsn/contracts/src/forwarder/IForwarder.sol\\\";\\n\\n/**\\n * @title The Forwarder behaviour abstract contract.\\n * @notice The AHasForwarder abstract contract is in charge of adding the Forwarder\\n * functionality to any contract inheriting from it.\\n */\\nabstract contract AHasForwarder {\\n /// Errors.\\n\\n /**\\n * @notice Happens when a function is called by a non forwarder manager.\\n * @param who is the address that called the function.\\n */\\n error RequiresForwarderManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a forwarder is set on an implementing contract.\\n * @param forwarderAddress is the address of the trusted forwarder.\\n */\\n event ForwarderChanged(address forwarderAddress);\\n\\n // SEE: https://github.com/opengsn/gsn/blob/v3.0.0-beta.10/packages/contracts/src/ERC2771Recipient.sol\\n\\n /**\\n * @notice ERC2771Recipient implementation.\\n * @param _forwarderAddress the forwarder address.\\n * @return bool if the forwarder is trusted.\\n */\\n function isTrustedForwarder(address _forwarderAddress) public view returns (bool) {\\n return _forwarderAddress == LibHasForwarder.data().forwarderAddress;\\n }\\n\\n /**\\n * @notice ERC2771Recipient implementation.\\n * @param _forwarderAddress the forwarder address.\\n */\\n function setTrustedForwarder(address _forwarderAddress) external onlyForwarderManager {\\n if (!IERC165(_forwarderAddress).supportsInterface(type(IForwarder).interfaceId))\\n revert ICustomErrors.InterfaceNotSupported(\\\"IForwarder\\\");\\n\\n LibHasForwarder.Data storage ds = LibHasForwarder.data();\\n ds.forwarderAddress = _forwarderAddress;\\n\\n emit ForwarderChanged(_forwarderAddress);\\n }\\n\\n /**\\n * WARNING: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder.\\n * @notice Method is not a required method to allow Recipients to trust multiple Forwarders. Not recommended yet.\\n * @return forwarderAddress The address of the Forwarder contract that is being used.\\n */\\n function getTrustedForwarder() public view virtual returns (address forwarderAddress) {\\n return LibHasForwarder.data().forwarderAddress;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a forwarder manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidForwarderManager(address who) internal view virtual returns (bool);\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the forwarder manager.\\n modifier onlyForwarderManager() virtual {\\n if (!isValidForwarderManager(msg.sender)) revert RequiresForwarderManager(msg.sender);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x96bdf4d90ba871d0b6cdc3c4217d02b41e0ef9f71d8fb5579d382cbe75dc71aa\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasGovernors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Default implementation - points to `_msgSender()`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(_msgSender()) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(_msgSender()) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xd1f8fc31da0062248ab8f238b67e499ee0004232415aceaa8f4f4600fee16706\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasMembers.sol\\\";\\n\\n/**\\n * @title The Members behaviour abstract contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Default implementation - points to `msg.sender`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(_msgSender()) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(_msgSender()) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x92011882d076ba62aac90c181c8f374566ca5c683441570a7239fd89851e97ff\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibHasForwarder {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasForwarder.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xa9930c2ffa1b605b0243ba36b3020146bcba5a29c05a711f5ca7c705a8e851ca;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we store the trusted forwarder address.\\n address forwarderAddress;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41d08f6cc69c5133d4b853803fab0c4b05f1f0d7c31331c4aa5b590b8dac0c9b\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"../marketplace/MarketplaceAccessFacet.sol\\\";\\nimport \\\"../issuer/IssuerAccessFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The FAST Access facet is the source of truth when it comes to\\n * permissioning and ACLs within a given FAST.\\n */\\ncontract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers, AHasContext {\\n using LibAddressSet for LibAddressSet.Data;\\n /// Structs.\\n\\n /**\\n * @notice This structure isn't used anywhere in storage. Instead, it\\n * allows various methods of the contract to return all the flags\\n * associated with a given address in one go.\\n */\\n struct Flags {\\n /// @notice Whether or not the item in scope is considered a governor of this FAST.\\n bool isGovernor;\\n /// @notice Whether or not the item in scope is considered a member of this FAST.\\n bool isMember;\\n }\\n\\n /// AHasContext implementation.\\n\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n // Override base classes to use the AHasContext implementation.\\n function _msgSender() internal view override(AHasMembers, AHasGovernors, AHasContext) returns (address) {\\n return AHasContext._msgSender();\\n }\\n\\n /// AHasGovernors implementation.\\n\\n function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n\\n function isValidGovernor(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onGovernorAdded(address governor) internal override(AHasGovernors) {\\n // If the governor isn't a FAST member yet, add them.\\n if (!AHasMembers(this).isMember(governor)) AHasMembers(this).addMember(governor);\\n // Notify issuer that this governor was added to this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorAddedToFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onGovernorRemoved(address governor) internal override(AHasGovernors) {\\n // Notify issuer that this governor was removed from this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorRemovedFromFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return\\n // The current contract should be able to manage its own members.\\n address(this) == who ||\\n // Governors can manage members.\\n AHasGovernors(this).isGovernor(who) ||\\n // Automatons with the correct privilege can manage members.\\n AHasAutomatons(address(this)).automatonCan(who, FAST_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal view override(AHasMembers) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onMemberAdded(address member) internal override(AHasMembers) {\\n // Notify marketplace that this member was added to this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberAddedToFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onMemberRemoved(address member) internal override(AHasMembers) {\\n // Notify token facet that this member was removed.\\n FastTokenFacet(address(this)).beforeRemovingMember(member);\\n // Notify marketplace that this member was removed from this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberRemovedFromFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// Flags.\\n\\n /**\\n * @notice Retrieves flags for a given address.\\n * @param a is the address to retrieve flags for.\\n * @return A `Flags` struct.\\n */\\n function flags(address a) external view returns (Flags memory) {\\n return Flags({isGovernor: AHasGovernors(address(this)).isGovernor(a), isMember: AHasMembers(this).isMember(a)});\\n }\\n}\\n\",\"keccak256\":\"0x38f3f5446880829a09bc75190ab90612fd0e26ff215ddcfbff08fc862f334c00\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/FastFrontendFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"./lib/LibFastDistributions.sol\\\";\\nimport \\\"./lib/LibFastCrowdfunds.sol\\\";\\n\\n/**\\n * @notice A facet dedicated to view / UI only methods. This facet should never hold any method that\\n * is not either `pure` or `view`, except to emit events.\\n */\\ncontract FastFrontendFacet is AFastFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Data structures.\\n\\n /**\\n * @notice This struct groups the common attributes of a FAST.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n /// @notice The `address` of the FAST.\\n address addr;\\n /// @notice The `name` of the FAST (ERC20).\\n string name;\\n /// @notice The `symbol` of the FAST (ERC20).\\n string symbol;\\n /// @notice The `decimals` of the FAST (ERC20).\\n uint8 decimals;\\n /// @notice The `totalSupply` of the FAST (ERC20).\\n uint256 totalSupply;\\n /// @notice Whether the FAST is semi public or not.\\n bool isSemiPublic;\\n /// @notice Whether the FAST has a fixed supply or continious.\\n bool hasFixedSupply;\\n /// @notice Whether the transfers are enabled or not for this FAST.\\n bool transfersDisabled;\\n /// @notice The default crowdfunds basis point fee.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n /// @notice The reserve balance.\\n uint256 reserveBalance;\\n /// @notice The number of members the FAST has.\\n uint256 memberCount;\\n /// @notice The number of governors for the FAST.\\n uint256 governorCount;\\n }\\n\\n /**\\n * @notice Member level details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct PrivilegesDetails {\\n /// @notice The Member's address.\\n address addr;\\n /// @notice The Member's balance.\\n uint256 balance;\\n /// @notice The Member's ETH balance.\\n uint256 ethBalance;\\n /// @notice Whether or not the address is a Member.\\n bool isMember;\\n /// @notice Whether or not the address is a Governor.\\n bool isGovernor;\\n /// @notice Automaton flags assigned to this address.\\n uint32 automatonPrivileges;\\n }\\n\\n /// Emitters.\\n\\n /**\\n * @notice Called by diamond facets, signals that FAST details may have changed.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be another facet of the diamond.\\n * Emits `DetailsChanged`, see `IFastEvents.DetailsChanged`\\n */\\n function emitDetailsChanged() external onlyDiamondFacet {\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n emit DetailsChanged({\\n transfersDisabled: LibFast.data().transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n memberCount: LibHasMembers.data().memberSet.values.length,\\n governorCount: LibHasGovernors.data().governorSet.values.length,\\n totalSupply: tokenData.totalSupply,\\n reserveBalance: tokenData.balances[LibHelpers.ZERO_ADDRESS]\\n });\\n }\\n\\n /// Public functions.\\n\\n /**\\n * @notice Gets the details of a FAST.\\n * @return The details for the current FAST, see `Details`.\\n */\\n function details() public view returns (Details memory) {\\n LibFast.Data storage topStorage = LibFast.data();\\n LibFastToken.Data storage tokenStorage = LibFastToken.data();\\n return\\n Details({\\n addr: address(this),\\n name: tokenStorage.name,\\n symbol: tokenStorage.symbol,\\n decimals: tokenStorage.decimals,\\n totalSupply: tokenStorage.totalSupply,\\n isSemiPublic: topStorage.isSemiPublic,\\n hasFixedSupply: topStorage.hasFixedSupply,\\n transfersDisabled: topStorage.transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n reserveBalance: tokenStorage.balances[LibHelpers.ZERO_ADDRESS],\\n memberCount: AHasMembers(address(this)).memberCount(),\\n governorCount: LibHasGovernors.data().governorSet.values.length\\n });\\n }\\n\\n /**\\n * @notice Gets detailed address privileges details.\\n * @param addr The address to get the privileges for.\\n * @return A FAST member's details, see `MemberDetails`.\\n */\\n function detailedPrivileges(address addr) public view returns (PrivilegesDetails memory) {\\n return\\n PrivilegesDetails({\\n addr: addr,\\n balance: LibFastToken.data().balances[addr],\\n ethBalance: (payable(addr).balance),\\n isMember: AHasMembers(address(this)).isMember(addr),\\n isGovernor: AHasGovernors(address(this)).isGovernor(addr),\\n automatonPrivileges: AHasAutomatons(address(this)).automatonPrivileges(addr)\\n });\\n }\\n\\n function paginateDetailedMembers(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n LibHasMembers.Data storage membersData = LibHasMembers.data();\\n (address[] memory members, uint256 nextCursor) = LibPaginate.addresses(membersData.memberSet.values, index, perPage);\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](members.length);\\n uint256 length = members.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(members[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedGovernors(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n (address[] memory governors, uint256 nextCursor) = LibPaginate.addresses(\\n LibHasGovernors.data().governorSet.values,\\n index,\\n perPage\\n );\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](governors.length);\\n uint256 length = governors.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(governors[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedDistributions(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Distribution.Details[] memory, uint256) {\\n (address[] memory distributions, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastDistributions.data().distributionSet.values,\\n index,\\n perPage\\n );\\n Distribution.Details[] memory values = new Distribution.Details[](distributions.length);\\n uint256 length = distributions.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Distribution(distributions[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n /**\\n * @dev Paginates detailed crowdfunds.\\n * @param index The index of the first crowdfund to return.\\n * @param perPage The number of crowdfunds to return.\\n * @return An array of crowdfund details, see `CrowdfundDetails`.\\n */\\n function paginateDetailedCrowdfunds(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Crowdfund.Details[] memory, uint256) {\\n (address[] memory crowdfunds, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastCrowdfunds.data().crowdfundSet.values,\\n index,\\n perPage\\n );\\n Crowdfund.Details[] memory values = new Crowdfund.Details[](crowdfunds.length);\\n uint256 length = crowdfunds.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Crowdfund(crowdfunds[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n}\\n\",\"keccak256\":\"0xdf236a27eb3441e06a4d9aa972a1677f4aed718cb4028f13462bfc7c87670729\",\"license\":\"MIT\"},\"contracts/fast/FastHistoryFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastHistory.sol\\\";\\n\\n/**\\n * @notice Although past events could be scrapped from the chain, we want to\\n * the frontend to be capable of listing past transfers and minting / burning events.\\n * This facet is in charge of performing archival of these things.\\n */\\ncontract FastHistoryFacet is AFastFacet {\\n /// Minting history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are minted.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Mint` on top of the stack.\\n */\\n function minted(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the mint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Mint, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are burnt.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Burn` on top of the stack.\\n */\\n function burnt(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the unmint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Burn, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice Returns the number of supply proofs (minting and burning together) ever created.\\n * @return A `uint256`.\\n */\\n function supplyProofCount() external view returns (uint256) {\\n return LibFastHistory.data().supplyProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of supply proofs (minting and burning together).\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.SupplyProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateSupplyProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n return LibPaginate.supplyProofs(LibFastHistory.data().supplyProofs, cursor, perPage);\\n }\\n\\n /// Transfer history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever a transfer has completed successfuly.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Keeps track of the operation in various tracking structures, so that it can be queried later by `sender` and `recipient`.\\n * - Pushes a transfer proof to the main transfer proof tracking stack.\\n */\\n function transfered(\\n address spender,\\n address from,\\n address to,\\n uint256 amount,\\n string calldata ref\\n ) external onlyDiamondFacet {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n // Keep track of the transfer proof ID for the sender and for the recipient.\\n s.transferProofInvolvements[from].push(s.transferProofs.length);\\n s.transferProofInvolvements[to].push(s.transferProofs.length);\\n // Keep track of the transfer proof globally.\\n s.transferProofs.push(\\n LibFastHistory.TransferProof({\\n spender: spender,\\n from: from,\\n to: to,\\n amount: amount,\\n blockNumber: block.number,\\n ref: ref\\n })\\n );\\n }\\n\\n /**\\n * @notice Returns the number of transfer proofs ever created.\\n * @return A `uint256`.\\n */\\n function transferProofCount() external view returns (uint256) {\\n return LibFastHistory.data().transferProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of transfer proofs.\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateTransferProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n return LibPaginate.transferProofs(LibFastHistory.data().transferProofs, cursor, perPage);\\n }\\n\\n /**\\n * @notice Counts all past inbound and outbound transfers involving a given address.\\n * @param involvee is the address for which to get the transfer proofs.\\n */\\n function transferProofByInvolveeCount(address involvee) external view returns (uint256) {\\n return LibFastHistory.data().transferProofInvolvements[involvee].length;\\n }\\n\\n /**\\n * @notice Returns pages of indices of past inbound and outbound transfer proofs by involvee.\\n * @dev This function is reading from an indexing data structure. Each index points to a record\\n * in the main transfer proof storage, and can then be found in `transferProofs` at returned indices.\\n * @param involvee is the address for which to retrieve a page of data.\\n * @param cursor is where to start.\\n * @param perPage is how many records at most should be returned.\\n */\\n function paginateTransferProofIndicesByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (uint256[] memory, uint256) {\\n return LibPaginate.uint256s(LibFastHistory.data().transferProofInvolvements[involvee], cursor, perPage);\\n }\\n\\n /**\\n * @notice Returns a page of inbound and outbound transfer proofs based on an involvee.#\\n * @param involvee is the address for which to fetch the data.\\n * @param cursor is where to start.\\n * @param perPage is how many items at most to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing the results and the cursor to the next page.\\n */\\n function paginateTransferProofsByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n uint256[] storage collection = s.transferProofInvolvements[involvee];\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = s.transferProofs[collection[cursor + i]];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0x6c517db2a7885a0991311827bb240e6003e1ceabe24f7d7fd245b3c0b0b5e08b\",\"license\":\"MIT\"},\"contracts/fast/FastTokenFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../lib/LibDiamond.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"../marketplace/MarketplaceTokenHoldersFacet.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastAccessFacet.sol\\\";\\nimport \\\"./FastHistoryFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\n\\ncontract FastTokenFacet is AFastFacet, IERC20 {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Constants.\\n\\n string internal constant DEAD_TOKENS_RETRIEVAL = \\\"Dead tokens retrieval\\\";\\n\\n /// Minting methods.\\n\\n /**\\n * @notice Mints an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that either the token has continuous supply, or that no tokens have been minted yet.\\n * - Increases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.minted`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Minted(amount, ref)` event.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function mint(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // We want to make sure that either of these two is true:\\n // - The token doesn't have fixed supply.\\n // - The token has fixed supply but has no tokens yet (First and only mint).\\n if (FastTopFacet(address(this)).hasFixedSupply() && (s.totalSupply != 0 || this.balanceOf(address(0)) != 0))\\n revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Prepare the minted amount on the zero address.\\n s.balances[address(0)] += amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).minted(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Minted(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Burns an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic.\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that the token has continuous supply.\\n * - Requires that there are enough funds in the reserve to cover for `amount` being burnt.\\n * - Decreases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.burnt(amount, ref)`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Burnt(amount, ref)`.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function burn(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n if (FastTopFacet(address(this)).hasFixedSupply()) revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Remove the minted amount from the zero address.\\n s.balances[address(0)] -= amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).burnt(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Burnt(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Allows an Issuer member to move an arbitrary account's holdings back to the reserve,\\n * as per regulatory requirements.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires that the caller is a member of the Issuer contract.\\n * - If the amount held by `holder` is not zero\\n * - The balance of `holder` should be set to zero.\\n * - The reserve's balance should be increased by how much was on the holder's account.\\n * - Total supply should be decreased by that amount too.\\n * - The `holder`'s address should not be tracked as a token holder in this FAST anymore.\\n * - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore.\\n * - A `Transfer(holder, reserve, amount)` event should be emited.\\n * - If the amount previously held by `holder` was not zero,\\n * - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\\n * @param holder is the address for which to move the tokens from.\\n */\\n function retrieveDeadTokens(address holder) external onlyIssuerMember {\\n // Cache how many tokens the holder has.\\n uint256 amount = balanceOf(holder);\\n // Note: The amount **can** be zero in this function.\\n\\n // Grab a pointer to the token storage.\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // These should only run if the amount is zero, as they result in a no-op.\\n if (amount > 0) {\\n // Set the holder balance to zero.\\n s.balances[holder] = 0;\\n // Increment the reserve's balance.\\n s.balances[address(0)] += amount;\\n // The tokens aren't in circulation anymore - decrease total supply.\\n s.totalSupply -= amount;\\n }\\n\\n // Since the holder's account is now empty, make sure to keep track of it both\\n // in this FAST and in the marketplace.\\n s.tokenHolders.remove(holder, true);\\n MarketplaceTokenHoldersFacet(LibFast.data().marketplace).fastBalanceChanged(holder, 0);\\n\\n // Keep track of this transfer in history facet.\\n FastHistoryFacet(address(this)).transfered(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n\\n // This operation can be seen as a regular transfer between holder and reserve. Emit.\\n emit FastTransfer(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n emit IERC20.Transfer(holder, address(0), amount);\\n\\n // If amount wasn't zero, total supply and reserve balance have changed - emit.\\n if (amount > 0) FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n // ERC20 implementation and transfer related methods.\\n\\n /**\\n * @notice The name of this FAST (ERC20 standard).\\n * @return string Name of the FAST.\\n */\\n function name() external view returns (string memory) {\\n return LibFastToken.data().name;\\n }\\n\\n /**\\n * @notice The symbol of this FAST (ERC20 standard).\\n * @return string Symbol of the FAST.\\n */\\n function symbol() external view returns (string memory) {\\n return LibFastToken.data().symbol;\\n }\\n\\n /**\\n * @notice The `decimals` of this FAST (ERC20 standard).\\n * @return uint256 Number of decimals the FAST has.\\n */\\n function decimals() external view returns (uint256) {\\n return LibFastToken.data().decimals;\\n }\\n\\n /**\\n * @notice The total supply of the FAST (ERC20 standard).\\n * @return uint256 Total supply of the FAST.\\n */\\n function totalSupply() external view override(IERC20) returns (uint256) {\\n return LibFastToken.data().totalSupply;\\n }\\n\\n /**\\n * @notice The balance of the passed owner (ERC20 standard).\\n * @param owner The owners address to get the balance of.\\n * @return uint256 The current balance of this owner's account.\\n */\\n function balanceOf(address owner) public view override(IERC20) returns (uint256) {\\n return LibFastToken.data().balances[owner];\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. */\\n function transfer(address to, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(\\n TransferArgs({\\n spender: msg.sender,\\n from: msg.sender,\\n to: to,\\n amount: amount,\\n ref: LibFastToken.DEFAULT_TRANSFER_REFERENCE\\n })\\n );\\n return true;\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`. */\\n function transferWithRef(address to, uint256 amount, string calldata ref) external returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: msg.sender, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view override(IERC20) returns (uint256) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // If the allowance being queried is owned by the reserve, and `spender` is\\n // an Issuer member, `spender` owns the full balance of `owner`. If they are\\n // not an Issuer member then their allowance is zero. Otherwise, the regular given\\n // allowance for `spender` over `owner` applies.\\n if (owner == address(0)) return AHasMembers(LibFast.data().issuer).isMember(spender) ? s.balances[owner] : 0;\\n else return s.allowances[owner][spender];\\n }\\n\\n /**\\n * @notice This method directly calls `performApproval`, setting its `from` paramter to the sender of\\n * the transaction.\\n * @param spender is the address to allow spending from the caller's wallet.\\n * @param amount is how much to **increase** the allowance.\\n */\\n function approve(address spender, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performApproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice This method directly calls `performDisapproval`, setting its `from` parameter to the sender of\\n * the transaction.\\n * @param spender is the address to disallow spending from the caller's wallet.\\n * @param amount is how much to **decrease** the allowance.\\n */\\n function disapprove(address spender, uint256 amount) external onlyMember(msg.sender) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performDisapproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`, the `ref` will be defaulted.\\n function transferFrom(address from, address to, uint256 amount) external override(IERC20) returns (bool) {\\n transferFromWithRef(from, to, amount, LibFastToken.DEFAULT_TRANSFER_REFERENCE);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`.\\n function transferFromWithRef(address from, address to, uint256 amount, string memory ref) public returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: from, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n // Allowances query operations.\\n\\n function givenAllowanceCount(address owner) external view returns (uint256) {\\n return LibFastToken.data().allowancesByOwner[owner].values.length;\\n }\\n\\n function paginateAllowancesByOwner(\\n address owner,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesByOwner[owner].values, index, perPage);\\n }\\n\\n function receivedAllowanceCount(address spender) external view returns (uint256) {\\n return LibFastToken.data().allowancesBySpender[spender].values.length;\\n }\\n\\n function paginateAllowancesBySpender(\\n address spender,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesBySpender[spender].values, index, perPage);\\n }\\n\\n // These functions would be internal / private if we weren't using the diamond pattern.\\n // Instead, they're `onlyDiamondFacet` - eg can only be called by facets of the current\\n // FAST.\\n\\n struct TransferArgs {\\n address spender;\\n address from;\\n address to;\\n uint256 amount;\\n string ref;\\n }\\n\\n /**\\n * @notice This is the internal method that gets called whenever a transfer is initiated. Both `transfer`,\\n * `transferWithRef`, and their variants internally call this function.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that transfers are enabled for this FAST.\\n * - Requires that `from` and `to` are different addresses.\\n * - Requires that `from` membership is active in the marketplace.\\n * - If `from` is not the reserve, requires that `from` is a valid token holder.\\n * - If `from` is the reserve, requires that the message sender is an issuer member.\\n * - Requires that `to` is a valid token holder.\\n * - Requires that the amount is a positive value.\\n * - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address,\\n * - The allowance given by the `from` address to the `spender` covers for the `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Decreases the allowance given by `from` to `spender`.\\n * - If the new allowance reaches zero,\\n * - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions.\\n * - Decreases the balance of the `owner` address.\\n * - Increases the balance of the `to` address by `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Requires that there are enough transfer credits to cover for `amount`.\\n * - Decreases the transfer credits by `amount`.\\n * - If the `to` address is the reserve,\\n * - Decreases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Else, if the `from` address is the reserve,\\n * - Increases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Calls `FastHistoryFacet.transfered`.\\n * - Emits a `Transfer(from, to, amount)` event.\\n */\\n function performTransfer(TransferArgs calldata p) external onlyDiamondFacet {\\n // TODO: Make this function return instead of raising errors.\\n\\n // Grab a pointer to our top-level storage.\\n LibFast.Data storage topData = LibFast.data();\\n\\n // Requires that transfers are enabled for this FAST.\\n if (FastTopFacet(address(this)).transfersDisabled()) revert ICustomErrors.RequiresTransfersEnabled();\\n // Requires that `from` and `to` are different addresses.\\n else if (p.from == p.to) revert ICustomErrors.RequiresDifferentSenderAndRecipient(p.from);\\n // Requires that allowance transfers from the reserve are performed by issuer members only.\\n else if (p.from == address(0) && !AHasMembers(topData.issuer).isMember(p.spender))\\n revert ICustomErrors.RequiresIssuerMembership(p.spender);\\n // Requires that the `from` address can hold tokens.\\n else if (!canHoldTokens(p.from)) revert ICustomErrors.RequiresValidTokenHolder(p.from);\\n // Requires that the `from` address marketplace membership is active if not the reserve.\\n else if (p.from != address(0) && !IHasActiveMembers(LibFast.data().marketplace).isActiveMember(p.from))\\n revert ICustomErrors.RequiresMarketplaceActiveMembership(p.from);\\n // Requires that the `to` address can hold tokens.\\n else if (!canHoldTokens(p.to)) revert ICustomErrors.RequiresValidTokenHolder(p.to);\\n\\n // For any non-zero amount, update balances and allowances, notify other contracts, etc.\\n if (p.amount != 0) {\\n // Grab a pointer to our token storage.\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n\\n // If this is an allowance transfer and if the `from` account is not the reserve...\\n if (p.spender != p.from && p.from != address(0)) {\\n // Decrease allowance.\\n uint256 newAllowance = tokenData.allowances[p.from][p.spender] -= p.amount;\\n // If the allowance reached zero, we want to remove that allowance from\\n // the various other places where we keep track of it.\\n if (newAllowance == 0) {\\n tokenData.allowancesByOwner[p.from].remove(p.spender, true);\\n tokenData.allowancesBySpender[p.spender].remove(p.from, true);\\n }\\n }\\n\\n // Keep track of the balances - `from` spends (decrease), `to` receives (increase).\\n uint256 fromBalance = (tokenData.balances[p.from] -= p.amount);\\n uint256 toBalance = (tokenData.balances[p.to] += p.amount);\\n\\n // Keep track of who has what FAST.\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.from, fromBalance);\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.to, toBalance);\\n\\n // Keep track of who holds this token.\\n balanceChanged(p.from, fromBalance);\\n balanceChanged(p.to, toBalance);\\n\\n // If the funds are going to the reserve...\\n if (p.to == address(0)) {\\n // Decrease total supply.\\n tokenData.totalSupply -= p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n // If the funds are moving from the zero address...\\n else if (p.from == address(0)) {\\n // Increase total supply.\\n tokenData.totalSupply += p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n // Keep track of the transfer in the history facet.\\n FastHistoryFacet(address(this)).transfered(p.spender, p.from, p.to, p.amount, p.ref);\\n\\n // Emit!\\n emit FastTransfer(p.spender, p.from, p.to, p.amount, p.ref);\\n emit Transfer(p.from, p.to, p.amount);\\n }\\n\\n /**\\n * @notice Increases the allowance given by `from` to `spender` by `amount`.\\n * Note that this function should run and emit even if the amount passed is zero.\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that `onlyTokenHolder` passes for the `from` address.\\n * - Requires that the `amount` is positive number.\\n * - Increases the allowance given by `from` to `spender` by `amount`.\\n * - Update the allowance lookup tables in both directions.\\n * - Emits an `Approval(from, spender, amount)`.\\n * @param from is the wallet from which to give the allowance.\\n * @param spender is the receiver of the allowance.\\n * @param amount is how much to **increase** the current allowance by.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performApproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n // Allowance cannot be given over the reserve.\\n if (from == address(0)) revert ICustomErrors.UnsupportedOperation();\\n // Require that the `from` address can hold tokens.\\n else if (!canHoldTokens(from)) revert ICustomErrors.RequiresValidTokenHolder(from);\\n\\n if (amount > 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // Note that we are not exactly following ERC20 here - we don't want to **set** the allowance to `amount`\\n // to mitigate a possible attack.\\n // See https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.gmr6zdg47087.\\n s.allowances[from][spender] += amount;\\n // Keep track of given and received allowances.\\n s.allowancesByOwner[from].add(spender, true);\\n s.allowancesBySpender[spender].add(from, true);\\n }\\n\\n // Emit!\\n emit IERC20.Approval(from, spender, amount);\\n }\\n\\n /**\\n * @notice Decreases allowance given by `from` to `spender` by `amount`.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - The allowance given by `from` to `spender` is decreased by `amount`.\\n * - Whether the allowance reached zero, stop tracking it by owner and by spender.\\n * - Emit a `Disapproval(from, spender, amount)` event.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performDisapproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n if (amount != 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove allowance.\\n s.allowances[from][spender] -= amount;\\n\\n // Whenever the allowance reaches zero, stop tracking it by owner and spender.\\n if (s.allowances[from][spender] == 0) {\\n s.allowancesByOwner[from].remove(spender, true);\\n s.allowancesBySpender[spender].remove(from, true);\\n }\\n }\\n\\n // Emit!\\n emit Disapproval(from, spender, amount);\\n }\\n\\n // WARNING: This method contains two loops. We know that this should never\\n // happen in solidity. However:\\n // - In the context of our private chain, gas is cheap.\\n // - It can only be called by a governor.\\n function beforeRemovingMember(address member) external onlyDiamondFacet {\\n if (balanceOf(member) != 0) revert ICustomErrors.RequiresPositiveBalance(member);\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove all given allowances.\\n {\\n address[] storage gaData = s.allowancesByOwner[member].values;\\n while (gaData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address spender = gaData[0];\\n this.performDisapproval(member, spender, s.allowances[member][spender]);\\n }\\n }\\n\\n // Remove all received allowances.\\n {\\n address[] storage raData = s.allowancesBySpender[member].values;\\n while (raData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address owner = raData[0];\\n this.performDisapproval(owner, member, s.allowances[owner][member]);\\n }\\n }\\n }\\n\\n function holders() external view returns (address[] memory) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n return s.tokenHolders.values;\\n }\\n\\n function balanceChanged(address holder, uint256 balance) private {\\n // Return early if this is the zero address.\\n if (holder == address(0)) return;\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.tokenHolders.contains(holder))\\n s.tokenHolders.add(holder, false);\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.tokenHolders.contains(holder)) s.tokenHolders.remove(holder, false);\\n }\\n\\n // Private and helper methods.\\n\\n /**\\n * @notice Ensures that the given address is a member of the current FAST or the Zero Address.\\n *\\n * Business logic:\\n * - If the candidate is the reserve, it is a valid token holder.\\n * - If the FAST is semi-public,\\n * - We require that candidate is a member of the Marketplace contract and is active in it.\\n * - Otherwise,\\n * - Require that the candidate is a member of the FAST.\\n * @param candidate The address to check.\\n * @return A boolean set to `true` if `candidate` can hold tokens, `false` otherwise.\\n */\\n function canHoldTokens(address candidate) private view returns (bool) {\\n // Zero address can hold tokens, in any cases.\\n if (candidate == address(0)) return true;\\n // If the FAST is semi public, any member of the marketplace can hold tokens.\\n else if (FastTopFacet(address(this)).isSemiPublic()) {\\n return AHasMembers(LibFast.data().marketplace).isMember(candidate);\\n }\\n // FAST is private, only members of the fast can hold tokens.\\n else {\\n return AHasMembers(address(this)).isMember(candidate);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7a4b4820614c5dd57658ecfe853ec6daed8c1f87e14f3dd81adc03cda9780ed7\",\"license\":\"MIT\"},\"contracts/fast/FastTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./lib/IFastEvents.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\n\\ncontract FastTopFacet is AFastFacet {\\n // Getters and setters for global flags.\\n\\n /**\\n * @notice Get the Issuer address.\\n * @return address Address of Issuer.\\n */\\n function issuerAddress() external view returns (address) {\\n return LibFast.data().issuer;\\n }\\n\\n /**\\n * @notice Get the Marketplace address.\\n * @return address Address of Marketplace.\\n */\\n function marketplaceAddress() external view returns (address) {\\n return LibFast.data().marketplace;\\n }\\n\\n /**\\n * @notice Is this FAST a semi public FAST?\\n * @return bool Yes/no semi public.\\n */\\n function isSemiPublic() external view returns (bool) {\\n return LibFast.data().isSemiPublic;\\n }\\n\\n /**\\n * @notice Is this FAST a fixed supply FAST?\\n * @return bool Yes/no fixed supply.\\n */\\n function hasFixedSupply() external view returns (bool) {\\n return LibFast.data().hasFixedSupply;\\n }\\n\\n /**\\n * @notice Are transfers enabled across this FAST?\\n * @return boolean `true` if transfers are disabled, `false` if transfers are enabled.\\n */\\n function transfersDisabled() external view returns (bool) {\\n return LibFast.data().transfersDisabled;\\n }\\n\\n // Setters for global flags.\\n\\n /**\\n * @notice Allows to switch from a private scheme to a semi-public scheme,\\n * but not the other way around, unless the total supply is zero.\\n * @param flag Set the semi public flag to true/false.\\n */\\n function setIsSemiPublic(bool flag) external onlyIssuerMember {\\n // Someone is trying to toggle back to private?... No can do!\\n if (this.isSemiPublic() && FastTokenFacet(address(this)).totalSupply() != 0) {\\n revert ICustomErrors.UnsupportedOperation();\\n }\\n LibFast.data().isSemiPublic = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /**\\n * @notice Allows an issuer member to enable or disable all transfers within this FAST.\\n * @param flag Set the transfer capability to active or not.\\n */\\n function setTransfersDisabled(bool flag) external onlyIssuerMemberOrIssuerContract {\\n LibFast.Data storage d = LibFast.data();\\n // Only make changes and emit if the new flag is different than the old one.\\n if (d.transfersDisabled != flag) {\\n // Set flag.\\n d.transfersDisabled = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n /**\\n * @notice Retrieves the group slug to which this FAST belongs.\\n * @return string The group slug string.\\n */\\n function group() external view returns (string memory) {\\n return LibFast.data().group;\\n }\\n\\n /**\\n * @notice Assigns the FAST into a group given its slug.\\n * It should only be callable by the Issuer contract.\\n * @param newGroup is the slug for the new group for this FAST.\\n */\\n function setGroup(string calldata newGroup) external onlyIssuerContract {\\n // Set group slug.\\n LibFast.data().group = newGroup;\\n }\\n}\\n\",\"keccak256\":\"0xc92847559953aa4130a76c0ddf63d9f9e90cf26351153fa691aea503210f7c8d\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0x64ac3bc4aaa8ea06efef19407baed93a5e960c2b822e732517efc2c991e96795\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastCrowdfunds.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastCrowdfunds {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 2;\\n /// @notice This is keccak256('Fast.storage.Crowdfunds'):\\n bytes32 internal constant STORAGE_SLOT = 0xc843fbb8f0f5694376d391c1687b800112a6eed97820d8e7a2b82618dd1b69ed;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed crowdfund contract is held here.\\n LibAddressSet.Data crowdfundSet;\\n /// @notice The default crowdfund fee for this FAST.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3f43bc03bbdd3d7d1e2dc957e060310ba97eea02ce64ac91082cc30c9e7c82b7\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastDistributions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastDistributions {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Distributions'):\\n bytes32 internal constant STORAGE_SLOT = 0xe865e85b076245a187a9d3cc15c47264cd0b46df4afd899817bd2e16523485ad;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed distribution contract is held here.\\n LibAddressSet.Data distributionSet;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dbd277dde92dc23bd8fd81a005783e50903690b3acf4ca9e98f6dea3570426e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with token related logic.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastToken {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Token'):\\n bytes32 internal constant STORAGE_SLOT = 0xb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261;\\n\\n // Constants.\\n\\n string internal constant DEFAULT_TRANSFER_REFERENCE = \\\"Unspecified - via ERC20\\\";\\n\\n // Data structures.\\n\\n /**\\n * @notice The token data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // ERC20 related properties for this FAST Token.\\n /// @notice The name of the FAST.\\n string name;\\n /// @notice The symbol for this FAST.\\n string symbol;\\n /// @notice The decimal points used by this FAST.\\n uint8 decimals;\\n /// @notice The amount of tokens in circulation.\\n uint256 totalSupply;\\n /// @notice Legacy variable.\\n uint256 LEGACY_transferCredits;\\n /// @notice Our members balances are held here.\\n mapping(address => uint256) balances;\\n // Allowances are stored here.\\n /// @notice Allowance amounts are stored in here, via mapping of `owner.spender.amount`\\n mapping(address => mapping(address => uint256)) allowances;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by owner.\\n mapping(address => LibAddressSet.Data) allowancesByOwner;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by spender.\\n mapping(address => LibAddressSet.Data) allowancesBySpender;\\n /// @notice All of this FAST token holders.\\n LibAddressSet.Data tokenHolders;\\n }\\n\\n /**\\n * @notice Returns the token storage for the calling FAST.\\n * @return s a struct pointer for token FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf101b0347e095905f91f32ec41dcbe1dca1d8a84cc99664ca5254f21dcf3d8e9\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InterfaceNotSupported(string);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0xd6da7364331de0a387574a44c5a4e7555b63cfe4baaca4dfef42c5d2345f0683\",\"license\":\"MIT\"},\"contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n/// @title A facet providing diamond cut mechanisms.\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a method with `delegatecall`.\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xf548f40da69f2c54f4e03f92dc31094f6825669314b87266cce22e0a8f1a4c47\",\"license\":\"MIT\"},\"contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// Directly import IERC165 from OpenZeppelin contracts.\\n// Solves an issue with 2 conflicting definitions of IERC165.\\nimport {IERC165} from \\\"@openzeppelin/contracts/interfaces/IERC165.sol\\\";\\n\",\"keccak256\":\"0x4d40fa89830d0f833aacefdbab507408a29b692e37990192c6b5e4ce581db830\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\",\"keccak256\":\"0x8af6e7ffd7a4cbae707b539d4271f8a3e36e373ea1470706fe368b7e6e6c33f7\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/issuer/IssuerAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuerAccess.sol\\\";\\nimport \\\"./lib/IIssuerEvents.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\n\\ncontract IssuerAccessFacet is AIssuerFacet, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return AHasMembers(this).isMember(who);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n /// Membership management.\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor added to a FAST.\\n */\\n function governorAddedToFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].add(msg.sender, true);\\n\\n emit GovernorshipAdded(msg.sender, governor);\\n }\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor removed from a FAST.\\n */\\n function governorRemovedFromFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].remove(msg.sender, true);\\n\\n emit GovernorshipRemoved(msg.sender, governor);\\n }\\n\\n /** @notice Returns a list of FASTs that the passed address is a governor of.\\n * @param governor is the address to check governorships of.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateGovernorships(\\n address governor,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuerAccess.data().fastGovernorships[governor].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0xb8eb9a8eb626f61ecc5627b927bdd81a97f38b05e621e903f77000e63a21b37c\",\"license\":\"MIT\"},\"contracts/issuer/IssuerTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuer.sol\\\";\\n\\ncontract IssuerTopFacet is AIssuerFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n // FAST management related methods.\\n\\n /**\\n * @notice Queries whether a given address is a known and registered FAST contract.\\n * @param fast The address of the contract to check.\\n * @return A boolean.\\n */\\n function isFastRegistered(address fast) external view returns (bool) {\\n return LibIssuer.data().fastSet.contains(fast);\\n }\\n\\n /**\\n * @notice Allows to retrieve the address of a FAST diamond given its symbol.\\n * @param symbol The symbol of the FAST diamond to get the address of.\\n * @return The address of the corresponding FAST diamond, or the Zero Address if not found.\\n */\\n function fastBySymbol(string calldata symbol) external view returns (address) {\\n return LibIssuer.data().fastSymbols[symbol];\\n }\\n\\n /**\\n * @notice Allows the registration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be registered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastRegistered` event.\\n */\\n function registerFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n if (s.fastSymbols[symbol] != address(0)) {\\n revert ICustomErrors.DuplicateEntry();\\n }\\n\\n // Add the FAST to our list.\\n s.fastSet.add(fast, false);\\n // Add the fast symbol to our list.\\n s.fastSymbols[symbol] = fast;\\n\\n // Emit!\\n emit FastRegistered(fast);\\n }\\n\\n /**\\n * @notice Allows the unregistration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be unregistered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastUnregistered` event.\\n */\\n function unregisterFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n\\n // Disable transfers in the FAST.\\n FastTopFacet(fast).setTransfersDisabled(true);\\n\\n // Remove the FAST from our lists.\\n s.fastSet.remove(fast, false);\\n delete s.fastSymbols[symbol];\\n\\n // Emit!\\n emit FastUnregistered(fast);\\n }\\n\\n /**\\n * @notice Counts the number of FAST diamonds registered with this Issuer.\\n * @return The number of FAST diamonds registered with this Issuer.\\n */\\n function fastCount() external view returns (uint256) {\\n return LibIssuer.data().fastSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a starting cursor and a number of records per page.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFasts(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to move collected ERC20 fees from this contract\\n * to an arbitrary address.\\n * @param token is the address of the ERC20 to be collected.\\n * @param amount is how much should be moved from the ERC20 to the collection address.\\n * @param to is the collection address - eg the address that will receive the ERC20 tokens.\\n */\\n function transferERC20Tokens(IERC20 token, uint256 amount, address to) public onlyMember(msg.sender) {\\n require(token.transfer(to, amount));\\n }\\n\\n /**\\n * @notice Allows to assign FASTs to groups.\\n * @param fast The FAST address to assign.\\n * @param newGroup The name of the group in which the FAST should be placed.\\n */\\n function setFastGroup(address fast, string calldata newGroup) external onlyMember(msg.sender) {\\n string memory oldGroup = FastTopFacet(fast).group();\\n // Remove FAST from old group.\\n if (bytes(oldGroup).length > 0) LibIssuer.data().fastGroups[oldGroup].remove(fast, false);\\n // Add FAST to new group.\\n if (bytes(newGroup).length > 0) LibIssuer.data().fastGroups[newGroup].add(fast, false);\\n // Set group name at FAST level.\\n FastTopFacet(fast).setGroup(newGroup);\\n // Emit!\\n emit FastGroupChanged(fast, oldGroup, newGroup);\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a group, starting cursor and a number of records per page.\\n * @param group The group to paginate.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFastsInGroup(\\n string calldata group,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastGroups[group].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0x1f0e0e3a107552b4155e3fbc2f7cdba5d482e3de23b1abaff858f5cbaf1a70ec\",\"license\":\"MIT\"},\"contracts/issuer/lib/AIssuerFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./IIssuerEvents.sol\\\";\\n\\n/**\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AIssuerFacet is IIssuerEvents {\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresIssuerMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x4ab53f3e2ce4e78f13c93f46c10c581c0b5ebc520979191d6092d2d7f7aa733c\",\"license\":\"MIT\"},\"contracts/issuer/lib/IIssuerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// WARNING: These events must be maintained 1:1 with LibIssuerEvents!\\n// They also should never be emitted directly, they only help us defining\\n// typescript types!\\ninterface IIssuerEvents {\\n /// FAST registration events.\\n\\n /**\\n * @notice Emited when a new FAST is registered.\\n * @param fast The address of the newly registered FAST diamond.\\n */\\n event FastRegistered(address indexed fast);\\n /**\\n * @notice Emited when a FAST is removed from the Issuer contract.\\n * @param fast The address of the unregistered FAST.\\n */\\n event FastUnregistered(address indexed fast);\\n\\n /// FAST groupping events.\\n\\n event FastGroupChanged(address indexed fast, string indexed oldGroup, string indexed newGroup);\\n\\n /// Governors.\\n\\n event GovernorshipRemoved(address indexed fast, address indexed governor);\\n event GovernorshipAdded(address indexed fast, address indexed governor);\\n}\\n\",\"keccak256\":\"0x7ab2611cedeaf69aba2461e083ce436cde93f53e0ebf7ae882bf1800a839f543\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuer {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xd681d5f1de7bc4b7442c088939dc202585e09699e92a94c9717ace8d0f4fcaa5;\\n\\n // Data structures.\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // This is where we keep our list of deployed fast FASTs.\\n LibAddressSet.Data fastSet;\\n // We keep track of the FAST symbols that were already used - string to FAST address.\\n mapping(string => address) fastSymbols;\\n // We also keep track of the FAST groups here - slug to FAST address set.\\n mapping(string => LibAddressSet.Data) fastGroups;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x82972d98e290aa68b6fa14dee5e9f3e0ca3d80604e96435ea437e9f92891f7e9\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuerAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuerAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0x3ceaa4d5edf9c96fbd56140abe6389d65a87143d4f11819874ff2fe0ae9574db;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // For a given address we store list of FASTs where that address is a governor.\\n mapping(address => LibAddressSet.Data) fastGovernorships;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x225043d709577f7c580aa46637ef2910336dc0ef75a508a1252484fa45558fca\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x0e12d54c3afccb656312e8bc7c31d16feb3718a421d2ea732024f608ccb6aab4\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasForwarder.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"./lib/LibMarketplaceAccess.sol\\\";\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./MarketplaceAutomatonsFacet.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Access facet is in charge of keeping track of marketplace members.\\n */\\ncontract MarketplaceAccessFacet is AMarketplaceFacet, AHasMembers, AHasContext, IHasActiveMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasContext implementation.\\n\\n // TODO: Could _isTrustedForwarder actually have it's default implementation point to\\n // IHasForwarder(address(this)).isTrustedForwarder(forwarder) or similar?\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n // Override base classes to use the AHasContext implementation.\\n function _msgSender() internal view override(AHasMembers, AHasContext) returns (address) {\\n return AHasContext._msgSender();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return _isIssuerMember(who) || AHasAutomatons(address(this)).automatonCan(who, MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n function onMemberRemoved(address member) internal view override(AHasMembers) {\\n LibMarketplaceAccess.Data storage s = LibMarketplaceAccess.data();\\n // Ensure that member doesn't have any FAST membership.\\n if (s.fastMemberships[member].values.length != 0) revert ICustomErrors.RequiresNoFastMemberships(member);\\n }\\n\\n /// FAST memberships functions.\\n\\n /**\\n * @notice Allows to query FAST memberships for a given member address.\\n * @param member Is the address to check.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n */\\n function fastMemberships(\\n address member,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibMarketplaceAccess.data().fastMemberships[member].values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a new FAST membership has been added.\\n */\\n function memberAddedToFast(address member) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the member's FAST membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].add(_msgSender(), true);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a FAST membership has been removed.\\n */\\n function memberRemovedFromFast(address member) external {\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].remove(_msgSender(), true);\\n }\\n\\n /// IHasActiveMembers implementation.\\n\\n /**\\n * @notice Given a member returns it's activation status.\\n * @param candidate The address to check activation status on.\\n */\\n function isActiveMember(address candidate) external view override(IHasActiveMembers) returns (bool) {\\n return AHasMembers(this).isMember(candidate) && !LibMarketplaceAccess.data().deactivatedMemberSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Activates a member at the Marketplace level.\\n * @param member The member to remove from the deactivation member set.\\n */\\n function activateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to activate an already active member.\\n if (this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceDeactivatedMember(member);\\n // Remove the member from the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.remove(member, false);\\n // Emit!\\n emit MemberActivated(member);\\n }\\n\\n /**\\n * @notice Deactivates a member at the Marketplace level.\\n * @param member The member to add to the deactivation member set.\\n */\\n function deactivateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to deactivate an already deactivated member.\\n if (!this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceActiveMembership(member);\\n // Add the member to the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.add(member, false);\\n // Emit!\\n emit MemberDeactivated(member);\\n }\\n}\\n\",\"keccak256\":\"0x7a8f193f18b8c2f39d38aafb2c7cb936b07fff612299a4620ac932cc9ee4766e\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS = 1;\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract MarketplaceAutomatonsFacet is AMarketplaceFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0xa2a142702268b2d33ddd7703c23f36274161cb2b9b707369e703ebbfa2f5a53c\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceTokenHoldersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./lib/LibMarketplaceTokenHolders.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../common/AHasForwarder.sol\\\";\\n\\n/** @dev The Marketplace FAST balances facet.\\n */\\ncontract MarketplaceTokenHoldersFacet is AMarketplaceFacet, AHasContext {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasContext implementation.\\n\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n /** @dev The callback used when a balance changes on a FAST.\\n */\\n function fastBalanceChanged(address account, uint256 balance) external {\\n // Return early if this is the zero address.\\n if (account == address(0)) {\\n return;\\n }\\n\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n\\n // Get the storage pointer and balance of the token holder.\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.fastHoldings[account].contains(_msgSender())) {\\n s.fastHoldings[account].add(_msgSender(), false);\\n }\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.fastHoldings[account].contains(_msgSender())) {\\n s.fastHoldings[account].remove(_msgSender(), false);\\n }\\n }\\n\\n /** @dev A way to get a list of FASTs for an account.\\n * @return list of FAST addresses.\\n */\\n function holdings(address account) external view returns (address[] memory) {\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n return s.fastHoldings[account].values;\\n }\\n}\\n\",\"keccak256\":\"0xb8fb7178c40f36efc80271a2441cdcea03f072452a99650e550a737c50bced15\",\"license\":\"MIT\"},\"contracts/marketplace/lib/AMarketplaceFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibMarketplace.sol\\\";\\nimport \\\"./IMarketplaceEvents.sol\\\";\\n\\n/**\\n * @notice This contract is a group of modifiers that can be used by any Marketplace facets to guard against\\n * certain permissions.\\n */\\nabstract contract AMarketplaceFacet is IMarketplaceEvents {\\n /// Internal ACL functions.\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibMarketplace.data().issuer).isMember(who);\\n }\\n\\n // Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() virtual {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Requires that the message sender is a member of the linked Issuer.\\n */\\n modifier onlyIssuerMember() virtual {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n /**\\n * @notice Requires that the given address is a member of the marketplace.\\n * @param who is the address to be checked.\\n */\\n modifier onlyMember(address who) virtual {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xb9569fef0cef86a40828714a131f6dafb98ae4cd21ff44e710f8e57413bd6ffb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/IMarketplaceEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface IMarketplaceEvents {\\n /// @dev See `IHasActiveMembers`.\\n event MemberActivated(address indexed member);\\n /// @dev See `IHasActiveMembers`.\\n event MemberDeactivated(address indexed member);\\n /// @dev Emitted when a FAST deployment is requested.\\n event FastDeploymentRequested(uint256 indexed index);\\n}\\n\",\"keccak256\":\"0xeb89df40f51b42b444f698f8d13cf4318396f9393d7fab049c131e2f6bd45b4d\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibMarketplace {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xb59ec141376cee83f618e10e881bbb4789cdeee27e0d441a8c37ead3cb8b93c1;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03c52542f4b27ba631639502855cdc9d5e56347c254595b42a7d6567441933bb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0xecb992c7a1185ca18ac50bc1672192fb67e7c3e74465887a8fcaab265dab37bd;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we keep track of our member FAST memberships.\\n mapping(address => LibAddressSet.Data) fastMemberships;\\n /// @notice This is where we keep track of our deactivated memberships.\\n LibAddressSet.Data deactivatedMemberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac8cc51395e6e5b357b72f0cb3b4b681b5cbe0e0338692fde4d1087bc98b03eb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceTokenHolders.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceTokenHolders {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.TokenHolders.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xecf50453542504034bd40d376fb1408ada3025f2fe86ca1b9b4b1440b8d4a2f4;\\n\\n struct Data {\\n /// @dev The latest intializer version that was called.\\n uint16 version;\\n /// @dev The tracked FAST holdings of a user.\\n mapping(address => LibAddressSet.Data) fastHoldings;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa6edcacafdaaac79b202288095948b7b3bee0e01f7d4b4efb8eee3425f9a8c04\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50613892806100206000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c806370a08231116100e35780639c999d901161008c578063dd62ed3e11610066578063dd62ed3e1461044f578063e8edd0e314610462578063fbabdb061461047557600080fd5b80639c999d9014610416578063a9059cbb14610429578063c485bb961461043c57600080fd5b80638188f71c116100bd5780638188f71c146103a157806381a8f243146103b657806395d89b411461040e57600080fd5b806370a08231146103265780637641e6f31461037b57806377097fc81461038e57600080fd5b8063313ce567116101455780635480699a1161011f5780635480699a146102ed5780635d7b590f146103005780636bd7bd251461031357600080fd5b8063313ce5671461029b5780633a868224146102c557806344890ae0146102da57600080fd5b806318160ddd1161017657806318160ddd146102405780631fe02e531461026757806323b872dd1461028857600080fd5b806306675ba71461019d57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f56101ab3660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090206001015490565b6040519081526020015b60405180910390f35b610210610488565b6040516101ff919061314e565b61023061022b366004613161565b61053c565b60405190151581526020016101ff565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8265546101f5565b61027a61027536600461318b565b6105d7565b6040516101ff92919061320f565b610230610296366004613231565b610639565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82645460ff166101f5565b6102d86102d33660046130c8565b610687565b005b6102d86102e836600461326d565b610a40565b6102d86102fb366004613231565b6116dd565b6102d861030e3660046130c8565b61191e565b6102d8610321366004613231565b611c3f565b6101f56103343660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8267602052604090205490565b6102d86103893660046132f1565b611e08565b6102d861039c3660046132f1565b612062565b6103a961233e565b6040516101ff919061333d565b6101f56103c43660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604090206001015490565b6102106123d0565b61027a61042436600461318b565b612401565b610230610437366004613161565b612457565b61023061044a36600461337f565b612504565b6101f561045d366004613479565b6125bb565b6102306104703660046134ac565b61272d565b610230610483366004613161565b612821565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160010180546104b990613506565b80601f01602080910402602001604051908101604052809291908181526020018280546104e590613506565b80156105325780601f1061050757610100808354040283529160200191610532565b820191906000526020600020905b81548152906001019060200180831161051557829003601f168201915b5050505050905090565b6040517f5480699a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526000903090635480699a906064015b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b50505050600190505b92915050565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604081206060919061062d906001018585612982565b91509150935093915050565b600061067c8484846040518060400160405280601781526020017f556e737065636966696564202d20766961204552433230000000000000000000815250612504565b506001949350505050565b61069033612aa3565b6106cd576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826760205260409020547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261811561079a5773ffffffffffffffffffffffffffffffffffffffff8316600090815260068201602052604080822082905581805281208054849290610779908490613589565b925050819055508181600401600082825461079491906135a1565b90915550505b6107a9600a8201846001612b5e565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705600101546040517fc2a11fb300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152600060248301529091169063c2a11fb390604401600060405180830381600087803b15801561083f57600080fd5b505af1158015610853573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290517feee2dcc300000000000000000000000000000000000000000000000000000000815230935063eee2dcc392506108cd91339188916000918991906004016135b8565b600060405180830381600087803b1580156108e757600080fd5b505af11580156108fb573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290516000935073ffffffffffffffffffffffffffffffffffffffff8716925033917fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d59161097e91889161360a565b60405180910390a460405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a38115610a3b573073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a2257600080fd5b505af1158015610a36573d6000803e3d6000fd5b505050505b505050565b303314610a79576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590503073ffffffffffffffffffffffffffffffffffffffff1663034cd7256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d919061362b565b15610b44576040517f5bcaa04c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5460608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610b7a60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff161415610bf157610ba660408301602084016130c8565b6040517f6b3dcdc100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610c0360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16148015610ce05750805462010000900473ffffffffffffffffffffffffffffffffffffffff1663a230c524610c5160208501856130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde919061362b565b155b15610d3d57610cf260208301836130c8565b6040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610d55610d5060408401602085016130c8565b612d36565b610db457610d6960408301602084016130c8565b6040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610dc660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ec157507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166345ecd02f610e3260408501602086016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf919061362b565b155b15610f2157610ed660408301602084016130c8565b6040517f14c469d300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610f34610d5060608401604085016130c8565b610f4857610d6960608301604084016130c8565b6060820135156114fe577fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261610f8360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610fa660208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ff057506000610fd760408501602086016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561111c5760006060840135600783018261101160408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604001600090812091611047908801886130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461109091906135a1565b91829055509150508061111a576110f26110ad60208601866130c8565b60016008850160006110c560408a0160208b016130c8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000209190612b5e565b61111a61110560408601602087016130c8565b60016009850160006110c560208a018a6130c8565b505b60006060840135600683018261113860408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461118191906135a1565b9250508190559050600084606001358360060160008760400160208101906111a991906130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111f29190613589565b9182905550600186015490925073ffffffffffffffffffffffffffffffffffffffff16905063c2a11fb361122c60408801602089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101859052604401600060405180830381600087803b15801561129957600080fd5b505af11580156112ad573d6000803e3d6000fd5b50505050600184015473ffffffffffffffffffffffffffffffffffffffff1663c2a11fb36112e160608801604089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b15801561134e57600080fd5b505af1158015611362573d6000803e3d6000fd5b50611381925061137b91505060408701602088016130c8565b83612e9d565b61139a61139460608701604088016130c8565b82612e9d565b60006113ac60608701604088016130c8565b73ffffffffffffffffffffffffffffffffffffffff16141561144c5784606001358360040160008282546113e091906135a1565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561142f57600080fd5b505af1158015611443573d6000803e3d6000fd5b505050506114fa565b600061145e60408701602088016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614156114fa5784606001358360040160008282546114929190613589565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156114e157600080fd5b505af11580156114f5573d6000803e3d6000fd5b505050505b5050505b3063eee2dcc361151160208501856130c8565b61152160408601602087016130c8565b61153160608701604088016130c8565b6060870135611543608089018961364d565b6040518763ffffffff1660e01b8152600401611564969594939291906136fb565b600060405180830381600087803b15801561157e57600080fd5b505af1158015611592573d6000803e3d6000fd5b506115a79250505060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115cd60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115f060208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff167fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d56060860135611639608088018861364d565b6040516116489392919061374f565b60405180910390a461166060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff1661168660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84606001356040516116d191815260200190565b60405180910390a35050565b303314611716576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611763576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61176c83612d36565b6117ba576040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016106c4565b80156118b25773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611845908490613589565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600882016020526040902061187d90846001612f34565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098201602052604090206118b090856001612f34565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161191191815260200190565b60405180910390a3505050565b303314611957576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82676020526040902054156119eb576040517fd90c787400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090207fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261906001015b805415611b3557600081600081548110611a7157611a71613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff87811680855260078801845260408086209290931680865291909352928190205490517f6bd7bd2500000000000000000000000000000000000000000000000000000000815260048101929092526024820183905260448201529091503090636bd7bd2590606401600060405180830381600087803b158015611b1757600080fd5b505af1158015611b2b573d6000803e3d6000fd5b5050505050611a55565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090206001015b805415610a3b57600081600081548110611b7d57611b7d613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff9081168084526007870183526040808520928916808652929093528284205483517f6bd7bd25000000000000000000000000000000000000000000000000000000008152600481018390526024810193909352604483015291519193503092636bd7bd259260648084019382900301818387803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b5050505050611b61565b303314611c78576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611da95773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611d039084906135a1565b909155505073ffffffffffffffffffffffffffffffffffffffff8085166000908152600783016020908152604080832093871683529290522054611da75773ffffffffffffffffffffffffffffffffffffffff841660009081526008820160205260409020611d7490846001612b5e565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009820160205260409020611da790856001612b5e565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f94f4f5b45267f5e7454476505db5fe3cbb2ad25868e26303b8fc7c5074ba58908360405161191191815260200190565b611e1133612aa3565b611e49576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611edd919061362b565b15611f14576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080805260068201602052604081208054869290611f349084906135a1565b90915550506040517ff4c1210c000000000000000000000000000000000000000000000000000000008152309063f4c1210c90611f799087908790879060040161374f565b600060405180830381600087803b158015611f9357600080fd5b505af1158015611fa7573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611ff357600080fd5b505af1158015612007573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847f5ff47d76c9322f177ff7059963be58d30339f275e98dc74e464d2070a8138acd85856040516120549291906137a1565b60405180910390a350505050565b61206b33612aa3565b6120a3576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612113573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612137919061362b565b80156121c7575060048101541515806121c757506040517f70a082310000000000000000000000000000000000000000000000000000000081526000600482015230906370a0823190602401602060405180830381865afa1580156121a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c491906137b5565b15155b156121fe576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080526006820160205260408120805486929061221e908490613589565b90915550506040517faf2e757b000000000000000000000000000000000000000000000000000000008152309063af2e757b906122639087908790879060040161374f565b600060405180830381600087803b15801561227d57600080fd5b505af1158015612291573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156122dd57600080fd5b505af11580156122f1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847fc1177815a22ab58cdf6e40a80dfe322e9d00b7977bd78634869752fed8082f5685856040516120549291906137a1565b606060007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261600b81018054604080516020808402820181019092528281529394508301828280156123c557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161239a575b505050505091505090565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160020180546104b990613506565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604081206060919061062d906001018585612982565b6040805160a0810182523380825260208083019190915273ffffffffffffffffffffffffffffffffffffffff8516828401526060820184905282518084018452601781527f556e737065636966696564202d2076696120455243323000000000000000000091810191909152608082015290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161059a916004016137ce565b6040805160a08101825233815273ffffffffffffffffffffffffffffffffffffffff8681166020830152851681830152606081018490526080810183905290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161257e916004016137ce565b600060405180830381600087803b15801561259857600080fd5b505af11580156125ac573d6000803e3d6000fd5b50600198975050505050505050565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826173ffffffffffffffffffffffffffffffffffffffff84166126ef577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152620100009092049091169063a230c52490602401602060405180830381865afa15801561268f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b3919061362b565b6126be5760006126e7565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006820160205260409020545b9150506105d1565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600790920160209081526040808420928616845291905290205490506105d1565b60003073ffffffffffffffffffffffffffffffffffffffff166344890ae06040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815261257e91906004016137ce565b6040517fa230c5240000000000000000000000000000000000000000000000000000000081523360048201819052600091309063a230c52490602401602060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061362b565b6128ec576040517fb8c6719e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b6040517f6bd7bd2500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff85166024820152604481018490523090636bd7bd2590606401600060405180830381600087803b15801561296057600080fd5b505af1158015612974573d6000803e3d6000fd5b506001979650505050505050565b606060008084868054905061299791906135a1565b84116129a357836129b0565b85546129b09086906135a1565b905060008167ffffffffffffffff8111156129cd576129cd613350565b6040519080825280602002602001820160405280156129f6578160200160208202803683370190505b50905060005b82811015612a895787612a0f8289613589565b81548110612a1f57612a1f613772565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110612a5c57612a5c613772565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526001016129fc565b5080612a958388613589565b935093505050935093915050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c524906024015b602060405180830381865afa158015612b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d1919061362b565b6000612b6a8484613028565b9050818015612b77575080155b15612b825750505050565b80612be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e2073657400000060448201526064016106c4565b60018085018054600092612bfc916135a1565b81548110612c0c57612c0c613772565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110612c6857612c68613772565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480612cd657612cd661382d565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216612d5b57506001919050565b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015612da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dca919061362b565b15612e46577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063a230c52490602401612b1d565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063a230c52490602401612b1d565b919050565b73ffffffffffffffffffffffffffffffffffffffff8216612ebc575050565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82618115801590612ef65750612ef4600a820184613028565b155b15612f0a57610a3b600a8201846000612f34565b81158015612f205750612f20600a820184613028565b15610a3b57610a3b600a8201846000612b5e565b6000612f408484613028565b9050818015612f4c5750805b15612f575750505050565b8015612fbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e207365740000000000000000000060448201526064016106c4565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60018201546000901561309a5773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061307257613072613772565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461309d565b60005b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e9857600080fd5b6000602082840312156130da57600080fd5b61309d826130a4565b6000815180845260005b81811015613109576020818501810151868301820152016130ed565b8181111561311b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061309d60208301846130e3565b6000806040838503121561317457600080fd5b61317d836130a4565b946020939093013593505050565b6000806000606084860312156131a057600080fd5b6131a9846130a4565b95602085013595506040909401359392505050565b600081518084526020808501945080840160005b8381101561320457815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016131d2565b509495945050505050565b60408152600061322260408301856131be565b90508260208301529392505050565b60008060006060848603121561324657600080fd5b61324f846130a4565b925061325d602085016130a4565b9150604084013590509250925092565b60006020828403121561327f57600080fd5b813567ffffffffffffffff81111561329657600080fd5b820160a0818503121561309d57600080fd5b60008083601f8401126132ba57600080fd5b50813567ffffffffffffffff8111156132d257600080fd5b6020830191508360208285010111156132ea57600080fd5b9250929050565b60008060006040848603121561330657600080fd5b83359250602084013567ffffffffffffffff81111561332457600080fd5b613330868287016132a8565b9497909650939450505050565b60208152600061309d60208301846131be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561339557600080fd5b61339e856130a4565b93506133ac602086016130a4565b925060408501359150606085013567ffffffffffffffff808211156133d057600080fd5b818701915087601f8301126133e457600080fd5b8135818111156133f6576133f6613350565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561343c5761343c613350565b816040528281528a602084870101111561345557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561348c57600080fd5b613495836130a4565b91506134a3602084016130a4565b90509250929050565b600080600080606085870312156134c257600080fd5b6134cb856130a4565b935060208501359250604085013567ffffffffffffffff8111156134ee57600080fd5b6134fa878288016132a8565b95989497509550505050565b600181811c9082168061351a57607f821691505b60208210811415613554577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561359c5761359c61355a565b500190565b6000828210156135b3576135b361355a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015280861660408401525083606083015260a060808301526135ff60a08301846130e3565b979650505050505050565b82815260406020820152600061362360408301846130e3565b949350505050565b60006020828403121561363d57600080fd5b8151801515811461309d57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261368257600080fd5b83018035915067ffffffffffffffff82111561369d57600080fd5b6020019150368190038213156132ea57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015260a0608083015261374360a0830184866136b2565b98975050505050505050565b8381526040602082015260006137696040830184866136b2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020815260006136236020830184866136b2565b6000602082840312156137c757600080fd5b5051919050565b60208152600073ffffffffffffffffffffffffffffffffffffffff8084511660208401528060208501511660408401528060408501511660608401525060608301516080830152608083015160a08084015261362360c08401826130e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212209a630e34462e825e100fbad72ede54000715fcc97690d68415734e560875f26464736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101985760003560e01c806370a08231116100e35780639c999d901161008c578063dd62ed3e11610066578063dd62ed3e1461044f578063e8edd0e314610462578063fbabdb061461047557600080fd5b80639c999d9014610416578063a9059cbb14610429578063c485bb961461043c57600080fd5b80638188f71c116100bd5780638188f71c146103a157806381a8f243146103b657806395d89b411461040e57600080fd5b806370a08231146103265780637641e6f31461037b57806377097fc81461038e57600080fd5b8063313ce567116101455780635480699a1161011f5780635480699a146102ed5780635d7b590f146103005780636bd7bd251461031357600080fd5b8063313ce5671461029b5780633a868224146102c557806344890ae0146102da57600080fd5b806318160ddd1161017657806318160ddd146102405780631fe02e531461026757806323b872dd1461028857600080fd5b806306675ba71461019d57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f56101ab3660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090206001015490565b6040519081526020015b60405180910390f35b610210610488565b6040516101ff919061314e565b61023061022b366004613161565b61053c565b60405190151581526020016101ff565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8265546101f5565b61027a61027536600461318b565b6105d7565b6040516101ff92919061320f565b610230610296366004613231565b610639565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82645460ff166101f5565b6102d86102d33660046130c8565b610687565b005b6102d86102e836600461326d565b610a40565b6102d86102fb366004613231565b6116dd565b6102d861030e3660046130c8565b61191e565b6102d8610321366004613231565b611c3f565b6101f56103343660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8267602052604090205490565b6102d86103893660046132f1565b611e08565b6102d861039c3660046132f1565b612062565b6103a961233e565b6040516101ff919061333d565b6101f56103c43660046130c8565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604090206001015490565b6102106123d0565b61027a61042436600461318b565b612401565b610230610437366004613161565b612457565b61023061044a36600461337f565b612504565b6101f561045d366004613479565b6125bb565b6102306104703660046134ac565b61272d565b610230610483366004613161565b612821565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160010180546104b990613506565b80601f01602080910402602001604051908101604052809291908181526020018280546104e590613506565b80156105325780601f1061050757610100808354040283529160200191610532565b820191906000526020600020905b81548152906001019060200180831161051557829003601f168201915b5050505050905090565b6040517f5480699a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526000903090635480699a906064015b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b50505050600190505b92915050565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604081206060919061062d906001018585612982565b91509150935093915050565b600061067c8484846040518060400160405280601781526020017f556e737065636966696564202d20766961204552433230000000000000000000815250612504565b506001949350505050565b61069033612aa3565b6106cd576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826760205260409020547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261811561079a5773ffffffffffffffffffffffffffffffffffffffff8316600090815260068201602052604080822082905581805281208054849290610779908490613589565b925050819055508181600401600082825461079491906135a1565b90915550505b6107a9600a8201846001612b5e565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705600101546040517fc2a11fb300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152600060248301529091169063c2a11fb390604401600060405180830381600087803b15801561083f57600080fd5b505af1158015610853573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290517feee2dcc300000000000000000000000000000000000000000000000000000000815230935063eee2dcc392506108cd91339188916000918991906004016135b8565b600060405180830381600087803b1580156108e757600080fd5b505af11580156108fb573d6000803e3d6000fd5b5050604080518082018252601581527f4465616420746f6b656e732072657472696576616c0000000000000000000000602082015290516000935073ffffffffffffffffffffffffffffffffffffffff8716925033917fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d59161097e91889161360a565b60405180910390a460405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a38115610a3b573073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a2257600080fd5b505af1158015610a36573d6000803e3d6000fd5b505050505b505050565b303314610a79576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70590503073ffffffffffffffffffffffffffffffffffffffff1663034cd7256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d919061362b565b15610b44576040517f5bcaa04c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5460608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610b7a60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff161415610bf157610ba660408301602084016130c8565b6040517f6b3dcdc100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610c0360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16148015610ce05750805462010000900473ffffffffffffffffffffffffffffffffffffffff1663a230c524610c5160208501856130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde919061362b565b155b15610d3d57610cf260208301836130c8565b6040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610d55610d5060408401602085016130c8565b612d36565b610db457610d6960408301602084016130c8565b6040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b6000610dc660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ec157507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166345ecd02f610e3260408501602086016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015610e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebf919061362b565b155b15610f2157610ed660408301602084016130c8565b6040517f14c469d300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106c4565b610f34610d5060608401604085016130c8565b610f4857610d6960608301604084016130c8565b6060820135156114fe577fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261610f8360408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff16610fa660208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ff057506000610fd760408501602086016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561111c5760006060840135600783018261101160408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604001600090812091611047908801886130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461109091906135a1565b91829055509150508061111a576110f26110ad60208601866130c8565b60016008850160006110c560408a0160208b016130c8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000209190612b5e565b61111a61110560408601602087016130c8565b60016009850160006110c560208a018a6130c8565b505b60006060840135600683018261113860408801602089016130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461118191906135a1565b9250508190559050600084606001358360060160008760400160208101906111a991906130c8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111f29190613589565b9182905550600186015490925073ffffffffffffffffffffffffffffffffffffffff16905063c2a11fb361122c60408801602089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101859052604401600060405180830381600087803b15801561129957600080fd5b505af11580156112ad573d6000803e3d6000fd5b50505050600184015473ffffffffffffffffffffffffffffffffffffffff1663c2a11fb36112e160608801604089016130c8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b15801561134e57600080fd5b505af1158015611362573d6000803e3d6000fd5b50611381925061137b91505060408701602088016130c8565b83612e9d565b61139a61139460608701604088016130c8565b82612e9d565b60006113ac60608701604088016130c8565b73ffffffffffffffffffffffffffffffffffffffff16141561144c5784606001358360040160008282546113e091906135a1565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561142f57600080fd5b505af1158015611443573d6000803e3d6000fd5b505050506114fa565b600061145e60408701602088016130c8565b73ffffffffffffffffffffffffffffffffffffffff1614156114fa5784606001358360040160008282546114929190613589565b925050819055503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156114e157600080fd5b505af11580156114f5573d6000803e3d6000fd5b505050505b5050505b3063eee2dcc361151160208501856130c8565b61152160408601602087016130c8565b61153160608701604088016130c8565b6060870135611543608089018961364d565b6040518763ffffffff1660e01b8152600401611564969594939291906136fb565b600060405180830381600087803b15801561157e57600080fd5b505af1158015611592573d6000803e3d6000fd5b506115a79250505060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115cd60408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff166115f060208501856130c8565b73ffffffffffffffffffffffffffffffffffffffff167fd890e39fdd8907232d28ae76e6ece0a56e47c6ef82d597baf26787fef211d8d56060860135611639608088018861364d565b6040516116489392919061374f565b60405180910390a461166060608301604084016130c8565b73ffffffffffffffffffffffffffffffffffffffff1661168660408401602085016130c8565b73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84606001356040516116d191815260200190565b60405180910390a35050565b303314611716576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611763576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61176c83612d36565b6117ba576040517fe4104ebc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016106c4565b80156118b25773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611845908490613589565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600882016020526040902061187d90846001612f34565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098201602052604090206118b090856001612f34565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161191191815260200190565b60405180910390a3505050565b303314611957576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82676020526040902054156119eb576040517fd90c787400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8269602052604090207fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261906001015b805415611b3557600081600081548110611a7157611a71613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff87811680855260078801845260408086209290931680865291909352928190205490517f6bd7bd2500000000000000000000000000000000000000000000000000000000815260048101929092526024820183905260448201529091503090636bd7bd2590606401600060405180830381600087803b158015611b1757600080fd5b505af1158015611b2b573d6000803e3d6000fd5b5050505050611a55565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090206001015b805415610a3b57600081600081548110611b7d57611b7d613772565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff9081168084526007870183526040808520928916808652929093528284205483517f6bd7bd25000000000000000000000000000000000000000000000000000000008152600481018390526024810193909352604483015291519193503092636bd7bd259260648084019382900301818387803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b5050505050611b61565b303314611c78576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611da95773ffffffffffffffffffffffffffffffffffffffff83811660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826860209081526040808320938616835292905290812080547fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826192849291611d039084906135a1565b909155505073ffffffffffffffffffffffffffffffffffffffff8085166000908152600783016020908152604080832093871683529290522054611da75773ffffffffffffffffffffffffffffffffffffffff841660009081526008820160205260409020611d7490846001612b5e565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009820160205260409020611da790856001612b5e565b505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f94f4f5b45267f5e7454476505db5fe3cbb2ad25868e26303b8fc7c5074ba58908360405161191191815260200190565b611e1133612aa3565b611e49576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611edd919061362b565b15611f14576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080805260068201602052604081208054869290611f349084906135a1565b90915550506040517ff4c1210c000000000000000000000000000000000000000000000000000000008152309063f4c1210c90611f799087908790879060040161374f565b600060405180830381600087803b158015611f9357600080fd5b505af1158015611fa7573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611ff357600080fd5b505af1158015612007573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847f5ff47d76c9322f177ff7059963be58d30339f275e98dc74e464d2070a8138acd85856040516120549291906137a1565b60405180910390a350505050565b61206b33612aa3565b6120a3576040517f1dd41c4d0000000000000000000000000000000000000000000000000000000081523360048201526024016106c4565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826190503073ffffffffffffffffffffffffffffffffffffffff1663ddb2d22b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612113573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612137919061362b565b80156121c7575060048101541515806121c757506040517f70a082310000000000000000000000000000000000000000000000000000000081526000600482015230906370a0823190602401602060405180830381865afa1580156121a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c491906137b5565b15155b156121fe576040517f12aebbbc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080526006820160205260408120805486929061221e908490613589565b90915550506040517faf2e757b000000000000000000000000000000000000000000000000000000008152309063af2e757b906122639087908790879060040161374f565b600060405180830381600087803b15801561227d57600080fd5b505af1158015612291573d6000803e3d6000fd5b505050503073ffffffffffffffffffffffffffffffffffffffff16634f2274c06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156122dd57600080fd5b505af11580156122f1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16847fc1177815a22ab58cdf6e40a80dfe322e9d00b7977bd78634869752fed8082f5685856040516120549291906137a1565b606060007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261600b81018054604080516020808402820181019092528281529394508301828280156123c557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161239a575b505050505091505090565b60607fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826160020180546104b990613506565b73ffffffffffffffffffffffffffffffffffffffff831660009081527fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826a602052604081206060919061062d906001018585612982565b6040805160a0810182523380825260208083019190915273ffffffffffffffffffffffffffffffffffffffff8516828401526060820184905282518084018452601781527f556e737065636966696564202d2076696120455243323000000000000000000091810191909152608082015290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161059a916004016137ce565b6040805160a08101825233815273ffffffffffffffffffffffffffffffffffffffff8681166020830152851681830152606081018490526080810183905290517f44890ae000000000000000000000000000000000000000000000000000000000815260009130916344890ae09161257e916004016137ce565b600060405180830381600087803b15801561259857600080fd5b505af11580156125ac573d6000803e3d6000fd5b50600198975050505050505050565b60007fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb826173ffffffffffffffffffffffffffffffffffffffff84166126ef577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152620100009092049091169063a230c52490602401602060405180830381865afa15801561268f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b3919061362b565b6126be5760006126e7565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006820160205260409020545b9150506105d1565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600790920160209081526040808420928616845291905290205490506105d1565b60003073ffffffffffffffffffffffffffffffffffffffff166344890ae06040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815261257e91906004016137ce565b6040517fa230c5240000000000000000000000000000000000000000000000000000000081523360048201819052600091309063a230c52490602401602060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061362b565b6128ec576040517fb8c6719e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106c4565b6040517f6bd7bd2500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff85166024820152604481018490523090636bd7bd2590606401600060405180830381600087803b15801561296057600080fd5b505af1158015612974573d6000803e3d6000fd5b506001979650505050505050565b606060008084868054905061299791906135a1565b84116129a357836129b0565b85546129b09086906135a1565b905060008167ffffffffffffffff8111156129cd576129cd613350565b6040519080825280602002602001820160405280156129f6578160200160208202803683370190505b50905060005b82811015612a895787612a0f8289613589565b81548110612a1f57612a1f613772565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110612a5c57612a5c613772565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526001016129fc565b5080612a958388613589565b935093505050935093915050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600092620100009004169063a230c524906024015b602060405180830381865afa158015612b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d1919061362b565b6000612b6a8484613028565b9050818015612b77575080155b15612b825750505050565b80612be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4164647265737320646f6573206e6f7420657869737420696e2073657400000060448201526064016106c4565b60018085018054600092612bfc916135a1565b81548110612c0c57612c0c613772565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff878116845291889052604080842054929091168084529220819055600187018054929350909183919083908110612c6857612c68613772565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815290879052604081205560018601805480612cd657612cd661382d565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216612d5b57506001919050565b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015612da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dca919061362b565b15612e46577f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063a230c52490602401612b1d565b6040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152309063a230c52490602401612b1d565b919050565b73ffffffffffffffffffffffffffffffffffffffff8216612ebc575050565b7fb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb82618115801590612ef65750612ef4600a820184613028565b155b15612f0a57610a3b600a8201846000612f34565b81158015612f205750612f20600a820184613028565b15610a3b57610a3b600a8201846000612b5e565b6000612f408484613028565b9050818015612f4c5750805b15612f575750505050565b8015612fbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320616c726561647920696e207365740000000000000000000060448201526064016106c4565b50506001808301805473ffffffffffffffffffffffffffffffffffffffff909316600081815260209586526040812085905592840182559082529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60018201546000901561309a5773ffffffffffffffffffffffffffffffffffffffff8216600081815260208590526040902054600185018054909190811061307257613072613772565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461309d565b60005b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e9857600080fd5b6000602082840312156130da57600080fd5b61309d826130a4565b6000815180845260005b81811015613109576020818501810151868301820152016130ed565b8181111561311b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061309d60208301846130e3565b6000806040838503121561317457600080fd5b61317d836130a4565b946020939093013593505050565b6000806000606084860312156131a057600080fd5b6131a9846130a4565b95602085013595506040909401359392505050565b600081518084526020808501945080840160005b8381101561320457815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016131d2565b509495945050505050565b60408152600061322260408301856131be565b90508260208301529392505050565b60008060006060848603121561324657600080fd5b61324f846130a4565b925061325d602085016130a4565b9150604084013590509250925092565b60006020828403121561327f57600080fd5b813567ffffffffffffffff81111561329657600080fd5b820160a0818503121561309d57600080fd5b60008083601f8401126132ba57600080fd5b50813567ffffffffffffffff8111156132d257600080fd5b6020830191508360208285010111156132ea57600080fd5b9250929050565b60008060006040848603121561330657600080fd5b83359250602084013567ffffffffffffffff81111561332457600080fd5b613330868287016132a8565b9497909650939450505050565b60208152600061309d60208301846131be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561339557600080fd5b61339e856130a4565b93506133ac602086016130a4565b925060408501359150606085013567ffffffffffffffff808211156133d057600080fd5b818701915087601f8301126133e457600080fd5b8135818111156133f6576133f6613350565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561343c5761343c613350565b816040528281528a602084870101111561345557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561348c57600080fd5b613495836130a4565b91506134a3602084016130a4565b90509250929050565b600080600080606085870312156134c257600080fd5b6134cb856130a4565b935060208501359250604085013567ffffffffffffffff8111156134ee57600080fd5b6134fa878288016132a8565b95989497509550505050565b600181811c9082168061351a57607f821691505b60208210811415613554577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561359c5761359c61355a565b500190565b6000828210156135b3576135b361355a565b500390565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015280861660408401525083606083015260a060808301526135ff60a08301846130e3565b979650505050505050565b82815260406020820152600061362360408301846130e3565b949350505050565b60006020828403121561363d57600080fd5b8151801515811461309d57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261368257600080fd5b83018035915067ffffffffffffffff82111561369d57600080fd5b6020019150368190038213156132ea57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015260a0608083015261374360a0830184866136b2565b98975050505050505050565b8381526040602082015260006137696040830184866136b2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020815260006136236020830184866136b2565b6000602082840312156137c757600080fd5b5051919050565b60208152600073ffffffffffffffffffffffffffffffffffffffff8084511660208401528060208501511660408401528060408501511660608401525060608301516080830152608083015160a08084015261362360c08401826130e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212209a630e34462e825e100fbad72ede54000715fcc97690d68415734e560875f26464736f6c634300080a0033", "devdoc": { "kind": "dev", "methods": { "allowance(address,address)": { - "details": "This value changes when `approve`, `disapprove` and `transferFrom` / `transferFromWithRef` are called.", - "params": { - "owner": "is the owner of the funds.", - "spender": "is the address for which the allowance should be queried." - }, - "returns": { - "_0": "A `uint256` representing the remaining allowance of `spender` over `owner`'s funds." - } + "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." }, "approve(address,uint256)": { "params": { @@ -1004,9 +997,6 @@ }, "userdoc": { "events": { - "Approval(address,address,uint256)": { - "notice": "See `ERC20.Approval`." - }, "Burnt(uint256,string,address)": { "notice": "Emited whenever an burning happens in a FAST." }, @@ -1027,16 +1017,10 @@ }, "Minted(uint256,string,address)": { "notice": "Emited whenever an issuance happens in a FAST." - }, - "Transfer(address,address,uint256)": { - "notice": "See `ERC20.Transfer`." } }, "kind": "user", "methods": { - "allowance(address,address)": { - "notice": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through `transferFrom`. This is zero by default." - }, "approve(address,uint256)": { "notice": "This method directly calls `performApproval`, setting its `from` paramter to the sender of the transaction." }, diff --git a/deployments/mumbai/FastTopFacet.json b/deployments/mumbai/FastTopFacet.json index f9b2f2f3..219614dd 100644 --- a/deployments/mumbai/FastTopFacet.json +++ b/deployments/mumbai/FastTopFacet.json @@ -1,5 +1,5 @@ { - "address": "0x6C5742bfa6C3AC6C149466579123cB04D8Db4a01", + "address": "0x90E6E2B1Ec59fc81C0f38c7C0B90FABd0967CefE", "abi": [ { "inputs": [], @@ -27,31 +27,6 @@ "name": "UnsupportedOperation", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -272,31 +247,6 @@ "name": "Minted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, { "inputs": [], "name": "group", @@ -415,44 +365,44 @@ "type": "function" } ], - "transactionHash": "0x8e053b42e477e7650ea1f64338a10e4fa4fe23fd365d87e702e2582b95f16b90", + "transactionHash": "0xb3e9d9b25d43081aea7c60355e75fdf06bb1cf378f5bcccadab2d376e4f71a87", "receipt": { "to": "0x6DF2D25d8C6FD680730ee658b530A05a99BB769a", "from": "0x717634cfe06FFAB2CEAA7fcf1b9019813f4B25FE", "contractAddress": null, - "transactionIndex": 2, - "gasUsed": "658098", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000008000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", - "blockHash": "0x5e03dcad613102a4348b03348627eef18d6552b76f5a89b35bc1a864802b35cd", - "transactionHash": "0x8e053b42e477e7650ea1f64338a10e4fa4fe23fd365d87e702e2582b95f16b90", + "transactionIndex": 6, + "gasUsed": "658276", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000040000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000400000000000000000000000000000000000000100000", + "blockHash": "0x39d32fbb8d11453c5946db0a61f26e30922e3ef4ebbe74da7735bde145acfbc0", + "transactionHash": "0xb3e9d9b25d43081aea7c60355e75fdf06bb1cf378f5bcccadab2d376e4f71a87", "logs": [ { - "transactionIndex": 2, - "blockNumber": 37998148, - "transactionHash": "0x8e053b42e477e7650ea1f64338a10e4fa4fe23fd365d87e702e2582b95f16b90", + "transactionIndex": 6, + "blockNumber": 46174036, + "transactionHash": "0xb3e9d9b25d43081aea7c60355e75fdf06bb1cf378f5bcccadab2d376e4f71a87", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000717634cfe06ffab2ceaa7fcf1b9019813f4b25fe", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" ], - "data": "0x0000000000000000000000000000000000000000000000000004ad12c308e80000000000000000000000000000000000000000000000000014d95053b4e2b890000000000000000000000000000000000000000000000ce11cf91a640e0de16800000000000000000000000000000000000000000000000014d4a340f1d9d090000000000000000000000000000000000000000000000ce11cfdc776d116c968", - "logIndex": 13, - "blockHash": "0x5e03dcad613102a4348b03348627eef18d6552b76f5a89b35bc1a864802b35cd" + "data": "0x00000000000000000000000000000000000000000000000000440e2099db209c00000000000000000000000000000000000000000000000013e68d6a209fdef30000000000000000000000000000000000000000000023b6c7ec4ee353a5751f00000000000000000000000000000000000000000000000013a27f4986c4be570000000000000000000000000000000000000000000023b6c8305d03ed8095bb", + "logIndex": 12, + "blockHash": "0x39d32fbb8d11453c5946db0a61f26e30922e3ef4ebbe74da7735bde145acfbc0" } ], - "blockNumber": 37998148, - "cumulativeGasUsed": "1084609", + "blockNumber": 46174036, + "cumulativeGasUsed": "1262596", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 23, - "solcInputHash": "abd8ffc99037ef41cdad00fb626630ba", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InternalMethod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequiresIssuerMemberOrIssuerCaller\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresIssuerMembership\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"group\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasFixedSupply\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isSemiPublic\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"issuerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketplaceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newGroup\",\"type\":\"string\"}],\"name\":\"setGroup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"setIsSemiPublic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"setTransfersDisabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transfersDisabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"group()\":{\"returns\":{\"_0\":\"string The group slug string.\"}},\"hasFixedSupply()\":{\"returns\":{\"_0\":\"bool Yes/no fixed supply.\"}},\"isSemiPublic()\":{\"returns\":{\"_0\":\"bool Yes/no semi public.\"}},\"issuerAddress()\":{\"returns\":{\"_0\":\"address Address of Issuer.\"}},\"marketplaceAddress()\":{\"returns\":{\"_0\":\"address Address of Marketplace.\"}},\"setGroup(string)\":{\"params\":{\"newGroup\":\"is the slug for the new group for this FAST.\"}},\"setIsSemiPublic(bool)\":{\"params\":{\"flag\":\"Set the semi public flag to true/false.\"}},\"setTransfersDisabled(bool)\":{\"params\":{\"flag\":\"Set the transfer capability to active or not.\"}},\"transfersDisabled()\":{\"returns\":{\"_0\":\"boolean `true` if transfers are disabled, `false` if transfers are enabled.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"notice\":\"See `ERC20.Approval`.\"},\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"},\"Transfer(address,address,uint256)\":{\"notice\":\"See `ERC20.Transfer`.\"}},\"kind\":\"user\",\"methods\":{\"group()\":{\"notice\":\"Retrieves the group slug to which this FAST belongs.\"},\"hasFixedSupply()\":{\"notice\":\"Is this FAST a fixed supply FAST?\"},\"isSemiPublic()\":{\"notice\":\"Is this FAST a semi public FAST?\"},\"issuerAddress()\":{\"notice\":\"Get the Issuer address.\"},\"marketplaceAddress()\":{\"notice\":\"Get the Marketplace address.\"},\"setGroup(string)\":{\"notice\":\"Assigns the FAST into a group given its slug. It should only be callable by the Issuer contract.\"},\"setIsSemiPublic(bool)\":{\"notice\":\"Allows to switch from a private scheme to a semi-public scheme, but not the other way around, unless the total supply is zero.\"},\"setTransfersDisabled(bool)\":{\"notice\":\"Allows an issuer member to enable or disable all transfers within this FAST.\"},\"transfersDisabled()\":{\"notice\":\"Are transfers enabled across this FAST?\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastTopFacet.sol\":\"FastTopFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x953780331b801357c0324bc901c9d11733823f3e424fde528eb9524f704499e0\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasGovernors.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(msg.sender) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(msg.sender) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xf7bd69c212ce87774af9365e3565993f253cabd67557d3a7d317e679d5b4385b\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/lib/LibHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(msg.sender) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(msg.sender) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xe9876fc4ec6dadc0d7e37e5562cb359b4b1dc6d188651893e73fc541be1e56a3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"../marketplace/MarketplaceAccessFacet.sol\\\";\\nimport \\\"../issuer/IssuerAccessFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The FAST Access facet is the source of truth when it comes to\\n * permissioning and ACLs within a given FAST.\\n */\\ncontract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n /// Structs.\\n\\n /**\\n * @notice This structure isn't used anywhere in storage. Instead, it\\n * allows various methods of the contract to return all the flags\\n * associated with a given address in one go.\\n */\\n struct Flags {\\n /// @notice Whether or not the item in scope is considered a governor of this FAST.\\n bool isGovernor;\\n /// @notice Whether or not the item in scope is considered a member of this FAST.\\n bool isMember;\\n }\\n\\n /// AHasGovernors implementation.\\n\\n function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n\\n function isValidGovernor(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onGovernorAdded(address governor) internal override(AHasGovernors) {\\n // If the governor isn't a FAST member yet, add them.\\n if (!AHasMembers(this).isMember(governor)) AHasMembers(this).addMember(governor);\\n // Notify issuer that this governor was added to this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorAddedToFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onGovernorRemoved(address governor) internal override(AHasGovernors) {\\n // Notify issuer that this governor was removed from this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorRemovedFromFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return\\n // The current contract should be able to manage its own members.\\n address(this) == who ||\\n // Governors can manage members.\\n AHasGovernors(this).isGovernor(who) ||\\n // Automatons with the correct privilege can manage members.\\n AHasAutomatons(address(this)).automatonCan(who, FAST_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal view override(AHasMembers) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onMemberAdded(address member) internal override(AHasMembers) {\\n // Notify marketplace that this member was added to this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberAddedToFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onMemberRemoved(address member) internal override(AHasMembers) {\\n // Notify token facet that this member was removed.\\n FastTokenFacet(address(this)).beforeRemovingMember(member);\\n // Notify marketplace that this member was removed from this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberRemovedFromFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// Flags.\\n\\n /**\\n * @notice Retrieves flags for a given address.\\n * @param a is the address to retrieve flags for.\\n * @return A `Flags` struct.\\n */\\n function flags(address a) external view returns (Flags memory) {\\n return Flags({isGovernor: AHasGovernors(address(this)).isGovernor(a), isMember: AHasMembers(this).isMember(a)});\\n }\\n}\\n\",\"keccak256\":\"0x50e406e05c99d2240cdd8ce53f94ddc868fee0482aabc8d9c6596fc3d9fb2a00\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/FastFrontendFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"./lib/LibFastDistributions.sol\\\";\\nimport \\\"./lib/LibFastCrowdfunds.sol\\\";\\n\\n/**\\n * @notice A facet dedicated to view / UI only methods. This facet should never hold any method that\\n * is not either `pure` or `view`, except to emit events.\\n */\\ncontract FastFrontendFacet is AFastFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Data structures.\\n\\n /**\\n * @notice This struct groups the common attributes of a FAST.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n /// @notice The `address` of the FAST.\\n address addr;\\n /// @notice The `name` of the FAST (ERC20).\\n string name;\\n /// @notice The `symbol` of the FAST (ERC20).\\n string symbol;\\n /// @notice The `decimals` of the FAST (ERC20).\\n uint8 decimals;\\n /// @notice The `totalSupply` of the FAST (ERC20).\\n uint256 totalSupply;\\n /// @notice Whether the FAST is semi public or not.\\n bool isSemiPublic;\\n /// @notice Whether the FAST has a fixed supply or continious.\\n bool hasFixedSupply;\\n /// @notice Whether the transfers are enabled or not for this FAST.\\n bool transfersDisabled;\\n /// @notice The default crowdfunds basis point fee.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n /// @notice The reserve balance.\\n uint256 reserveBalance;\\n /// @notice The number of members the FAST has.\\n uint256 memberCount;\\n /// @notice The number of governors for the FAST.\\n uint256 governorCount;\\n }\\n\\n /**\\n * @notice Member level details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct PrivilegesDetails {\\n /// @notice The Member's address.\\n address addr;\\n /// @notice The Member's balance.\\n uint256 balance;\\n /// @notice The Member's ETH balance.\\n uint256 ethBalance;\\n /// @notice Whether or not the address is a Member.\\n bool isMember;\\n /// @notice Whether or not the address is a Governor.\\n bool isGovernor;\\n /// @notice Automaton flags assigned to this address.\\n uint32 automatonPrivileges;\\n }\\n\\n /// Emitters.\\n\\n /**\\n * @notice Called by diamond facets, signals that FAST details may have changed.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be another facet of the diamond.\\n * Emits `DetailsChanged`, see `IFastEvents.DetailsChanged`\\n */\\n function emitDetailsChanged() external onlyDiamondFacet {\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n emit DetailsChanged({\\n transfersDisabled: LibFast.data().transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n memberCount: LibHasMembers.data().memberSet.values.length,\\n governorCount: LibHasGovernors.data().governorSet.values.length,\\n totalSupply: tokenData.totalSupply,\\n reserveBalance: tokenData.balances[LibHelpers.ZERO_ADDRESS]\\n });\\n }\\n\\n /// Public functions.\\n\\n /**\\n * @notice Gets the details of a FAST.\\n * @return The details for the current FAST, see `Details`.\\n */\\n function details() public view returns (Details memory) {\\n LibFast.Data storage topStorage = LibFast.data();\\n LibFastToken.Data storage tokenStorage = LibFastToken.data();\\n return\\n Details({\\n addr: address(this),\\n name: tokenStorage.name,\\n symbol: tokenStorage.symbol,\\n decimals: tokenStorage.decimals,\\n totalSupply: tokenStorage.totalSupply,\\n isSemiPublic: topStorage.isSemiPublic,\\n hasFixedSupply: topStorage.hasFixedSupply,\\n transfersDisabled: topStorage.transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n reserveBalance: tokenStorage.balances[LibHelpers.ZERO_ADDRESS],\\n memberCount: AHasMembers(address(this)).memberCount(),\\n governorCount: LibHasGovernors.data().governorSet.values.length\\n });\\n }\\n\\n /**\\n * @notice Gets detailed address privileges details.\\n * @param addr The address to get the privileges for.\\n * @return A FAST member's details, see `MemberDetails`.\\n */\\n function detailedPrivileges(address addr) public view returns (PrivilegesDetails memory) {\\n return\\n PrivilegesDetails({\\n addr: addr,\\n balance: LibFastToken.data().balances[addr],\\n ethBalance: (payable(addr).balance),\\n isMember: AHasMembers(address(this)).isMember(addr),\\n isGovernor: AHasGovernors(address(this)).isGovernor(addr),\\n automatonPrivileges: AHasAutomatons(address(this)).automatonPrivileges(addr)\\n });\\n }\\n\\n function paginateDetailedMembers(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n LibHasMembers.Data storage membersData = LibHasMembers.data();\\n (address[] memory members, uint256 nextCursor) = LibPaginate.addresses(membersData.memberSet.values, index, perPage);\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](members.length);\\n uint256 length = members.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(members[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedGovernors(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n (address[] memory governors, uint256 nextCursor) = LibPaginate.addresses(\\n LibHasGovernors.data().governorSet.values,\\n index,\\n perPage\\n );\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](governors.length);\\n uint256 length = governors.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(governors[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedDistributions(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Distribution.Details[] memory, uint256) {\\n (address[] memory distributions, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastDistributions.data().distributionSet.values,\\n index,\\n perPage\\n );\\n Distribution.Details[] memory values = new Distribution.Details[](distributions.length);\\n uint256 length = distributions.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Distribution(distributions[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n /**\\n * @dev Paginates detailed crowdfunds.\\n * @param index The index of the first crowdfund to return.\\n * @param perPage The number of crowdfunds to return.\\n * @return An array of crowdfund details, see `CrowdfundDetails`.\\n */\\n function paginateDetailedCrowdfunds(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Crowdfund.Details[] memory, uint256) {\\n (address[] memory crowdfunds, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastCrowdfunds.data().crowdfundSet.values,\\n index,\\n perPage\\n );\\n Crowdfund.Details[] memory values = new Crowdfund.Details[](crowdfunds.length);\\n uint256 length = crowdfunds.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Crowdfund(crowdfunds[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n}\\n\",\"keccak256\":\"0xdf236a27eb3441e06a4d9aa972a1677f4aed718cb4028f13462bfc7c87670729\",\"license\":\"MIT\"},\"contracts/fast/FastHistoryFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastHistory.sol\\\";\\n\\n/**\\n * @notice Although past events could be scrapped from the chain, we want to\\n * the frontend to be capable of listing past transfers and minting / burning events.\\n * This facet is in charge of performing archival of these things.\\n */\\ncontract FastHistoryFacet is AFastFacet {\\n /// Minting history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are minted.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Mint` on top of the stack.\\n */\\n function minted(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the mint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Mint, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are burnt.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Burn` on top of the stack.\\n */\\n function burnt(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the unmint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Burn, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice Returns the number of supply proofs (minting and burning together) ever created.\\n * @return A `uint256`.\\n */\\n function supplyProofCount() external view returns (uint256) {\\n return LibFastHistory.data().supplyProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of supply proofs (minting and burning together).\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.SupplyProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateSupplyProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n return LibPaginate.supplyProofs(LibFastHistory.data().supplyProofs, cursor, perPage);\\n }\\n\\n /// Transfer history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever a transfer has completed successfuly.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Keeps track of the operation in various tracking structures, so that it can be queried later by `sender` and `recipient`.\\n * - Pushes a transfer proof to the main transfer proof tracking stack.\\n */\\n function transfered(\\n address spender,\\n address from,\\n address to,\\n uint256 amount,\\n string calldata ref\\n ) external onlyDiamondFacet {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n // Keep track of the transfer proof ID for the sender and for the recipient.\\n s.transferProofInvolvements[from].push(s.transferProofs.length);\\n s.transferProofInvolvements[to].push(s.transferProofs.length);\\n // Keep track of the transfer proof globally.\\n s.transferProofs.push(\\n LibFastHistory.TransferProof({\\n spender: spender,\\n from: from,\\n to: to,\\n amount: amount,\\n blockNumber: block.number,\\n ref: ref\\n })\\n );\\n }\\n\\n /**\\n * @notice Returns the number of transfer proofs ever created.\\n * @return A `uint256`.\\n */\\n function transferProofCount() external view returns (uint256) {\\n return LibFastHistory.data().transferProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of transfer proofs.\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateTransferProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n return LibPaginate.transferProofs(LibFastHistory.data().transferProofs, cursor, perPage);\\n }\\n\\n /**\\n * @notice Counts all past inbound and outbound transfers involving a given address.\\n * @param involvee is the address for which to get the transfer proofs.\\n */\\n function transferProofByInvolveeCount(address involvee) external view returns (uint256) {\\n return LibFastHistory.data().transferProofInvolvements[involvee].length;\\n }\\n\\n /**\\n * @notice Returns pages of indices of past inbound and outbound transfer proofs by involvee.\\n * @dev This function is reading from an indexing data structure. Each index points to a record\\n * in the main transfer proof storage, and can then be found in `transferProofs` at returned indices.\\n * @param involvee is the address for which to retrieve a page of data.\\n * @param cursor is where to start.\\n * @param perPage is how many records at most should be returned.\\n */\\n function paginateTransferProofIndicesByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (uint256[] memory, uint256) {\\n return LibPaginate.uint256s(LibFastHistory.data().transferProofInvolvements[involvee], cursor, perPage);\\n }\\n\\n /**\\n * @notice Returns a page of inbound and outbound transfer proofs based on an involvee.#\\n * @param involvee is the address for which to fetch the data.\\n * @param cursor is where to start.\\n * @param perPage is how many items at most to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing the results and the cursor to the next page.\\n */\\n function paginateTransferProofsByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n uint256[] storage collection = s.transferProofInvolvements[involvee];\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = s.transferProofs[collection[cursor + i]];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0x6c517db2a7885a0991311827bb240e6003e1ceabe24f7d7fd245b3c0b0b5e08b\",\"license\":\"MIT\"},\"contracts/fast/FastTokenFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../lib/LibDiamond.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"../marketplace/MarketplaceTokenHoldersFacet.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastAccessFacet.sol\\\";\\nimport \\\"./FastHistoryFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\n\\ncontract FastTokenFacet is AFastFacet, IERC20 {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Constants.\\n\\n string internal constant DEAD_TOKENS_RETRIEVAL = \\\"Dead tokens retrieval\\\";\\n\\n /// Minting methods.\\n\\n /**\\n * @notice Mints an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that either the token has continuous supply, or that no tokens have been minted yet.\\n * - Increases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.minted`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Minted(amount, ref)` event.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function mint(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // We want to make sure that either of these two is true:\\n // - The token doesn't have fixed supply.\\n // - The token has fixed supply but has no tokens yet (First and only mint).\\n if (FastTopFacet(address(this)).hasFixedSupply() && (s.totalSupply != 0 || this.balanceOf(address(0)) != 0))\\n revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Prepare the minted amount on the zero address.\\n s.balances[address(0)] += amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).minted(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Minted(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Burns an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic.\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that the token has continuous supply.\\n * - Requires that there are enough funds in the reserve to cover for `amount` being burnt.\\n * - Decreases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.burnt(amount, ref)`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Burnt(amount, ref)`.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function burn(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n if (FastTopFacet(address(this)).hasFixedSupply()) revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Remove the minted amount from the zero address.\\n s.balances[address(0)] -= amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).burnt(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Burnt(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Allows an Issuer member to move an arbitrary account's holdings back to the reserve,\\n * as per regulatory requirements.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires that the caller is a member of the Issuer contract.\\n * - If the amount held by `holder` is not zero\\n * - The balance of `holder` should be set to zero.\\n * - The reserve's balance should be increased by how much was on the holder's account.\\n * - Total supply should be decreased by that amount too.\\n * - The `holder`'s address should not be tracked as a token holder in this FAST anymore.\\n * - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore.\\n * - A `Transfer(holder, reserve, amount)` event should be emited.\\n * - If the amount previously held by `holder` was not zero,\\n * - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\\n * @param holder is the address for which to move the tokens from.\\n */\\n function retrieveDeadTokens(address holder) external onlyIssuerMember {\\n // Cache how many tokens the holder has.\\n uint256 amount = balanceOf(holder);\\n // Note: The amount **can** be zero in this function.\\n\\n // Grab a pointer to the token storage.\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // These should only run if the amount is zero, as they result in a no-op.\\n if (amount > 0) {\\n // Set the holder balance to zero.\\n s.balances[holder] = 0;\\n // Increment the reserve's balance.\\n s.balances[address(0)] += amount;\\n // The tokens aren't in circulation anymore - decrease total supply.\\n s.totalSupply -= amount;\\n }\\n\\n // Since the holder's account is now empty, make sure to keep track of it both\\n // in this FAST and in the marketplace.\\n s.tokenHolders.remove(holder, true);\\n MarketplaceTokenHoldersFacet(LibFast.data().marketplace).fastBalanceChanged(holder, 0);\\n\\n // Keep track of this transfer in history facet.\\n FastHistoryFacet(address(this)).transfered(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n\\n // This operation can be seen as a regular transfer between holder and reserve. Emit.\\n emit FastTransfer(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n emit Transfer(holder, address(0), amount);\\n\\n // If amount wasn't zero, total supply and reserve balance have changed - emit.\\n if (amount > 0) FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n // ERC20 implementation and transfer related methods.\\n\\n /**\\n * @notice The name of this FAST (ERC20 standard).\\n * @return string Name of the FAST.\\n */\\n function name() external view returns (string memory) {\\n return LibFastToken.data().name;\\n }\\n\\n /**\\n * @notice The symbol of this FAST (ERC20 standard).\\n * @return string Symbol of the FAST.\\n */\\n function symbol() external view returns (string memory) {\\n return LibFastToken.data().symbol;\\n }\\n\\n /**\\n * @notice The `decimals` of this FAST (ERC20 standard).\\n * @return uint256 Number of decimals the FAST has.\\n */\\n function decimals() external view returns (uint256) {\\n return LibFastToken.data().decimals;\\n }\\n\\n /**\\n * @notice The total supply of the FAST (ERC20 standard).\\n * @return uint256 Total supply of the FAST.\\n */\\n function totalSupply() external view override(IERC20) returns (uint256) {\\n return LibFastToken.data().totalSupply;\\n }\\n\\n /**\\n * @notice The balance of the passed owner (ERC20 standard).\\n * @param owner The owners address to get the balance of.\\n * @return uint256 The current balance of this owner's account.\\n */\\n function balanceOf(address owner) public view override(IERC20) returns (uint256) {\\n return LibFastToken.data().balances[owner];\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. */\\n function transfer(address to, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(\\n TransferArgs({\\n spender: msg.sender,\\n from: msg.sender,\\n to: to,\\n amount: amount,\\n ref: LibFastToken.DEFAULT_TRANSFER_REFERENCE\\n })\\n );\\n return true;\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`. */\\n function transferWithRef(address to, uint256 amount, string calldata ref) external returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: msg.sender, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view override(IERC20) returns (uint256) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // If the allowance being queried is owned by the reserve, and `spender` is\\n // an Issuer member, `spender` owns the full balance of `owner`. If they are\\n // not an Issuer member then their allowance is zero. Otherwise, the regular given\\n // allowance for `spender` over `owner` applies.\\n if (owner == address(0)) return AHasMembers(LibFast.data().issuer).isMember(spender) ? s.balances[owner] : 0;\\n else return s.allowances[owner][spender];\\n }\\n\\n /**\\n * @notice This method directly calls `performApproval`, setting its `from` paramter to the sender of\\n * the transaction.\\n * @param spender is the address to allow spending from the caller's wallet.\\n * @param amount is how much to **increase** the allowance.\\n */\\n function approve(address spender, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performApproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice This method directly calls `performDisapproval`, setting its `from` parameter to the sender of\\n * the transaction.\\n * @param spender is the address to disallow spending from the caller's wallet.\\n * @param amount is how much to **decrease** the allowance.\\n */\\n function disapprove(address spender, uint256 amount) external onlyMember(msg.sender) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performDisapproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`, the `ref` will be defaulted.\\n function transferFrom(address from, address to, uint256 amount) external override(IERC20) returns (bool) {\\n transferFromWithRef(from, to, amount, LibFastToken.DEFAULT_TRANSFER_REFERENCE);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`.\\n function transferFromWithRef(address from, address to, uint256 amount, string memory ref) public returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: from, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n // Allowances query operations.\\n\\n function givenAllowanceCount(address owner) external view returns (uint256) {\\n return LibFastToken.data().allowancesByOwner[owner].values.length;\\n }\\n\\n function paginateAllowancesByOwner(\\n address owner,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesByOwner[owner].values, index, perPage);\\n }\\n\\n function receivedAllowanceCount(address spender) external view returns (uint256) {\\n return LibFastToken.data().allowancesBySpender[spender].values.length;\\n }\\n\\n function paginateAllowancesBySpender(\\n address spender,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesBySpender[spender].values, index, perPage);\\n }\\n\\n // These functions would be internal / private if we weren't using the diamond pattern.\\n // Instead, they're `onlyDiamondFacet` - eg can only be called by facets of the current\\n // FAST.\\n\\n struct TransferArgs {\\n address spender;\\n address from;\\n address to;\\n uint256 amount;\\n string ref;\\n }\\n\\n /**\\n * @notice This is the internal method that gets called whenever a transfer is initiated. Both `transfer`,\\n * `transferWithRef`, and their variants internally call this function.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that transfers are enabled for this FAST.\\n * - Requires that `from` and `to` are different addresses.\\n * - Requires that `from` membership is active in the marketplace.\\n * - If `from` is not the reserve, requires that `from` is a valid token holder.\\n * - If `from` is the reserve, requires that the message sender is an issuer member.\\n * - Requires that `to` is a valid token holder.\\n * - Requires that the amount is a positive value.\\n * - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address,\\n * - The allowance given by the `from` address to the `spender` covers for the `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Decreases the allowance given by `from` to `spender`.\\n * - If the new allowance reaches zero,\\n * - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions.\\n * - Decreases the balance of the `owner` address.\\n * - Increases the balance of the `to` address by `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Requires that there are enough transfer credits to cover for `amount`.\\n * - Decreases the transfer credits by `amount`.\\n * - If the `to` address is the reserve,\\n * - Decreases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Else, if the `from` address is the reserve,\\n * - Increases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Calls `FastHistoryFacet.transfered`.\\n * - Emits a `Transfer(from, to, amount)` event.\\n */\\n function performTransfer(TransferArgs calldata p) external onlyDiamondFacet {\\n // TODO: Make this function return instead of raising errors.\\n\\n // Grab a pointer to our top-level storage.\\n LibFast.Data storage topData = LibFast.data();\\n\\n // Requires that transfers are enabled for this FAST.\\n if (FastTopFacet(address(this)).transfersDisabled()) revert ICustomErrors.RequiresTransfersEnabled();\\n // Requires that `from` and `to` are different addresses.\\n else if (p.from == p.to) revert ICustomErrors.RequiresDifferentSenderAndRecipient(p.from);\\n // Requires that allowance transfers from the reserve are performed by issuer members only.\\n else if (p.from == address(0) && !AHasMembers(topData.issuer).isMember(p.spender))\\n revert ICustomErrors.RequiresIssuerMembership(p.spender);\\n // Requires that the `from` address can hold tokens.\\n else if (!canHoldTokens(p.from)) revert ICustomErrors.RequiresValidTokenHolder(p.from);\\n // Requires that the `from` address marketplace membership is active if not the reserve.\\n else if (p.from != address(0) && !IHasActiveMembers(LibFast.data().marketplace).isActiveMember(p.from))\\n revert ICustomErrors.RequiresMarketplaceActiveMembership(p.from);\\n // Requires that the `to` address can hold tokens.\\n else if (!canHoldTokens(p.to)) revert ICustomErrors.RequiresValidTokenHolder(p.to);\\n\\n // For any non-zero amount, update balances and allowances, notify other contracts, etc.\\n if (p.amount != 0) {\\n // Grab a pointer to our token storage.\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n\\n // If this is an allowance transfer and if the `from` account is not the reserve...\\n if (p.spender != p.from && p.from != address(0)) {\\n // Decrease allowance.\\n uint256 newAllowance = tokenData.allowances[p.from][p.spender] -= p.amount;\\n // If the allowance reached zero, we want to remove that allowance from\\n // the various other places where we keep track of it.\\n if (newAllowance == 0) {\\n tokenData.allowancesByOwner[p.from].remove(p.spender, true);\\n tokenData.allowancesBySpender[p.spender].remove(p.from, true);\\n }\\n }\\n\\n // Keep track of the balances - `from` spends (decrease), `to` receives (increase).\\n uint256 fromBalance = (tokenData.balances[p.from] -= p.amount);\\n uint256 toBalance = (tokenData.balances[p.to] += p.amount);\\n\\n // Keep track of who has what FAST.\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.from, fromBalance);\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.to, toBalance);\\n\\n // Keep track of who holds this token.\\n balanceChanged(p.from, fromBalance);\\n balanceChanged(p.to, toBalance);\\n\\n // If the funds are going to the reserve...\\n if (p.to == address(0)) {\\n // Decrease total supply.\\n tokenData.totalSupply -= p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n // If the funds are moving from the zero address...\\n else if (p.from == address(0)) {\\n // Increase total supply.\\n tokenData.totalSupply += p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n // Keep track of the transfer in the history facet.\\n FastHistoryFacet(address(this)).transfered(p.spender, p.from, p.to, p.amount, p.ref);\\n\\n // Emit!\\n emit FastTransfer(p.spender, p.from, p.to, p.amount, p.ref);\\n emit Transfer(p.from, p.to, p.amount);\\n }\\n\\n /**\\n * @notice Increases the allowance given by `from` to `spender` by `amount`.\\n * Note that this function should run and emit even if the amount passed is zero.\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that `onlyTokenHolder` passes for the `from` address.\\n * - Requires that the `amount` is positive number.\\n * - Increases the allowance given by `from` to `spender` by `amount`.\\n * - Update the allowance lookup tables in both directions.\\n * - Emits an `Approval(from, spender, amount)`.\\n * @param from is the wallet from which to give the allowance.\\n * @param spender is the receiver of the allowance.\\n * @param amount is how much to **increase** the current allowance by.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performApproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n // Allowance cannot be given over the reserve.\\n if (from == address(0)) revert ICustomErrors.UnsupportedOperation();\\n // Require that the `from` address can hold tokens.\\n else if (!canHoldTokens(from)) revert ICustomErrors.RequiresValidTokenHolder(from);\\n\\n if (amount > 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // Note that we are not exactly following ERC20 here - we don't want to **set** the allowance to `amount`\\n // to mitigate a possible attack.\\n // See https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.gmr6zdg47087.\\n s.allowances[from][spender] += amount;\\n // Keep track of given and received allowances.\\n s.allowancesByOwner[from].add(spender, true);\\n s.allowancesBySpender[spender].add(from, true);\\n }\\n\\n // Emit!\\n emit Approval(from, spender, amount);\\n }\\n\\n /**\\n * @notice Decreases allowance given by `from` to `spender` by `amount`.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - The allowance given by `from` to `spender` is decreased by `amount`.\\n * - Whether the allowance reached zero, stop tracking it by owner and by spender.\\n * - Emit a `Disapproval(from, spender, amount)` event.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performDisapproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n if (amount != 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove allowance.\\n s.allowances[from][spender] -= amount;\\n\\n // Whenever the allowance reaches zero, stop tracking it by owner and spender.\\n if (s.allowances[from][spender] == 0) {\\n s.allowancesByOwner[from].remove(spender, true);\\n s.allowancesBySpender[spender].remove(from, true);\\n }\\n }\\n\\n // Emit!\\n emit Disapproval(from, spender, amount);\\n }\\n\\n // WARNING: This method contains two loops. We know that this should never\\n // happen in solidity. However:\\n // - In the context of our private chain, gas is cheap.\\n // - It can only be called by a governor.\\n function beforeRemovingMember(address member) external onlyDiamondFacet {\\n if (balanceOf(member) != 0) revert ICustomErrors.RequiresPositiveBalance(member);\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove all given allowances.\\n {\\n address[] storage gaData = s.allowancesByOwner[member].values;\\n while (gaData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address spender = gaData[0];\\n this.performDisapproval(member, spender, s.allowances[member][spender]);\\n }\\n }\\n\\n // Remove all received allowances.\\n {\\n address[] storage raData = s.allowancesBySpender[member].values;\\n while (raData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address owner = raData[0];\\n this.performDisapproval(owner, member, s.allowances[owner][member]);\\n }\\n }\\n }\\n\\n function holders() external view returns (address[] memory) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n return s.tokenHolders.values;\\n }\\n\\n function balanceChanged(address holder, uint256 balance) private {\\n // Return early if this is the zero address.\\n if (holder == address(0)) return;\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.tokenHolders.contains(holder))\\n s.tokenHolders.add(holder, false);\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.tokenHolders.contains(holder)) s.tokenHolders.remove(holder, false);\\n }\\n\\n // Private and helper methods.\\n\\n /**\\n * @notice Ensures that the given address is a member of the current FAST or the Zero Address.\\n *\\n * Business logic:\\n * - If the candidate is the reserve, it is a valid token holder.\\n * - If the FAST is semi-public,\\n * - We require that candidate is a member of the Marketplace contract and is active in it.\\n * - Otherwise,\\n * - Require that the candidate is a member of the FAST.\\n * @param candidate The address to check.\\n * @return A boolean set to `true` if `candidate` can hold tokens, `false` otherwise.\\n */\\n function canHoldTokens(address candidate) private view returns (bool) {\\n // Zero address can hold tokens, in any cases.\\n if (candidate == address(0)) return true;\\n // If the FAST is semi public, any member of the marketplace can hold tokens.\\n else if (FastTopFacet(address(this)).isSemiPublic()) {\\n return AHasMembers(LibFast.data().marketplace).isMember(candidate);\\n }\\n // FAST is private, only members of the fast can hold tokens.\\n else {\\n return AHasMembers(address(this)).isMember(candidate);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb0b8ce0ddc8771f8511dec440519b6266f4ec2dcb6f25087f03e81798d6463de\",\"license\":\"MIT\"},\"contracts/fast/FastTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./lib/IFastEvents.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\n\\ncontract FastTopFacet is AFastFacet {\\n // Getters and setters for global flags.\\n\\n /**\\n * @notice Get the Issuer address.\\n * @return address Address of Issuer.\\n */\\n function issuerAddress() external view returns (address) {\\n return LibFast.data().issuer;\\n }\\n\\n /**\\n * @notice Get the Marketplace address.\\n * @return address Address of Marketplace.\\n */\\n function marketplaceAddress() external view returns (address) {\\n return LibFast.data().marketplace;\\n }\\n\\n /**\\n * @notice Is this FAST a semi public FAST?\\n * @return bool Yes/no semi public.\\n */\\n function isSemiPublic() external view returns (bool) {\\n return LibFast.data().isSemiPublic;\\n }\\n\\n /**\\n * @notice Is this FAST a fixed supply FAST?\\n * @return bool Yes/no fixed supply.\\n */\\n function hasFixedSupply() external view returns (bool) {\\n return LibFast.data().hasFixedSupply;\\n }\\n\\n /**\\n * @notice Are transfers enabled across this FAST?\\n * @return boolean `true` if transfers are disabled, `false` if transfers are enabled.\\n */\\n function transfersDisabled() external view returns (bool) {\\n return LibFast.data().transfersDisabled;\\n }\\n\\n // Setters for global flags.\\n\\n /**\\n * @notice Allows to switch from a private scheme to a semi-public scheme,\\n * but not the other way around, unless the total supply is zero.\\n * @param flag Set the semi public flag to true/false.\\n */\\n function setIsSemiPublic(bool flag) external onlyIssuerMember {\\n // Someone is trying to toggle back to private?... No can do!\\n if (this.isSemiPublic() && FastTokenFacet(address(this)).totalSupply() != 0) {\\n revert ICustomErrors.UnsupportedOperation();\\n }\\n LibFast.data().isSemiPublic = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /**\\n * @notice Allows an issuer member to enable or disable all transfers within this FAST.\\n * @param flag Set the transfer capability to active or not.\\n */\\n function setTransfersDisabled(bool flag) external onlyIssuerMemberOrIssuerContract {\\n LibFast.Data storage d = LibFast.data();\\n // Only make changes and emit if the new flag is different than the old one.\\n if (d.transfersDisabled != flag) {\\n // Set flag.\\n d.transfersDisabled = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n /**\\n * @notice Retrieves the group slug to which this FAST belongs.\\n * @return string The group slug string.\\n */\\n function group() external view returns (string memory) {\\n return LibFast.data().group;\\n }\\n\\n /**\\n * @notice Assigns the FAST into a group given its slug.\\n * It should only be callable by the Issuer contract.\\n * @param newGroup is the slug for the new group for this FAST.\\n */\\n function setGroup(string calldata newGroup) external onlyIssuerContract {\\n // Set group slug.\\n LibFast.data().group = newGroup;\\n }\\n}\\n\",\"keccak256\":\"0xc92847559953aa4130a76c0ddf63d9f9e90cf26351153fa691aea503210f7c8d\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Transfer`.\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n /// @notice See `ERC20.Approval`.\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0xff980c3127905dd501245d89f5293d4ee16d0ef46cefea19f06e6915e178527c\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastCrowdfunds.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastCrowdfunds {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 2;\\n /// @notice This is keccak256('Fast.storage.Crowdfunds'):\\n bytes32 internal constant STORAGE_SLOT = 0xc843fbb8f0f5694376d391c1687b800112a6eed97820d8e7a2b82618dd1b69ed;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed crowdfund contract is held here.\\n LibAddressSet.Data crowdfundSet;\\n /// @notice The default crowdfund fee for this FAST.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3f43bc03bbdd3d7d1e2dc957e060310ba97eea02ce64ac91082cc30c9e7c82b7\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastDistributions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastDistributions {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Distributions'):\\n bytes32 internal constant STORAGE_SLOT = 0xe865e85b076245a187a9d3cc15c47264cd0b46df4afd899817bd2e16523485ad;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed distribution contract is held here.\\n LibAddressSet.Data distributionSet;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dbd277dde92dc23bd8fd81a005783e50903690b3acf4ca9e98f6dea3570426e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with token related logic.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastToken {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Token'):\\n bytes32 internal constant STORAGE_SLOT = 0xb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261;\\n\\n // Constants.\\n\\n string internal constant DEFAULT_TRANSFER_REFERENCE = \\\"Unspecified - via ERC20\\\";\\n\\n // Data structures.\\n\\n /**\\n * @notice The token data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // ERC20 related properties for this FAST Token.\\n /// @notice The name of the FAST.\\n string name;\\n /// @notice The symbol for this FAST.\\n string symbol;\\n /// @notice The decimal points used by this FAST.\\n uint8 decimals;\\n /// @notice The amount of tokens in circulation.\\n uint256 totalSupply;\\n /// @notice Legacy variable.\\n uint256 LEGACY_transferCredits;\\n /// @notice Our members balances are held here.\\n mapping(address => uint256) balances;\\n // Allowances are stored here.\\n /// @notice Allowance amounts are stored in here, via mapping of `owner.spender.amount`\\n mapping(address => mapping(address => uint256)) allowances;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by owner.\\n mapping(address => LibAddressSet.Data) allowancesByOwner;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by spender.\\n mapping(address => LibAddressSet.Data) allowancesBySpender;\\n /// @notice All of this FAST token holders.\\n LibAddressSet.Data tokenHolders;\\n }\\n\\n /**\\n * @notice Returns the token storage for the calling FAST.\\n * @return s a struct pointer for token FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf101b0347e095905f91f32ec41dcbe1dca1d8a84cc99664ca5254f21dcf3d8e9\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0x62cf23c6bccffebc753940b8f9260626f04455dd305736aee200d8d1545eb3e4\",\"license\":\"MIT\"},\"contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n/// @title A facet providing diamond cut mechanisms.\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a method with `delegatecall`.\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xf548f40da69f2c54f4e03f92dc31094f6825669314b87266cce22e0a8f1a4c47\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title ERC20 standard as defined in the EIP.\\ninterface IERC20 {\\n /**\\n * @notice Allows to query the total number of tokens in circulation.\\n * @return An `uint256` representing how many tokens are currently in circulation.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Allows to query the balance of a given address.\\n * @param account is the address for which the balance shall be queried.\\n * @return An `uint256` - the balance for the given address.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @notice Moves `amount` tokens from the caller's account to `recipient`.\\n * @param recipient is the address to which the funds should be sent to, if successful.\\n * @param amount is the amount of tokens to transfef.\\n * @return A `bool` which value is `true` when the operation was successful.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner`\\n * through `transferFrom`. This is zero by default.\\n * @dev This value changes when `approve`, `disapprove` and `transferFrom` / `transferFromWithRef` are called.\\n * @param owner is the owner of the funds.\\n * @param spender is the address for which the allowance should be queried.\\n * @return A `uint256` representing the remaining allowance of `spender` over `owner`'s funds.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @notice Increases the allowance of `spender` by `amount`.\\n * @param spender is the address towards which the allowance should be given.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @notice Attempts to transfer `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's allowance.\\n * @return A `bool` set to `true` when the operation was successful.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x79731c983219a24087d3bb925b9dd5c3cb3c85ebfdcd45afce5826bc2d53710f\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/issuer/IssuerAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuerAccess.sol\\\";\\nimport \\\"./lib/IIssuerEvents.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\n\\ncontract IssuerAccessFacet is AIssuerFacet, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return AHasMembers(this).isMember(who);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n /// Membership management.\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor added to a FAST.\\n */\\n function governorAddedToFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].add(msg.sender, true);\\n\\n emit GovernorshipAdded(msg.sender, governor);\\n }\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor removed from a FAST.\\n */\\n function governorRemovedFromFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].remove(msg.sender, true);\\n\\n emit GovernorshipRemoved(msg.sender, governor);\\n }\\n\\n /** @notice Returns a list of FASTs that the passed address is a governor of.\\n * @param governor is the address to check governorships of.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateGovernorships(\\n address governor,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuerAccess.data().fastGovernorships[governor].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0xb8eb9a8eb626f61ecc5627b927bdd81a97f38b05e621e903f77000e63a21b37c\",\"license\":\"MIT\"},\"contracts/issuer/IssuerTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuer.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\ncontract IssuerTopFacet is AIssuerFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n // FAST management related methods.\\n\\n /**\\n * @notice Queries whether a given address is a known and registered FAST contract.\\n * @param fast The address of the contract to check.\\n * @return A boolean.\\n */\\n function isFastRegistered(address fast) external view returns (bool) {\\n return LibIssuer.data().fastSet.contains(fast);\\n }\\n\\n /**\\n * @notice Allows to retrieve the address of a FAST diamond given its symbol.\\n * @param symbol The symbol of the FAST diamond to get the address of.\\n * @return The address of the corresponding FAST diamond, or the Zero Address if not found.\\n */\\n function fastBySymbol(string calldata symbol) external view returns (address) {\\n return LibIssuer.data().fastSymbols[symbol];\\n }\\n\\n /**\\n * @notice Allows the registration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be registered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastRegistered` event.\\n */\\n function registerFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n if (s.fastSymbols[symbol] != address(0)) {\\n revert ICustomErrors.DuplicateEntry();\\n }\\n\\n // Add the FAST to our list.\\n s.fastSet.add(fast, false);\\n // Add the fast symbol to our list.\\n s.fastSymbols[symbol] = fast;\\n\\n // Emit!\\n emit FastRegistered(fast);\\n }\\n\\n /**\\n * @notice Allows the unregistration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be unregistered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastUnregistered` event.\\n */\\n function unregisterFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n\\n // Disable transfers in the FAST.\\n FastTopFacet(fast).setTransfersDisabled(true);\\n\\n // Remove the FAST from our lists.\\n s.fastSet.remove(fast, false);\\n delete s.fastSymbols[symbol];\\n\\n // Emit!\\n emit FastUnregistered(fast);\\n }\\n\\n /**\\n * @notice Counts the number of FAST diamonds registered with this Issuer.\\n * @return The number of FAST diamonds registered with this Issuer.\\n */\\n function fastCount() external view returns (uint256) {\\n return LibIssuer.data().fastSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a starting cursor and a number of records per page.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFasts(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to move collected ERC20 fees from this contract\\n * to an arbitrary address.\\n * @param token is the address of the ERC20 to be collected.\\n * @param amount is how much should be moved from the ERC20 to the collection address.\\n * @param to is the collection address - eg the address that will receive the ERC20 tokens.\\n */\\n function transferERC20Tokens(IERC20 token, uint256 amount, address to) public onlyMember(msg.sender) {\\n require(token.transfer(to, amount));\\n }\\n\\n /**\\n * @notice Allows to assign FASTs to groups.\\n * @param fast The FAST address to assign.\\n * @param newGroup The name of the group in which the FAST should be placed.\\n */\\n function setFastGroup(address fast, string calldata newGroup) external onlyMember(msg.sender) {\\n string memory oldGroup = FastTopFacet(fast).group();\\n // Remove FAST from old group.\\n if (bytes(oldGroup).length > 0) LibIssuer.data().fastGroups[oldGroup].remove(fast, false);\\n // Add FAST to new group.\\n if (bytes(newGroup).length > 0) LibIssuer.data().fastGroups[newGroup].add(fast, false);\\n // Set group name at FAST level.\\n FastTopFacet(fast).setGroup(newGroup);\\n // Emit!\\n emit FastGroupChanged(fast, oldGroup, newGroup);\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a group, starting cursor and a number of records per page.\\n * @param group The group to paginate.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFastsInGroup(\\n string calldata group,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastGroups[group].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0x99cd1b99fcbba93ea96e34d70b6a51cc50ebf6b2af22dab69d529a15ab2e7700\",\"license\":\"MIT\"},\"contracts/issuer/lib/AIssuerFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./IIssuerEvents.sol\\\";\\n\\n/**\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AIssuerFacet is IIssuerEvents {\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresIssuerMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x4ab53f3e2ce4e78f13c93f46c10c581c0b5ebc520979191d6092d2d7f7aa733c\",\"license\":\"MIT\"},\"contracts/issuer/lib/IIssuerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// WARNING: These events must be maintained 1:1 with LibIssuerEvents!\\n// They also should never be emitted directly, they only help us defining\\n// typescript types!\\ninterface IIssuerEvents {\\n /// FAST registration events.\\n\\n /**\\n * @notice Emited when a new FAST is registered.\\n * @param fast The address of the newly registered FAST diamond.\\n */\\n event FastRegistered(address indexed fast);\\n /**\\n * @notice Emited when a FAST is removed from the Issuer contract.\\n * @param fast The address of the unregistered FAST.\\n */\\n event FastUnregistered(address indexed fast);\\n\\n /// FAST groupping events.\\n\\n event FastGroupChanged(address indexed fast, string indexed oldGroup, string indexed newGroup);\\n\\n /// Governors.\\n\\n event GovernorshipRemoved(address indexed fast, address indexed governor);\\n event GovernorshipAdded(address indexed fast, address indexed governor);\\n}\\n\",\"keccak256\":\"0x7ab2611cedeaf69aba2461e083ce436cde93f53e0ebf7ae882bf1800a839f543\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuer {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xd681d5f1de7bc4b7442c088939dc202585e09699e92a94c9717ace8d0f4fcaa5;\\n\\n // Data structures.\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // This is where we keep our list of deployed fast FASTs.\\n LibAddressSet.Data fastSet;\\n // We keep track of the FAST symbols that were already used - string to FAST address.\\n mapping(string => address) fastSymbols;\\n // We also keep track of the FAST groups here - slug to FAST address set.\\n mapping(string => LibAddressSet.Data) fastGroups;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x82972d98e290aa68b6fa14dee5e9f3e0ca3d80604e96435ea437e9f92891f7e9\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuerAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuerAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0x3ceaa4d5edf9c96fbd56140abe6389d65a87143d4f11819874ff2fe0ae9574db;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // For a given address we store list of FASTs where that address is a governor.\\n mapping(address => LibAddressSet.Data) fastGovernorships;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x225043d709577f7c580aa46637ef2910336dc0ef75a508a1252484fa45558fca\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x0e12d54c3afccb656312e8bc7c31d16feb3718a421d2ea732024f608ccb6aab4\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"./lib/LibMarketplaceAccess.sol\\\";\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./MarketplaceAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Access facet is in charge of keeping track of marketplace members.\\n */\\ncontract MarketplaceAccessFacet is AMarketplaceFacet, AHasMembers, IHasActiveMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return _isIssuerMember(who) || AHasAutomatons(address(this)).automatonCan(who, MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n function onMemberRemoved(address member) internal view override(AHasMembers) {\\n LibMarketplaceAccess.Data storage s = LibMarketplaceAccess.data();\\n // Ensure that member doesn't have any FAST membership.\\n if (s.fastMemberships[member].values.length != 0) revert ICustomErrors.RequiresNoFastMemberships(member);\\n }\\n\\n /// FAST memberships functions.\\n\\n /**\\n * @notice Allows to query FAST memberships for a given member address.\\n * @param member Is the address to check.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n */\\n function fastMemberships(\\n address member,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibMarketplaceAccess.data().fastMemberships[member].values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a new FAST membership has been added.\\n */\\n function memberAddedToFast(address member) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the member's FAST membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].add(msg.sender, true);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a FAST membership has been removed.\\n */\\n function memberRemovedFromFast(address member) external {\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].remove(msg.sender, true);\\n }\\n\\n /// IHasActiveMembers implementation.\\n\\n /**\\n * @notice Given a member returns it's activation status.\\n * @param candidate The address to check activation status on.\\n */\\n function isActiveMember(address candidate) external view override(IHasActiveMembers) returns (bool) {\\n return AHasMembers(this).isMember(candidate) && !LibMarketplaceAccess.data().deactivatedMemberSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Activates a member at the Marketplace level.\\n * @param member The member to remove from the deactivation member set.\\n */\\n function activateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to activate an already active member.\\n if (this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceDeactivatedMember(member);\\n // Remove the member from the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.remove(member, false);\\n // Emit!\\n emit MemberActivated(member);\\n }\\n\\n /**\\n * @notice Deactivates a member at the Marketplace level.\\n * @param member The member to add to the deactivation member set.\\n */\\n function deactivateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to deactivate an already deactivated member.\\n if (!this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceActiveMembership(member);\\n // Add the member to the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.add(member, false);\\n // Emit!\\n emit MemberDeactivated(member);\\n }\\n}\\n\",\"keccak256\":\"0x87d6a82598a03377f78f625bee234bef4c62066dff99ae89484c8fb5f7f6b8a2\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS = 1;\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract MarketplaceAutomatonsFacet is AMarketplaceFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0xa2a142702268b2d33ddd7703c23f36274161cb2b9b707369e703ebbfa2f5a53c\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceTokenHoldersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./lib/LibMarketplaceTokenHolders.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\n\\n/** @dev The Marketplace FAST balances facet.\\n */\\ncontract MarketplaceTokenHoldersFacet is AMarketplaceFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /** @dev The callback used when a balance changes on a FAST.\\n */\\n function fastBalanceChanged(address account, uint256 balance) external {\\n // Return early if this is the zero address.\\n if (account == address(0)) {\\n return;\\n }\\n\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n\\n // Get the storage pointer and balance of the token holder.\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.fastHoldings[account].contains(msg.sender)) {\\n s.fastHoldings[account].add(msg.sender, false);\\n }\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.fastHoldings[account].contains(msg.sender)) {\\n s.fastHoldings[account].remove(msg.sender, false);\\n }\\n }\\n\\n /** @dev A way to get a list of FASTs for an account.\\n * @return list of FAST addresses.\\n */\\n function holdings(address account) external view returns (address[] memory) {\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n return s.fastHoldings[account].values;\\n }\\n}\\n\",\"keccak256\":\"0x1ebb1ceb92cab41edadcff833ca641a3883329b23ccf602ffb4b464f08ffc918\",\"license\":\"MIT\"},\"contracts/marketplace/lib/AMarketplaceFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibMarketplace.sol\\\";\\nimport \\\"./IMarketplaceEvents.sol\\\";\\n\\n/**\\n * @notice This contract is a group of modifiers that can be used by any Marketplace facets to guard against\\n * certain permissions.\\n */\\nabstract contract AMarketplaceFacet is IMarketplaceEvents {\\n /// Internal ACL functions.\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibMarketplace.data().issuer).isMember(who);\\n }\\n\\n // Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() virtual {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Requires that the message sender is a member of the linked Issuer.\\n */\\n modifier onlyIssuerMember() virtual {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n /**\\n * @notice Requires that the given address is a member of the marketplace.\\n * @param who is the address to be checked.\\n */\\n modifier onlyMember(address who) virtual {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xb9569fef0cef86a40828714a131f6dafb98ae4cd21ff44e710f8e57413bd6ffb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/IMarketplaceEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface IMarketplaceEvents {\\n /// @dev See `IHasActiveMembers`.\\n event MemberActivated(address indexed member);\\n /// @dev See `IHasActiveMembers`.\\n event MemberDeactivated(address indexed member);\\n /// @dev Emitted when a FAST deployment is requested.\\n event FastDeploymentRequested(uint256 indexed index);\\n}\\n\",\"keccak256\":\"0xeb89df40f51b42b444f698f8d13cf4318396f9393d7fab049c131e2f6bd45b4d\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplace {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xb59ec141376cee83f618e10e881bbb4789cdeee27e0d441a8c37ead3cb8b93c1;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba63d4c8f5878ca351ca9fb34f5bc1937dd4a90efaccbc739948eaa3cbf4e526\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0xecb992c7a1185ca18ac50bc1672192fb67e7c3e74465887a8fcaab265dab37bd;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we keep track of our member FAST memberships.\\n mapping(address => LibAddressSet.Data) fastMemberships;\\n /// @notice This is where we keep track of our deactivated memberships.\\n LibAddressSet.Data deactivatedMemberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac8cc51395e6e5b357b72f0cb3b4b681b5cbe0e0338692fde4d1087bc98b03eb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceTokenHolders.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceTokenHolders {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.TokenHolders.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xecf50453542504034bd40d376fb1408ada3025f2fe86ca1b9b4b1440b8d4a2f4;\\n\\n struct Data {\\n /// @dev The latest intializer version that was called.\\n uint16 version;\\n /// @dev The tracked FAST holdings of a user.\\n mapping(address => LibAddressSet.Data) fastHoldings;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa6edcacafdaaac79b202288095948b7b3bee0e01f7d4b4efb8eee3425f9a8c04\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610afe806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a63234e011610076578063d65cd0101161005b578063d65cd010146101e1578063daa17f49146101f4578063ddb2d22b1461023157600080fd5b8063a63234e01461016a578063c97b9730146101ce57600080fd5b8063034cd725146100a857806311e54933146100fd57806329e7ef2d146101405780638762d38e14610155575b600080fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70654760100000000000000000000000000000000000000000000900460ff165b60405190151581526020015b60405180910390f35b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547501000000000000000000000000000000000000000000900460ff166100e8565b610148610273565b6040516100f49190610924565b6101686101633660046109a8565b610327565b005b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f4565b6101686101dc3660046109cc565b6104d2565b6101686101ef3660046109a8565b610578565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166101a9565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065474010000000000000000000000000000000000000000900460ff166100e8565b60607f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70560020180546102a490610a3e565b80601f01602080910402602001604051908101604052809291908181526020018280546102d090610a3e565b801561031d5780601f106102f25761010080835404028352916020019161031d565b820191906000526020600020905b81548152906001019060200180831161030057829003601f168201915b5050505050905090565b610330336107ab565b15801561037a57507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314155b156103b1576040517f7fc5627f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7059082151576010000000000000000000000000000000000000000000090910460ff161515146104ce576001810180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff1676010000000000000000000000000000000000000000000084151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b1580156104b557600080fd5b505af11580156104c9573d6000803e3d6000fd5b505050505b5050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314610548576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105737f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e707838361086d565b505050565b610581336107ab565b6105bd576040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815233600482015260240160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015610608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062c9190610a92565b80156106a557503073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a29190610aaf565b15155b156106dc576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70680547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000083151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b5050505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190610a92565b92915050565b82805461087990610a3e565b90600052602060002090601f01602090048101928261089b57600085556108ff565b82601f106108d2578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556108ff565b828001600101855582156108ff579182015b828111156108ff5782358255916020019190600101906108e4565b5061090b92915061090f565b5090565b5b8082111561090b5760008155600101610910565b600060208083528351808285015260005b8181101561095157858101830151858201604001528201610935565b81811115610963576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b80151581146109a557600080fd5b50565b6000602082840312156109ba57600080fd5b81356109c581610997565b9392505050565b600080602083850312156109df57600080fd5b823567ffffffffffffffff808211156109f757600080fd5b818501915085601f830112610a0b57600080fd5b813581811115610a1a57600080fd5b866020828501011115610a2c57600080fd5b60209290920196919550909350505050565b600181811c90821680610a5257607f821691505b60208210811415610a8c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215610aa457600080fd5b81516109c581610997565b600060208284031215610ac157600080fd5b505191905056fea26469706673582212207b11fd214da8320fab336a3d6a8f974e5e11b504a852f06eef3a024e6393c06b64736f6c634300080a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a63234e011610076578063d65cd0101161005b578063d65cd010146101e1578063daa17f49146101f4578063ddb2d22b1461023157600080fd5b8063a63234e01461016a578063c97b9730146101ce57600080fd5b8063034cd725146100a857806311e54933146100fd57806329e7ef2d146101405780638762d38e14610155575b600080fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70654760100000000000000000000000000000000000000000000900460ff165b60405190151581526020015b60405180910390f35b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547501000000000000000000000000000000000000000000900460ff166100e8565b610148610273565b6040516100f49190610924565b6101686101633660046109a8565b610327565b005b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f4565b6101686101dc3660046109cc565b6104d2565b6101686101ef3660046109a8565b610578565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166101a9565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065474010000000000000000000000000000000000000000900460ff166100e8565b60607f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70560020180546102a490610a3e565b80601f01602080910402602001604051908101604052809291908181526020018280546102d090610a3e565b801561031d5780601f106102f25761010080835404028352916020019161031d565b820191906000526020600020905b81548152906001019060200180831161030057829003601f168201915b5050505050905090565b610330336107ab565b15801561037a57507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314155b156103b1576040517f7fc5627f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7059082151576010000000000000000000000000000000000000000000090910460ff161515146104ce576001810180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff1676010000000000000000000000000000000000000000000084151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b1580156104b557600080fd5b505af11580156104c9573d6000803e3d6000fd5b505050505b5050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314610548576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105737f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e707838361086d565b505050565b610581336107ab565b6105bd576040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815233600482015260240160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015610608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062c9190610a92565b80156106a557503073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a29190610aaf565b15155b156106dc576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70680547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000083151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b5050505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190610a92565b92915050565b82805461087990610a3e565b90600052602060002090601f01602090048101928261089b57600085556108ff565b82601f106108d2578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556108ff565b828001600101855582156108ff579182015b828111156108ff5782358255916020019190600101906108e4565b5061090b92915061090f565b5090565b5b8082111561090b5760008155600101610910565b600060208083528351808285015260005b8181101561095157858101830151858201604001528201610935565b81811115610963576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b80151581146109a557600080fd5b50565b6000602082840312156109ba57600080fd5b81356109c581610997565b9392505050565b600080602083850312156109df57600080fd5b823567ffffffffffffffff808211156109f757600080fd5b818501915085601f830112610a0b57600080fd5b813581811115610a1a57600080fd5b866020828501011115610a2c57600080fd5b60209290920196919550909350505050565b600181811c90821680610a5257607f821691505b60208210811415610a8c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215610aa457600080fd5b81516109c581610997565b600060208284031215610ac157600080fd5b505191905056fea26469706673582212207b11fd214da8320fab336a3d6a8f974e5e11b504a852f06eef3a024e6393c06b64736f6c634300080a0033", + "numDeployments": 24, + "solcInputHash": "86d80cd7711949cd078774435b1d68c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InternalMethod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequiresIssuerMemberOrIssuerCaller\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"RequiresIssuerMembership\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Burnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"basisPointFee\",\"type\":\"uint32\"}],\"name\":\"CrowdfundDefaultBasisPointFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Crowdfund\",\"name\":\"crowdfund\",\"type\":\"address\"}],\"name\":\"CrowdfundRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfersDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"crowdfundsDefaultBasisPointsFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"memberCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"governorCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveBalance\",\"type\":\"uint256\"}],\"name\":\"DetailsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Disapproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Distribution\",\"name\":\"distribution\",\"type\":\"address\"}],\"name\":\"DistributionRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"}],\"name\":\"FastTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ref\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"group\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasFixedSupply\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isSemiPublic\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"issuerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketplaceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newGroup\",\"type\":\"string\"}],\"name\":\"setGroup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"setIsSemiPublic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"setTransfersDisabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transfersDisabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"group()\":{\"returns\":{\"_0\":\"string The group slug string.\"}},\"hasFixedSupply()\":{\"returns\":{\"_0\":\"bool Yes/no fixed supply.\"}},\"isSemiPublic()\":{\"returns\":{\"_0\":\"bool Yes/no semi public.\"}},\"issuerAddress()\":{\"returns\":{\"_0\":\"address Address of Issuer.\"}},\"marketplaceAddress()\":{\"returns\":{\"_0\":\"address Address of Marketplace.\"}},\"setGroup(string)\":{\"params\":{\"newGroup\":\"is the slug for the new group for this FAST.\"}},\"setIsSemiPublic(bool)\":{\"params\":{\"flag\":\"Set the semi public flag to true/false.\"}},\"setTransfersDisabled(bool)\":{\"params\":{\"flag\":\"Set the transfer capability to active or not.\"}},\"transfersDisabled()\":{\"returns\":{\"_0\":\"boolean `true` if transfers are disabled, `false` if transfers are enabled.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Burnt(uint256,string,address)\":{\"notice\":\"Emited whenever an burning happens in a FAST.\"},\"CrowdfundDeployed(address)\":{\"notice\":\"Crowdfund related events.\"},\"DetailsChanged(bool,uint32,uint256,uint256,uint256,uint256)\":{\"notice\":\"This is an event that is fired whenever any of some of the FAST parameters change, so that the frontend can react to it and refresh the general header for that fast as well as the baseball cards in the FASTs list.\"},\"Disapproval(address,address,uint256)\":{\"notice\":\"See `ERC20.Disapproval`.\"},\"DistributionDeployed(address)\":{\"notice\":\"Distribution related events.\"},\"FastTransfer(address,address,address,uint256,string)\":{\"notice\":\"As we augmented the ERC20 standard with a few concepts, we emit our custom events in addition to the ERC20 ones.\"},\"Minted(uint256,string,address)\":{\"notice\":\"Emited whenever an issuance happens in a FAST.\"}},\"kind\":\"user\",\"methods\":{\"group()\":{\"notice\":\"Retrieves the group slug to which this FAST belongs.\"},\"hasFixedSupply()\":{\"notice\":\"Is this FAST a fixed supply FAST?\"},\"isSemiPublic()\":{\"notice\":\"Is this FAST a semi public FAST?\"},\"issuerAddress()\":{\"notice\":\"Get the Issuer address.\"},\"marketplaceAddress()\":{\"notice\":\"Get the Marketplace address.\"},\"setGroup(string)\":{\"notice\":\"Assigns the FAST into a group given its slug. It should only be callable by the Issuer contract.\"},\"setIsSemiPublic(bool)\":{\"notice\":\"Allows to switch from a private scheme to a semi-public scheme, but not the other way around, unless the total supply is zero.\"},\"setTransfersDisabled(bool)\":{\"notice\":\"Allows an issuer member to enable or disable all transfers within this FAST.\"},\"transfersDisabled()\":{\"notice\":\"Are transfers enabled across this FAST?\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/fast/FastTopFacet.sol\":\"FastTopFacet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@opengsn/contracts/src/forwarder/IForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"@openzeppelin/contracts/interfaces/IERC165.sol\\\";\\n\\n/**\\n * @title The Forwarder Interface\\n * @notice The contracts implementing this interface take a role of authorization, authentication and replay protection\\n * for contracts that choose to trust a `Forwarder`, instead of relying on a mechanism built into the Ethereum protocol.\\n *\\n * @notice if the `Forwarder` contract decides that an incoming `ForwardRequest` is valid, it must append 20 bytes that\\n * represent the caller to the `data` field of the request and send this new data to the target address (the `to` field)\\n *\\n * :warning: **Warning** :warning: The Forwarder can have a full control over a `Recipient` contract.\\n * Any vulnerability in a `Forwarder` implementation can make all of its `Recipient` contracts susceptible!\\n * Recipient contracts should only trust forwarders that passed through security audit,\\n * otherwise they are susceptible to identity theft.\\n */\\ninterface IForwarder is IERC165 {\\n\\n /**\\n * @notice A representation of a request for a `Forwarder` to send `data` on behalf of a `from` to a target (`to`).\\n */\\n struct ForwardRequest {\\n address from;\\n address to;\\n uint256 value;\\n uint256 gas;\\n uint256 nonce;\\n bytes data;\\n uint256 validUntilTime;\\n }\\n\\n event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue);\\n\\n event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr);\\n\\n /**\\n * @param from The address of a sender.\\n * @return The nonce for this address.\\n */\\n function getNonce(address from)\\n external view\\n returns(uint256);\\n\\n /**\\n * @notice Verify the transaction is valid and can be executed.\\n * Implementations must validate the signature and the nonce of the request are correct.\\n * Does not revert and returns successfully if the input is valid.\\n * Reverts if any validation has failed. For instance, if either signature or nonce are incorrect.\\n * Reverts if `domainSeparator` or `requestTypeHash` are not registered as well.\\n */\\n function verify(\\n ForwardRequest calldata forwardRequest,\\n bytes32 domainSeparator,\\n bytes32 requestTypeHash,\\n bytes calldata suffixData,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * @notice Executes a transaction specified by the `ForwardRequest`.\\n * The transaction is first verified and then executed.\\n * The success flag and returned bytes array of the `CALL` are returned as-is.\\n *\\n * This method would revert only in case of a verification error.\\n *\\n * All the target errors are reported using the returned success flag and returned bytes array.\\n *\\n * @param forwardRequest All requested transaction parameters.\\n * @param domainSeparator The domain used when signing this request.\\n * @param requestTypeHash The request type used when signing this request.\\n * @param suffixData The ABI-encoded extension data for the current `RequestType` used when signing this request.\\n * @param signature The client signature to be validated.\\n *\\n * @return success The success flag of the underlying `CALL` to the target address.\\n * @return ret The byte array returned by the underlying `CALL` to the target address.\\n */\\n function execute(\\n ForwardRequest calldata forwardRequest,\\n bytes32 domainSeparator,\\n bytes32 requestTypeHash,\\n bytes calldata suffixData,\\n bytes calldata signature\\n )\\n external payable\\n returns (bool success, bytes memory ret);\\n\\n /**\\n * @notice Register a new Request typehash.\\n *\\n * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712.\\n *\\n * @param typeName The name of the request type.\\n * @param typeSuffix Any extra data after the generic params. Must contain add at least one param.\\n * The generic ForwardRequest type is always registered by the constructor.\\n */\\n function registerRequestType(string calldata typeName, string calldata typeSuffix) external;\\n\\n /**\\n * @notice Register a new domain separator.\\n *\\n * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712.\\n *\\n * @notice The domain separator must have the following fields: `name`, `version`, `chainId`, `verifyingContract`.\\n * The `chainId` is the current network's `chainId`, and the `verifyingContract` is this Forwarder's address.\\n * This method accepts the domain name and version to create and register the domain separator value.\\n * @param name The domain's display name.\\n * @param version The domain/protocol version.\\n */\\n function registerDomainSeparator(string calldata name, string calldata version) external;\\n}\\n\",\"keccak256\":\"0x28669953bd3dcc98a5f959fa3cac97444584b6fbe59341681b9a59f11a83b171\",\"license\":\"GPL-3.0-only\"},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0xd04b0f06e0666f29cf7cccc82894de541e19bb30a765b107b1e40bb7fe5f7d7a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"contracts/common/AHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/LibHasAutomatons.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasAutomatons {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n error RequiresAutomatonsManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when an automaton is added or changed.\\n * @param automaton is the address of the automaton.\\n * @param privileges is the new bitfield assigned to this automaton.\\n */\\n event AutomatonPrivilegesSet(address indexed automaton, uint32 indexed privileges);\\n\\n /**\\n * @notice Emited when an automaton is removed.\\n * @param automaton is the address of the removed automaton.\\n */\\n event AutomatonRemoved(address indexed automaton);\\n\\n // Must be overriden.\\n function isAutomatonsManager(address who) internal view virtual returns (bool);\\n\\n // May be overriden.\\n function onAutomatonAdded(address member) internal virtual {}\\n\\n // May be overriden.\\n function onAutomatonRemoved(address member) internal virtual {}\\n\\n /// Automatons management.\\n\\n /**\\n * @notice Queries whether a given address is an automaton for this Fast or not.\\n * @param candidate is the address to test.\\n * @return A `boolean` flag.\\n */\\n function isAutomaton(address candidate) external view returns (bool) {\\n return LibHasAutomatons.data().automatonSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Returns the privileges for a given automaton address, or zero if no privileges exist.\\n * @param automaton is the address to test.\\n * @return An `uint256` bitfield.\\n */\\n function automatonPrivileges(address automaton) external view returns (uint32) {\\n return LibHasAutomatons.data().automatonPrivileges[automaton];\\n }\\n\\n function automatonCan(address automaton, uint32 privilege) external view returns (bool) {\\n return (LibHasAutomatons.data().automatonPrivileges[automaton] & privilege) != 0;\\n }\\n\\n /**\\n * @notice Counts the numbers of automatons present in this Fast.\\n * @return The number of automatons in this marketplace.\\n */\\n function automatonCount() external view returns (uint256) {\\n return LibHasAutomatons.data().automatonSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the automatons of this Fast based on a starting cursor and a number of records per page.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateAutomatons(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasAutomatons.data().automatonSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Sets privileges for a given automaton address.\\n * @param candidate is the automaton address to which the privileges should be assigned.\\n * @param privileges is a bitfield of privileges to apply.\\n */\\n function setAutomatonPrivileges(address candidate, uint32 privileges) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.add(candidate, true);\\n ds.automatonPrivileges[candidate] = privileges;\\n emit AutomatonPrivilegesSet(candidate, privileges);\\n }\\n\\n /**\\n * @notice Removes an automaton completely.\\n * @param candidate is the automaton to remove.\\n */\\n function removeAutomaton(address candidate) external onlyAutomatonManager(msg.sender) {\\n LibHasAutomatons.Data storage ds = LibHasAutomatons.data();\\n ds.automatonSet.remove(candidate, false);\\n delete ds.automatonPrivileges[candidate];\\n emit AutomatonRemoved(candidate);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyAutomatonManager(address who) {\\n if (!isAutomatonsManager(who)) revert RequiresAutomatonsManager(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x32b378bdd83c63676854bbc408fbeea2471ba3821c888ec8703a963cbf5b4030\",\"license\":\"MIT\"},\"contracts/common/AHasContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// import \\\"hardhat/console.sol\\\";\\n\\n/**\\n * @title The Context behaviour abstract contract.\\n * @notice The AHasContext abstract contract is in charge of adding the required\\n * base implementation of ERC-2771 - see: https://eips.ethereum.org/EIPS/eip-2771\\n * the key difference is that `isTrustedForwarder` becomes an internal method.\\n */\\nabstract contract AHasContext {\\n /// @dev Must be implemented by the inheriting contract.\\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool);\\n\\n // The following is copied from:\\n // https://github.com/opengsn/gsn/blob/v3.0.0-beta.10/packages/contracts/src/ERC2771Recipient.sol\\n // With a slight change to call `_isTrustedForwarder` instead of `isTrustedForwarder`.\\n\\n /// @notice Default implemention.\\n function _msgSender() internal view virtual returns (address ret) {\\n // console.log(\\\"msg.sender\\\", msg.sender);\\n // console.log(\\\"msg.data\\\", msg.data);\\n if (msg.data.length >= 20 && _isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n // console.log(\\\"ret \\\", ret);\\n return ret;\\n }\\n\\n /// @notice Default implemention.\\n function _msgData() internal view virtual returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && _isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length - 20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7d7e74084b45b6230202e359843f9c0e7797308f3d0ddfce5cd4a5a8003853a\",\"license\":\"MIT\"},\"contracts/common/AHasForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/LibHasForwarder.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IERC165.sol\\\"; // Interface Support.\\n\\nimport \\\"@opengsn/contracts/src/forwarder/IForwarder.sol\\\";\\n\\n/**\\n * @title The Forwarder behaviour abstract contract.\\n * @notice The AHasForwarder abstract contract is in charge of adding the Forwarder\\n * functionality to any contract inheriting from it.\\n */\\nabstract contract AHasForwarder {\\n /// Errors.\\n\\n /**\\n * @notice Happens when a function is called by a non forwarder manager.\\n * @param who is the address that called the function.\\n */\\n error RequiresForwarderManager(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a forwarder is set on an implementing contract.\\n * @param forwarderAddress is the address of the trusted forwarder.\\n */\\n event ForwarderChanged(address forwarderAddress);\\n\\n // SEE: https://github.com/opengsn/gsn/blob/v3.0.0-beta.10/packages/contracts/src/ERC2771Recipient.sol\\n\\n /**\\n * @notice ERC2771Recipient implementation.\\n * @param _forwarderAddress the forwarder address.\\n * @return bool if the forwarder is trusted.\\n */\\n function isTrustedForwarder(address _forwarderAddress) public view returns (bool) {\\n return _forwarderAddress == LibHasForwarder.data().forwarderAddress;\\n }\\n\\n /**\\n * @notice ERC2771Recipient implementation.\\n * @param _forwarderAddress the forwarder address.\\n */\\n function setTrustedForwarder(address _forwarderAddress) external onlyForwarderManager {\\n if (!IERC165(_forwarderAddress).supportsInterface(type(IForwarder).interfaceId))\\n revert ICustomErrors.InterfaceNotSupported(\\\"IForwarder\\\");\\n\\n LibHasForwarder.Data storage ds = LibHasForwarder.data();\\n ds.forwarderAddress = _forwarderAddress;\\n\\n emit ForwarderChanged(_forwarderAddress);\\n }\\n\\n /**\\n * WARNING: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder.\\n * @notice Method is not a required method to allow Recipients to trust multiple Forwarders. Not recommended yet.\\n * @return forwarderAddress The address of the Forwarder contract that is being used.\\n */\\n function getTrustedForwarder() public view virtual returns (address forwarderAddress) {\\n return LibHasForwarder.data().forwarderAddress;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a forwarder manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidForwarderManager(address who) internal view virtual returns (bool);\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the forwarder manager.\\n modifier onlyForwarderManager() virtual {\\n if (!isValidForwarderManager(msg.sender)) revert RequiresForwarderManager(msg.sender);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x96bdf4d90ba871d0b6cdc3c4217d02b41e0ef9f71d8fb5579d382cbe75dc71aa\",\"license\":\"MIT\"},\"contracts/common/AHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasGovernors.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Governors abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasGovernors {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a governors manager.\\n error RequiresGovernorsManager(address who);\\n /// @notice Happens when an address is used as a governor but is not valid.\\n error RequiresValidGovernor(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a governor is added to the implementing contract.\\n * @param governor is the address of the added governor.\\n */\\n event GovernorAdded(address indexed governor);\\n /**\\n * @notice Emited when a governor is removed to the implementing contract.\\n * @param governor is the address of the removed member.\\n */\\n event GovernorRemoved(address indexed governor);\\n\\n /**\\n * @notice Default implementation - points to `_msgSender()`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the caller is a governor manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isGovernorsManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a governor or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidGovernor(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a governor is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was added.\\n */\\n function onGovernorAdded(address governor) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a governor is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param governor is the address which was removed.\\n */\\n function onGovernorRemoved(address governor) internal virtual {}\\n\\n // Governors management.\\n\\n /**\\n * @notice Queries whether a given address is a governor or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a governor.\\n */\\n function isGovernor(address who) external view returns (bool) {\\n return LibHasGovernors.data().governorSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of governors.\\n * @return An `uint256`.\\n */\\n function governorCount() external view returns (uint256) {\\n return LibHasGovernors.data().governorSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of governors based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateGovernors(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasGovernors.data().governorSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a governor to the list of known governors.\\n * @param who is the address to be added.\\n */\\n function addGovernor(address who) external onlyGovernorManager(_msgSender()) onlyValidGovernor(who) {\\n // Add the governor.\\n LibHasGovernors.data().governorSet.add(who, false);\\n // Notify via callback.\\n onGovernorAdded(who);\\n // Emit!\\n emit GovernorAdded(who);\\n }\\n\\n /**\\n * @notice Removes a governor from this contract.\\n * @param governor The address of the governor to be removed.\\n * @notice Requires that the caller is a governor of this Issuer.\\n * @notice Emits a `AHasGovernors.GovernorRemoved` event.\\n */\\n function removeGovernor(address governor) external onlyGovernorManager(_msgSender()) {\\n // Notify via callback.\\n onGovernorRemoved(governor);\\n // Remove governor.\\n LibHasGovernors.data().governorSet.remove(governor, false);\\n // Emit!\\n emit GovernorRemoved(governor);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyGovernorManager(address who) {\\n if (!isGovernorsManager(who)) revert RequiresGovernorsManager(who);\\n _;\\n }\\n\\n modifier onlyValidGovernor(address who) {\\n if (!isValidGovernor(who)) revert RequiresValidGovernor(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xd1f8fc31da0062248ab8f238b67e499ee0004232415aceaa8f4f4600fee16706\",\"license\":\"MIT\"},\"contracts/common/AHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./lib/LibHasMembers.sol\\\";\\n\\n/**\\n * @title The Members behaviour abstract contract.\\n * @notice The Fast Members abstract contract is in charge of keeping track of automaton accounts.\\n */\\nabstract contract AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Errors.\\n\\n /// @notice Happens when a function is called by an address that is not a members manager.\\n error RequiresMembersManager(address who);\\n /// @notice Happens when an address is used as a member but is not valid.\\n error RequiresValidMember(address who);\\n\\n /// Events.\\n\\n /**\\n * @notice Emited when a member is added to the implementing contract.\\n * @param member is the address of the added member.\\n */\\n event MemberAdded(address indexed member);\\n /**\\n * @notice Emited when a member is removed to the implementing contract.\\n * @param member is the address of the removed member.\\n */\\n event MemberRemoved(address indexed member);\\n\\n /**\\n * @notice Default implementation - points to `msg.sender`.\\n * @dev May be overriden by the inheriting contract.\\n */\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n /**\\n * @notice Checks whether the given address is a members manager or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isMembersManager(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice Checks whether the given address can be added as a member or not.\\n * @dev Must be implemented by the inheriting contract.\\n * @param who is the address to test.\\n */\\n function isValidMember(address who) internal view virtual returns (bool);\\n\\n /**\\n * @notice This callback is called when a member is added to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was added.\\n */\\n function onMemberAdded(address member) internal virtual {}\\n\\n /**\\n * @notice This callback is called when a member is removed to the contract.\\n * @dev May be overriden by the inheriting contract.\\n * @param member is the address which was removed.\\n */\\n function onMemberRemoved(address member) internal virtual {}\\n\\n // Members management.\\n\\n /**\\n * @notice Queries whether a given address is a member or not.\\n * @param who is the address to test.\\n * @return A `bool` equal to `true` when `candidate` is a member.\\n */\\n function isMember(address who) external view returns (bool) {\\n return LibHasMembers.data().memberSet.contains(who);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function memberCount() external view returns (uint256) {\\n return LibHasMembers.data().memberSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of members based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateMembers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibHasMembers.data().memberSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Adds a member to the list of known members.\\n * @param who is the address to be added.\\n */\\n function addMember(address who) external onlyMemberManager(_msgSender()) onlyValidMember(who) {\\n // Add the member.\\n LibHasMembers.data().memberSet.add(who, false);\\n // Notify via callback.\\n onMemberAdded(who);\\n // Emit!\\n emit MemberAdded(who);\\n }\\n\\n /**\\n * @notice Removes a member from this contract.\\n * @param member The address of the member to be removed.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `AHasMembers.MemberRemoved` event.\\n */\\n function removeMember(address member) external onlyMemberManager(_msgSender()) {\\n // Notify via callback.\\n onMemberRemoved(member);\\n // Remove member.\\n LibHasMembers.data().memberSet.remove(member, false);\\n // Emit!\\n emit MemberRemoved(member);\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyMemberManager(address who) {\\n if (!isMembersManager(who)) revert RequiresMembersManager(who);\\n _;\\n }\\n\\n modifier onlyValidMember(address who) {\\n if (!isValidMember(who)) revert RequiresValidMember(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x92011882d076ba62aac90c181c8f374566ca5c683441570a7239fd89851e97ff\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasAutomatons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasAutomatons {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasAutomatons.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0x3dfe1f2f995ddddfe9572dcdd01e4fb472ed2fb10a125c3b0156e94d073b9183;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data automatonSet;\\n /// @notice This is where we store privileges for each of our automaton account.\\n mapping(address => uint32) automatonPrivileges;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fea753864796a68c0b1ef3137fcc43c3707a426e5f4ef37b35711ed77be34d3\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasForwarder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibHasForwarder {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasForwarder.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xa9930c2ffa1b605b0243ba36b3020146bcba5a29c05a711f5ca7c705a8e851ca;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we store the trusted forwarder address.\\n address forwarderAddress;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41d08f6cc69c5133d4b853803fab0c4b05f1f0d7c31331c4aa5b590b8dac0c9b\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasGovernors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasGovernors {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasGovernors.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xdac4df64cf6992e5f0fa766abc48a6698b638db4d8eeee68133c41fdd4862975;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data governorSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd9411857bd650e960901d07d793d9852fb1a4ee0a13007597f234138333c9d88\",\"license\":\"MIT\"},\"contracts/common/lib/LibHasMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibHasMembers {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is `keccak256('HasMembers.storage.Main')`.\\n bytes32 internal constant STORAGE_SLOT = 0xd56529bfa3ed57257eed4751494e1d0c0f212cfe38768380e006e3bee06ffb91;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we hold our automatons data.\\n LibAddressSet.Data memberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03ea8d9c47249e9456deba85130e859afd6eba800e330527bcb9bc3438adb6a4\",\"license\":\"MIT\"},\"contracts/fast/Crowdfund.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title The `Crowdfund` FAST contract.\\n * @notice This contract is used to manage a crowdfunding campaign.\\n */\\ncontract Crowdfund {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when an address is not a crowdfund pledger.\\n error UnknownPledger(address who);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n\\n /// @notice Happens when an address is not an issuer member.\\n error RequiresIssuerMemberCaller();\\n /// @notice Happens when an address is not a FAST member.\\n error RequiresFastMemberCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n /// @notice Happens when a parameter has to be a FAST governor.\\n error RequiresFastGovernorship(address who);\\n\\n /**\\n * @notice Emited whenever the internal phase of this crowdfund changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n\\n /**\\n * @notice Emited whenever a plege is made.\\n * @param pledger The address of the pledger.\\n * @param amount The amount of tokens pledged.\\n */\\n event Pledge(address indexed pledger, uint256 amount);\\n\\n /**\\n * @notice Emited when the crowdfunding is terminated.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n event Terminated(bool indexed success);\\n\\n /// @notice The different phases of the crowdfund.\\n enum Phase {\\n Setup,\\n Funding,\\n Success,\\n Failure\\n }\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice Who initially deployed this contract.\\n address owner;\\n /// @notice The issuer contract address.\\n address issuer;\\n /// @notice The FAST contract that this crowdfund is locked onto.\\n address fast;\\n /// @notice The beneficiary of the crowdfund.\\n address beneficiary;\\n /// @notice The fee expressed in basis points - eg ten thousandths.\\n uint32 basisPointsFee;\\n /// @notice The token contract address.\\n IERC20 token;\\n /// @notice An arbitrary reference string to keep track of.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 2;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the crowdfunding is at.\\n Phase public phase;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much was collected so far.\\n uint256 public collected;\\n\\n /// @notice The set of addresses that have pledged to this crowdfund.\\n LibAddressSet.Data internal pledgerSet;\\n /// @notice The mapping of pledgers to their pledged amounts.\\n mapping(address => uint256) public pledges;\\n /// @notice Mapping of pledgers to whether they have been refunded or not.\\n mapping(address => bool) public refunded;\\n\\n /**\\n * @notice The constructor for this contract.\\n * Note that the constructor places the contract into the setup phase.\\n * @param p The parameters to be passed to this contract's constructor.\\n */\\n constructor(Params memory p) {\\n // Store parameters.\\n params = p;\\n // Check that the owner is a FAST governor.\\n if (!isFastGovernor(params.owner)) revert RequiresFastGovernorship(params.owner);\\n // Check that the beneficiary is a member of the FAST contract.\\n else if (!isFastMember(params.beneficiary)) revert RequiresFastMembership(params.beneficiary);\\n // Invalid fee - superior than 100%.\\n else if (params.basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Keep creation block handy.\\n creationBlock = block.number;\\n }\\n\\n /// @dev Given a total and a fee in basis points, returns the fee amount rounded up.\\n function feeAmount() public view returns (uint256) {\\n return Math.mulDiv(collected, params.basisPointsFee, 10_000, Math.Rounding.Up);\\n }\\n\\n /**\\n * @notice Advances the campaign to the funding phase.\\n * Note that this method is only available during the setup phase.\\n */\\n function advanceToFunding(uint32 basisPointsFee) external onlyDuring(Phase.Setup) onlyIssuerMember {\\n // Make sure the fee doesn't exceed a hundred percent.\\n if (params.basisPointsFee != basisPointsFee) {\\n // Invalid fee.\\n if (basisPointsFee > 10_000) revert InconsistentParameter(\\\"basisPointsFee\\\");\\n // Set new overriden fee.\\n params.basisPointsFee = basisPointsFee;\\n }\\n emit Advance(phase = Phase.Funding);\\n }\\n\\n /**\\n * @notice Allows a pledger to pledge tokens to this crowdfund.\\n * Note that this method is only available during the funding phase.\\n * @param amount The amount of tokens to pledge.\\n */\\n function pledge(uint256 amount) public onlyDuring(Phase.Funding) onlyFastMember {\\n // Make sure the amount is non-zero.\\n if (amount == 0) revert InconsistentParameter(\\\"amount\\\");\\n // Make sure that the message sender gave us allowance for at least this amount.\\n uint256 allowance = params.token.allowance(msg.sender, address(this));\\n if (allowance < amount) revert InsufficientFunds(amount - allowance);\\n // Keep track of the pledger - don't throw if already present.\\n pledgerSet.add(msg.sender, true);\\n // Add the pledged amount to the existing pledge.\\n pledges[msg.sender] += amount;\\n // Update the collected amount.\\n collected += amount;\\n // Transfer the tokens to this contract.\\n if (!params.token.transferFrom(msg.sender, address(this), amount)) revert TokenContractError();\\n // Emit!\\n emit Pledge(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Queries the number of members.\\n * @return An `uint256`.\\n */\\n function pledgerCount() public view returns (uint256) {\\n return pledgerSet.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of pledgers based on a start index and a page size.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginatePledgers(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(pledgerSet.values, index, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to terminate the crowdfunding given a success flag.\\n * Note that this method is available during any phase and can be used as a panic\\n * button to terminate the crowdfunding prematurely.\\n * @param success Whether the crowdfunding was successful or not.\\n */\\n function terminate(bool success) public onlyIssuerMember {\\n // If the crowdfunding was successful...\\n if (success) {\\n // Transfer the fee to the issuer contract if there is one.\\n uint256 finalFee = feeAmount();\\n if (finalFee > 0)\\n if (!params.token.transfer(params.issuer, finalFee)) revert TokenContractError();\\n // Transfer the payout to the beneficiary.\\n uint256 payout = collected - finalFee;\\n // If there's a payout for the beneficiary, transfer it.\\n if (payout > 0)\\n if (!isFastMember(params.beneficiary))\\n // Make sure that the beneficiary is **still** a member of the FAST contract.\\n revert RequiresFastMembership(params.beneficiary);\\n // Attempt to transfer to the beneficiary.\\n else if (!params.token.transfer(params.beneficiary, payout)) revert TokenContractError();\\n }\\n // Advance to next phase.\\n emit Advance(phase = success ? Phase.Success : Phase.Failure);\\n }\\n\\n /**\\n * @notice Allows a pledger to be refunded if the crowdfunding failed.\\n * Note that this method is only available during the failure phase.\\n * @param pledger The address of the pledger to refund.\\n */\\n function refund(address pledger) public onlyDuring(Phase.Failure) {\\n // Make sure the pledger is in the set.\\n if (!pledgerSet.contains(pledger)) revert UnknownPledger(pledger);\\n // Pledger has already been refunded...\\n else if (refunded[pledger]) revert DuplicateEntry();\\n // Track that the pledger has been refunded.\\n refunded[pledger] = true;\\n // Transfer the tokens to the pledger.\\n if (!params.token.transfer(pledger, pledges[pledger])) revert TokenContractError();\\n }\\n\\n /// Frontend helper functions.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Crowdfund details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Crowdfund.Params params;\\n Crowdfund.Phase phase;\\n uint256 creationBlock;\\n uint256 collected;\\n uint256 feeAmount;\\n uint256 pledgerCount;\\n }\\n\\n /**\\n * @notice Gets detailed crowdfund information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n collected: collected,\\n feeAmount: feeAmount(),\\n pledgerCount: pledgerCount()\\n });\\n }\\n\\n /// Modifiers and ACL functions.\\n\\n /**\\n * @dev Checks whether the given address is a member of the FAST contract.\\n * @param who The address to check.\\n * @return A `bool` indicating whether the address is a member of the FAST contract.\\n */\\n function isFastMember(address who) internal view returns (bool) {\\n return AHasMembers(params.fast).isMember(who);\\n }\\n\\n function isFastGovernor(address who) internal view returns (bool) {\\n return AHasGovernors(params.fast).isGovernor(who);\\n }\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyIssuerMember() {\\n if (!AHasMembers(params.issuer).isMember(msg.sender)) revert RequiresIssuerMemberCaller();\\n _;\\n }\\n\\n modifier onlyFastMember() {\\n if (!isFastMember(msg.sender)) revert RequiresFastMemberCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xba08fe2063eca8944880c6539d04da19bfa0d68600e1b40ad807a024eccca8a6\",\"license\":\"MIT\"},\"contracts/fast/Distribution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The `Distribution` FAST contract.\\n * @notice This contract allows for dividends or proceeds to be distributted amongst\\n * a list of beneficiaries. It has a lifecycle that can be described based on the\\n * following steps (or phases):\\n * - Funding, during which the sum to be distributed has to be credited to this contract.\\n * - FeeSetup, during which the oracle will define the fee to be paid upon distribution.\\n * - BeneficiariesSetup, during which the oracle can setup the beneficiaries.\\n * - Withdrawal, during which each beneficiary can withdraw their proceeds.\\n * - Terminated, during which nothing is possible.\\n */\\ncontract Distribution {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// @notice Happens when a function requires an unmet phase.\\n error InvalidPhase();\\n /// @notice Happens when a duplicate entry is found.\\n error DuplicateEntry();\\n /// @notice Happens when inconsistent parametters are detected.\\n error InconsistentParameter(string param);\\n /// @notice Happens when a call to the ERC20 token contract fails.\\n error TokenContractError();\\n /// @notice Happens when there are insufficient funds somewhere.\\n error InsufficientFunds(uint256 amount);\\n /// @notice Happens when the distribution has been overfunded.\\n error Overfunded(uint256 amount);\\n /// @notice Happens when a beneficiary is not found.\\n error UnknownBeneficiary(address who);\\n\\n /// @notice Happens when a function must be called by the FAST contract.\\n error RequiresFastCaller();\\n /// @notice Happens when an address is not crowdfund manager.\\n error RequiresManagerCaller();\\n /// @notice Happens when a parameter has to be a FAST member.\\n error RequiresFastMembership(address who);\\n\\n /// @notice The possible phases in which the contract is in.\\n enum Phase {\\n Funding,\\n FeeSetup,\\n BeneficiariesSetup,\\n Withdrawal,\\n Terminated\\n }\\n\\n /**\\n * @notice Emited whenever the internal phase of this distribution changes.\\n * @param phase The new phase of this contract.\\n */\\n event Advance(Phase phase);\\n /**\\n * @notice Emited whenever a beneficiary is added to the distribution list.\\n * @param beneficiary is the address of the beneficiary who was added.\\n * @param amount is the amount in native target token that is owed to the beneficiary.\\n */\\n event BeneficiaryAdded(address indexed beneficiary, uint256 indexed amount);\\n /**\\n * @notice Emited whenever a beneficiary is removed from the distribution list.\\n * @param beneficiary is the address of the beneficiary who was removed.\\n */\\n event BeneficiaryRemoved(address indexed beneficiary);\\n /**\\n * @notice Emited whenever a beneficiary withdraws their owings.\\n * @param caller is the address who ordered the withdrawal.\\n * @param beneficiary is the address of the beneficiary who performed the withdrawal.\\n * @param amount is the amount that was withdrawn.\\n */\\n event Withdrawal(address indexed caller, address indexed beneficiary, uint256 amount);\\n\\n /// @notice Parameters to be passed to this contract's constructor.\\n struct Params {\\n /// @notice The distributor of the distribution - eg the address who ordered its deployment.\\n address distributor;\\n /// @notice The Issuer contract address.\\n address issuer;\\n /// @notice To which FAST this Distribution belongs\\n address fast;\\n /// @notice The target ERC20 address to be distributed to the beneficiaries.\\n IERC20 token;\\n /// @notice Block latching.\\n uint256 blockLatch;\\n /// @notice How much is meant to be distributed.\\n uint256 total;\\n /// @notice An arbitrary reference string.\\n string ref;\\n }\\n\\n /// @notice A version identifier for us to track what's deployed.\\n uint16 public constant VERSION = 4;\\n\\n /// @notice The initial params, as passed to the contract's constructor.\\n Params private params;\\n /// @notice The phase at which the distribution is at.\\n Phase public phase = Phase.Funding;\\n /// @notice When was the distribution created.\\n uint256 public creationBlock;\\n /// @notice How much the fee that will be distributed to `issuer` is.\\n uint256 public fee;\\n /// @notice How much is left for distribution.\\n uint256 public available;\\n\\n /// @notice The list of beneficiaries known to the system.\\n LibAddressSet.Data internal beneficiaries;\\n /// @notice How much was set asside for a particular beneficiary.\\n mapping(address => uint256) public owings;\\n /// @notice Whether or not a benificiary has withdrawn yet.\\n mapping(address => bool) public withdrawn;\\n\\n /**\\n * @notice Constructs a new `Distribution` contracts.\\n * @param p is a `Params` structure.\\n */\\n constructor(Params memory p) {\\n // If the distribution is latched in the future, throw.\\n if (p.blockLatch >= block.number) revert InconsistentParameter(\\\"blockLatch\\\");\\n // Store all parameters.\\n params = p;\\n available = p.total;\\n creationBlock = block.number;\\n }\\n\\n function advanceToFeeSetup() public onlyDuring(Phase.Funding) onlyFastCaller {\\n // Make sure that the current distribution has exactly the required amount locked.\\n uint256 balance = params.token.balanceOf(address(this));\\n if (balance != params.total) revert InconsistentParameter(\\\"balance\\\");\\n // Move to next phase.\\n emit Advance(phase = Phase.FeeSetup);\\n }\\n\\n /**\\n * @notice Sets the fee to be taken upon distribution. Only available during the\\n * `Phase.FeeSetup` phase, throws otherwise. This method automatically advances the\\n * phase to `Phase.BeneficiariesSetup`, so it can only be called once.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _fee is the amount that the `issuer` will receive.\\n */\\n function advanceToBeneficiariesSetup(uint256 _fee) external onlyDuring(Phase.FeeSetup) onlyManager {\\n fee = _fee;\\n available -= fee;\\n // Move to next phase.\\n emit Advance(phase = Phase.BeneficiariesSetup);\\n }\\n\\n /**\\n * @notice Advances the distribution to the `Phase.Withdrawal` phase.\\n * The distribution must be in the `Phase.BeneficiariesSetup` phase.\\n */\\n function advanceToWithdrawal() public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // If the distribution covers more than the sum of all proceeds, we want\\n // to prevent the distribution from advancing to the withdrawal phase.\\n if (available > 0) revert Overfunded(available);\\n // Transfer the fee to the issuer contract.\\n if (!params.token.transfer(params.issuer, fee)) revert TokenContractError();\\n // Move to next phase.\\n emit Advance(phase = Phase.Withdrawal);\\n }\\n\\n /**\\n * @notice Adds beneficiaries and amounts to the distribution list. Both `_beneficiaries`\\n * and `_amounts` arrays must be of the same size, or the method will revert.\\n * This method is only available during the `Phase.BeneficiariesSetup` phase.\\n * During execution, this method will make sure that the cumulated amounts for all\\n * beneficiaries doesn't exceed the `total` amount available for distribution, or it\\n * will simply throw.\\n * Note that adding the same beneficiary twice will throw.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of beneficiaries to add.\\n * @param _amounts is the list of amounts respective to each beneficiary.\\n */\\n function addBeneficiaries(\\n address[] calldata _beneficiaries,\\n uint256[] calldata _amounts\\n ) public onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Beneficiaries and amount sizes must match.\\n if (_beneficiaries.length != _amounts.length) revert InconsistentParameter(\\\"lengths\\\");\\n\\n // We will count how much is needed for all these beneficiaries.\\n uint256 needed = 0;\\n // For each of the passed beneficiaries...\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n // Memoize a few variables...\\n address beneficiary = _beneficiaries[i];\\n uint256 amount = _amounts[i];\\n // Make sure the beneficiary is a member of the FAST.\\n if (!AHasMembers(params.fast).isMember(beneficiary)) revert RequiresFastMembership(beneficiary);\\n\\n // Add the beneficiary to our set.\\n beneficiaries.add(beneficiary, false);\\n // Keep track of the amount this beneficiary is entitled to.\\n owings[beneficiary] = amount;\\n // Accumulate how much is needed for these beneficiaries.\\n needed += amount;\\n // Emit!\\n emit BeneficiaryAdded(beneficiary, amount);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Make sure that there's enough to pay everyone.\\n if (available < needed) revert InsufficientFunds(needed - available);\\n // Decrease the amount of available funds.\\n unchecked {\\n available -= needed;\\n }\\n }\\n\\n /**\\n * @notice Removes a list of beneficiaries from the distribution list.\\n * Note that removing a non-existent beneficiary will simply throw.\\n * During execution, this method will increase the amount available for\\n * distribution automatically.\\n * Note that only a manager (issuer or automaton with the correct privileges) can\\n * call this method.\\n * @param _beneficiaries is the list of addresses to remove.\\n */\\n function removeBeneficiaries(address[] calldata _beneficiaries) external onlyDuring(Phase.BeneficiariesSetup) onlyManager {\\n // Remove all specified beneficiaries.\\n for (uint256 i = 0; i < _beneficiaries.length; ) {\\n address beneficiary = _beneficiaries[i];\\n // Remove the beneficiary from our list.\\n beneficiaries.remove(beneficiary, false);\\n // Increase the amount available for distribution, as it won't go to this beneficiary.\\n available += owings[beneficiary];\\n // Set the beneficiary's balance to zero.\\n owings[beneficiary] = 0;\\n // Emit!\\n emit BeneficiaryRemoved(beneficiary);\\n // Next iteration.\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n *\\n * @notice Returns the number of beneficiaries added so far.\\n * @return The count.\\n */\\n function beneficiaryCount() public view returns (uint256) {\\n return beneficiaries.values.length;\\n }\\n\\n /**\\n * @notice Queries pages of beneficiaries based on a start index and a page size.\\n * Note that it is possible to query owings for each of these beneficiaries by\\n * utilizing the `owings` and `withdrawn` public function.\\n * @param index is the offset at which the pagination operation should start.\\n * @param perPage is how many items should be returned.\\n * @return A `(address[], uint256)` tuple, which first item is the list of addresses and the second item a cursor to the next page.\\n */\\n function paginateBeneficiaries(uint256 index, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(beneficiaries.values, index, perPage);\\n }\\n\\n /**\\n * @notice This function allows any beneficiary to withdraw what they are owed. This\\n * method can only be called during the `Phase.Withdrawal` phase.\\n * Note that this function is protected from reentrancy as it operates on the `token`\\n * methods.\\n */\\n function withdraw(address beneficiary) public onlyDuring(Phase.Withdrawal) {\\n if (!beneficiaries.contains(beneficiary)) revert UnknownBeneficiary(beneficiary);\\n else if (withdrawn[beneficiary]) revert DuplicateEntry();\\n // Memoize a few variables.\\n uint256 amount = owings[beneficiary];\\n // Make sure they can't do it again later... It is important\\n // to do this before any call to `token` to prevent reentrancy.\\n withdrawn[beneficiary] = true;\\n // Transfer to the beneficiary all of their ownings.\\n if (!params.token.transfer(beneficiary, amount)) revert TokenContractError();\\n // Emit!\\n emit Withdrawal(msg.sender, beneficiary, amount);\\n }\\n\\n /**\\n * @notice A panic function that can only be called by the distribution manager\\n * (either an issuer member or an automaton with the right privileges).\\n * Upon calling this method, the contract will simply send back any funds still\\n * available to it and set its internal state to a termination one.\\n * Note that since this method calls the `token` contract, it **must be\\n * protected against reentrancy**.\\n */\\n function terminate() public onlyManager exceptDuring(Phase.Terminated) {\\n // Reset internal variables so that it's clear that the contract is terminated.\\n // It is important to do this prior to any call to `token` methods to prevent\\n // re-entrancy attacks.\\n emit Advance(phase = Phase.Terminated);\\n available = 0;\\n // Move all funds to the distributor account.\\n params.token.transfer(params.distributor, params.token.balanceOf(address(this)));\\n }\\n\\n /// Frontend helpers.\\n\\n /**\\n * @dev Returns the parameter struct used to construct this contract.\\n * @return The parameter struct.\\n */\\n function paramsStruct() external view returns (Params memory) {\\n return params;\\n }\\n\\n /**\\n * @notice Distribution details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n address addr;\\n uint16 VERSION;\\n Distribution.Params params;\\n Distribution.Phase phase;\\n uint256 creationBlock;\\n uint256 fee;\\n uint256 available;\\n uint256 beneficiaryCount;\\n }\\n\\n /**\\n * @notice Gets detailed distribution information.\\n * @return See: `Details`.\\n */\\n function details() public view returns (Details memory) {\\n return\\n Details({\\n addr: address(this),\\n VERSION: VERSION,\\n params: params,\\n phase: phase,\\n creationBlock: creationBlock,\\n fee: fee,\\n available: available,\\n beneficiaryCount: beneficiaryCount()\\n });\\n }\\n\\n /// Modifiers.\\n\\n modifier onlyDuring(Phase _phase) {\\n if (_phase != phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier exceptDuring(Phase _phase) {\\n if (_phase == phase) revert InvalidPhase();\\n _;\\n }\\n\\n modifier onlyFastCaller() {\\n if (msg.sender != params.fast) revert RequiresFastCaller();\\n _;\\n }\\n\\n modifier onlyManager() {\\n if (\\n !AHasMembers(params.issuer).isMember(msg.sender) &&\\n !AHasAutomatons(params.fast).automatonCan(msg.sender, FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS)\\n ) revert RequiresManagerCaller();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0bcaee03eb96c223e2b978dd301308315c8fda5e65973288a22b7809ea288f1b\",\"license\":\"MIT\"},\"contracts/fast/FastAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasGovernors.sol\\\";\\nimport \\\"../marketplace/MarketplaceAccessFacet.sol\\\";\\nimport \\\"../issuer/IssuerAccessFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastAutomatonsFacet.sol\\\";\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The FAST Access facet is the source of truth when it comes to\\n * permissioning and ACLs within a given FAST.\\n */\\ncontract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers, AHasContext {\\n using LibAddressSet for LibAddressSet.Data;\\n /// Structs.\\n\\n /**\\n * @notice This structure isn't used anywhere in storage. Instead, it\\n * allows various methods of the contract to return all the flags\\n * associated with a given address in one go.\\n */\\n struct Flags {\\n /// @notice Whether or not the item in scope is considered a governor of this FAST.\\n bool isGovernor;\\n /// @notice Whether or not the item in scope is considered a member of this FAST.\\n bool isMember;\\n }\\n\\n /// AHasContext implementation.\\n\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n // Override base classes to use the AHasContext implementation.\\n function _msgSender() internal view override(AHasMembers, AHasGovernors, AHasContext) returns (address) {\\n return AHasContext._msgSender();\\n }\\n\\n /// AHasGovernors implementation.\\n\\n function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n\\n function isValidGovernor(address who) internal view override(AHasGovernors) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onGovernorAdded(address governor) internal override(AHasGovernors) {\\n // If the governor isn't a FAST member yet, add them.\\n if (!AHasMembers(this).isMember(governor)) AHasMembers(this).addMember(governor);\\n // Notify issuer that this governor was added to this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorAddedToFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onGovernorRemoved(address governor) internal override(AHasGovernors) {\\n // Notify issuer that this governor was removed from this FAST.\\n IssuerAccessFacet(LibFast.data().issuer).governorRemovedFromFast(governor);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return\\n // The current contract should be able to manage its own members.\\n address(this) == who ||\\n // Governors can manage members.\\n AHasGovernors(this).isGovernor(who) ||\\n // Automatons with the correct privilege can manage members.\\n AHasAutomatons(address(this)).automatonCan(who, FAST_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal view override(AHasMembers) returns (bool) {\\n return _isMarketplaceMember(who);\\n }\\n\\n function onMemberAdded(address member) internal override(AHasMembers) {\\n // Notify marketplace that this member was added to this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberAddedToFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n function onMemberRemoved(address member) internal override(AHasMembers) {\\n // Notify token facet that this member was removed.\\n FastTokenFacet(address(this)).beforeRemovingMember(member);\\n // Notify marketplace that this member was removed from this FAST.\\n MarketplaceAccessFacet(LibFast.data().marketplace).memberRemovedFromFast(member);\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /// Flags.\\n\\n /**\\n * @notice Retrieves flags for a given address.\\n * @param a is the address to retrieve flags for.\\n * @return A `Flags` struct.\\n */\\n function flags(address a) external view returns (Flags memory) {\\n return Flags({isGovernor: AHasGovernors(address(this)).isGovernor(a), isMember: AHasMembers(this).isMember(a)});\\n }\\n}\\n\",\"keccak256\":\"0x38f3f5446880829a09bc75190ab90612fd0e26ff215ddcfbff08fc862f334c00\",\"license\":\"MIT\"},\"contracts/fast/FastAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant FAST_PRIVILEGE_MANAGE_MEMBERS = 1;\\nuint32 constant FAST_PRIVILEGE_MANAGE_DISTRIBUTIONS = 2;\\n\\n/**\\n * @title The Fast Smart Contract.\\n * @notice The Fast Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract FastAutomatonsFacet is AFastFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0x59dfae35415bbcba6ab9a9f9ba70ef426c08d3685428c9d9070129c5412a2d51\",\"license\":\"MIT\"},\"contracts/fast/FastFrontendFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"./lib/LibFastDistributions.sol\\\";\\nimport \\\"./lib/LibFastCrowdfunds.sol\\\";\\n\\n/**\\n * @notice A facet dedicated to view / UI only methods. This facet should never hold any method that\\n * is not either `pure` or `view`, except to emit events.\\n */\\ncontract FastFrontendFacet is AFastFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Data structures.\\n\\n /**\\n * @notice This struct groups the common attributes of a FAST.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct Details {\\n /// @notice The `address` of the FAST.\\n address addr;\\n /// @notice The `name` of the FAST (ERC20).\\n string name;\\n /// @notice The `symbol` of the FAST (ERC20).\\n string symbol;\\n /// @notice The `decimals` of the FAST (ERC20).\\n uint8 decimals;\\n /// @notice The `totalSupply` of the FAST (ERC20).\\n uint256 totalSupply;\\n /// @notice Whether the FAST is semi public or not.\\n bool isSemiPublic;\\n /// @notice Whether the FAST has a fixed supply or continious.\\n bool hasFixedSupply;\\n /// @notice Whether the transfers are enabled or not for this FAST.\\n bool transfersDisabled;\\n /// @notice The default crowdfunds basis point fee.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n /// @notice The reserve balance.\\n uint256 reserveBalance;\\n /// @notice The number of members the FAST has.\\n uint256 memberCount;\\n /// @notice The number of governors for the FAST.\\n uint256 governorCount;\\n }\\n\\n /**\\n * @notice Member level details.\\n * @dev This struct shouldn't be used in internal storage.\\n */\\n struct PrivilegesDetails {\\n /// @notice The Member's address.\\n address addr;\\n /// @notice The Member's balance.\\n uint256 balance;\\n /// @notice The Member's ETH balance.\\n uint256 ethBalance;\\n /// @notice Whether or not the address is a Member.\\n bool isMember;\\n /// @notice Whether or not the address is a Governor.\\n bool isGovernor;\\n /// @notice Automaton flags assigned to this address.\\n uint32 automatonPrivileges;\\n }\\n\\n /// Emitters.\\n\\n /**\\n * @notice Called by diamond facets, signals that FAST details may have changed.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be another facet of the diamond.\\n * Emits `DetailsChanged`, see `IFastEvents.DetailsChanged`\\n */\\n function emitDetailsChanged() external onlyDiamondFacet {\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n emit DetailsChanged({\\n transfersDisabled: LibFast.data().transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n memberCount: LibHasMembers.data().memberSet.values.length,\\n governorCount: LibHasGovernors.data().governorSet.values.length,\\n totalSupply: tokenData.totalSupply,\\n reserveBalance: tokenData.balances[LibHelpers.ZERO_ADDRESS]\\n });\\n }\\n\\n /// Public functions.\\n\\n /**\\n * @notice Gets the details of a FAST.\\n * @return The details for the current FAST, see `Details`.\\n */\\n function details() public view returns (Details memory) {\\n LibFast.Data storage topStorage = LibFast.data();\\n LibFastToken.Data storage tokenStorage = LibFastToken.data();\\n return\\n Details({\\n addr: address(this),\\n name: tokenStorage.name,\\n symbol: tokenStorage.symbol,\\n decimals: tokenStorage.decimals,\\n totalSupply: tokenStorage.totalSupply,\\n isSemiPublic: topStorage.isSemiPublic,\\n hasFixedSupply: topStorage.hasFixedSupply,\\n transfersDisabled: topStorage.transfersDisabled,\\n crowdfundsDefaultBasisPointsFee: LibFastCrowdfunds.data().crowdfundsDefaultBasisPointsFee,\\n reserveBalance: tokenStorage.balances[LibHelpers.ZERO_ADDRESS],\\n memberCount: AHasMembers(address(this)).memberCount(),\\n governorCount: LibHasGovernors.data().governorSet.values.length\\n });\\n }\\n\\n /**\\n * @notice Gets detailed address privileges details.\\n * @param addr The address to get the privileges for.\\n * @return A FAST member's details, see `MemberDetails`.\\n */\\n function detailedPrivileges(address addr) public view returns (PrivilegesDetails memory) {\\n return\\n PrivilegesDetails({\\n addr: addr,\\n balance: LibFastToken.data().balances[addr],\\n ethBalance: (payable(addr).balance),\\n isMember: AHasMembers(address(this)).isMember(addr),\\n isGovernor: AHasGovernors(address(this)).isGovernor(addr),\\n automatonPrivileges: AHasAutomatons(address(this)).automatonPrivileges(addr)\\n });\\n }\\n\\n function paginateDetailedMembers(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n LibHasMembers.Data storage membersData = LibHasMembers.data();\\n (address[] memory members, uint256 nextCursor) = LibPaginate.addresses(membersData.memberSet.values, index, perPage);\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](members.length);\\n uint256 length = members.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(members[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedGovernors(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (PrivilegesDetails[] memory, uint256) {\\n (address[] memory governors, uint256 nextCursor) = LibPaginate.addresses(\\n LibHasGovernors.data().governorSet.values,\\n index,\\n perPage\\n );\\n PrivilegesDetails[] memory values = new PrivilegesDetails[](governors.length);\\n uint256 length = governors.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = detailedPrivileges(governors[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n function paginateDetailedDistributions(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Distribution.Details[] memory, uint256) {\\n (address[] memory distributions, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastDistributions.data().distributionSet.values,\\n index,\\n perPage\\n );\\n Distribution.Details[] memory values = new Distribution.Details[](distributions.length);\\n uint256 length = distributions.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Distribution(distributions[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n\\n /**\\n * @dev Paginates detailed crowdfunds.\\n * @param index The index of the first crowdfund to return.\\n * @param perPage The number of crowdfunds to return.\\n * @return An array of crowdfund details, see `CrowdfundDetails`.\\n */\\n function paginateDetailedCrowdfunds(\\n uint256 index,\\n uint256 perPage\\n ) external view returns (Crowdfund.Details[] memory, uint256) {\\n (address[] memory crowdfunds, uint256 nextCursor) = LibPaginate.addresses(\\n LibFastCrowdfunds.data().crowdfundSet.values,\\n index,\\n perPage\\n );\\n Crowdfund.Details[] memory values = new Crowdfund.Details[](crowdfunds.length);\\n uint256 length = crowdfunds.length;\\n for (uint256 i = 0; i < length; ) {\\n values[i] = Crowdfund(crowdfunds[i]).details();\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, nextCursor);\\n }\\n}\\n\",\"keccak256\":\"0xdf236a27eb3441e06a4d9aa972a1677f4aed718cb4028f13462bfc7c87670729\",\"license\":\"MIT\"},\"contracts/fast/FastHistoryFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastHistory.sol\\\";\\n\\n/**\\n * @notice Although past events could be scrapped from the chain, we want to\\n * the frontend to be capable of listing past transfers and minting / burning events.\\n * This facet is in charge of performing archival of these things.\\n */\\ncontract FastHistoryFacet is AFastFacet {\\n /// Minting history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are minted.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Mint` on top of the stack.\\n */\\n function minted(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the mint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Mint, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever new tokens are burnt.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Adds a supply proof item of type `LibFastHistory.SupplyOp.Burn` on top of the stack.\\n */\\n function burnt(uint256 amount, string calldata ref) external onlyDiamondFacet {\\n // Keep track of the unmint.\\n LibFastHistory.data().supplyProofs.push(\\n LibFastHistory.SupplyProof({op: LibFastHistory.SupplyOp.Burn, amount: amount, blockNumber: block.number, ref: ref})\\n );\\n }\\n\\n /**\\n * @notice Returns the number of supply proofs (minting and burning together) ever created.\\n * @return A `uint256`.\\n */\\n function supplyProofCount() external view returns (uint256) {\\n return LibFastHistory.data().supplyProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of supply proofs (minting and burning together).\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.SupplyProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateSupplyProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n return LibPaginate.supplyProofs(LibFastHistory.data().supplyProofs, cursor, perPage);\\n }\\n\\n /// Transfer history-keeping methods.\\n\\n /**\\n * @notice This method is a callback for other facets to signal whenever a transfer has completed successfuly.\\n *\\n * Business logic:\\n * - Requires that the caller must be another facet.\\n * - Keeps track of the operation in various tracking structures, so that it can be queried later by `sender` and `recipient`.\\n * - Pushes a transfer proof to the main transfer proof tracking stack.\\n */\\n function transfered(\\n address spender,\\n address from,\\n address to,\\n uint256 amount,\\n string calldata ref\\n ) external onlyDiamondFacet {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n // Keep track of the transfer proof ID for the sender and for the recipient.\\n s.transferProofInvolvements[from].push(s.transferProofs.length);\\n s.transferProofInvolvements[to].push(s.transferProofs.length);\\n // Keep track of the transfer proof globally.\\n s.transferProofs.push(\\n LibFastHistory.TransferProof({\\n spender: spender,\\n from: from,\\n to: to,\\n amount: amount,\\n blockNumber: block.number,\\n ref: ref\\n })\\n );\\n }\\n\\n /**\\n * @notice Returns the number of transfer proofs ever created.\\n * @return A `uint256`.\\n */\\n function transferProofCount() external view returns (uint256) {\\n return LibFastHistory.data().transferProofs.length;\\n }\\n\\n /**\\n * @notice Returns a page of transfer proofs.\\n * @param cursor is the zero-based index where to start fetching records.\\n * @param perPage is the number of items to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing a page of data and the cursor to the next page.\\n */\\n function paginateTransferProofs(\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n return LibPaginate.transferProofs(LibFastHistory.data().transferProofs, cursor, perPage);\\n }\\n\\n /**\\n * @notice Counts all past inbound and outbound transfers involving a given address.\\n * @param involvee is the address for which to get the transfer proofs.\\n */\\n function transferProofByInvolveeCount(address involvee) external view returns (uint256) {\\n return LibFastHistory.data().transferProofInvolvements[involvee].length;\\n }\\n\\n /**\\n * @notice Returns pages of indices of past inbound and outbound transfer proofs by involvee.\\n * @dev This function is reading from an indexing data structure. Each index points to a record\\n * in the main transfer proof storage, and can then be found in `transferProofs` at returned indices.\\n * @param involvee is the address for which to retrieve a page of data.\\n * @param cursor is where to start.\\n * @param perPage is how many records at most should be returned.\\n */\\n function paginateTransferProofIndicesByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (uint256[] memory, uint256) {\\n return LibPaginate.uint256s(LibFastHistory.data().transferProofInvolvements[involvee], cursor, perPage);\\n }\\n\\n /**\\n * @notice Returns a page of inbound and outbound transfer proofs based on an involvee.#\\n * @param involvee is the address for which to fetch the data.\\n * @param cursor is where to start.\\n * @param perPage is how many items at most to return.\\n * @return A `(LibFastHistory.TransferProof[], uint256)` tuple containing the results and the cursor to the next page.\\n */\\n function paginateTransferProofsByInvolvee(\\n address involvee,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n LibFastHistory.Data storage s = LibFastHistory.data();\\n uint256[] storage collection = s.transferProofInvolvements[involvee];\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = s.transferProofs[collection[cursor + i]];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0x6c517db2a7885a0991311827bb240e6003e1ceabe24f7d7fd245b3c0b0b5e08b\",\"license\":\"MIT\"},\"contracts/fast/FastTokenFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../lib/LibDiamond.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFastToken.sol\\\";\\nimport \\\"../marketplace/MarketplaceTokenHoldersFacet.sol\\\";\\nimport \\\"./FastTopFacet.sol\\\";\\nimport \\\"./FastAccessFacet.sol\\\";\\nimport \\\"./FastHistoryFacet.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\n\\ncontract FastTokenFacet is AFastFacet, IERC20 {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Constants.\\n\\n string internal constant DEAD_TOKENS_RETRIEVAL = \\\"Dead tokens retrieval\\\";\\n\\n /// Minting methods.\\n\\n /**\\n * @notice Mints an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that either the token has continuous supply, or that no tokens have been minted yet.\\n * - Increases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.minted`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Minted(amount, ref)` event.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function mint(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // We want to make sure that either of these two is true:\\n // - The token doesn't have fixed supply.\\n // - The token has fixed supply but has no tokens yet (First and only mint).\\n if (FastTopFacet(address(this)).hasFixedSupply() && (s.totalSupply != 0 || this.balanceOf(address(0)) != 0))\\n revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Prepare the minted amount on the zero address.\\n s.balances[address(0)] += amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).minted(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Minted(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Burns an amount of FAST tokens.\\n * A reference can be passed to identify why this happened for example.\\n *\\n * Business logic.\\n * - Modifiers:\\n * - Requires the caller to be a member of the Issuer contract.\\n * - Requires that the token has continuous supply.\\n * - Requires that there are enough funds in the reserve to cover for `amount` being burnt.\\n * - Decreases the reserve balance by `amount`.\\n * - Calls `FastHistoryFacet.burnt(amount, ref)`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Emits a `Burnt(amount, ref)`.\\n * @param amount The number of FAST tokens to mint.\\n * @param ref A reference for this minting operation.\\n */\\n function burn(uint256 amount, string calldata ref) external onlyIssuerMember {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n if (FastTopFacet(address(this)).hasFixedSupply()) revert ICustomErrors.RequiresContinuousSupply();\\n\\n // Remove the minted amount from the zero address.\\n s.balances[address(0)] -= amount;\\n\\n // Keep track of the minting operation.\\n FastHistoryFacet(address(this)).burnt(amount, ref);\\n\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n emit Burnt(amount, ref, msg.sender);\\n }\\n\\n /**\\n * @notice Allows an Issuer member to move an arbitrary account's holdings back to the reserve,\\n * as per regulatory requirements.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Requires that the caller is a member of the Issuer contract.\\n * - If the amount held by `holder` is not zero\\n * - The balance of `holder` should be set to zero.\\n * - The reserve's balance should be increased by how much was on the holder's account.\\n * - Total supply should be decreased by that amount too.\\n * - The `holder`'s address should not be tracked as a token holder in this FAST anymore.\\n * - The `holder`'s address should not be tracked as a token holder in the Marketplace anymore.\\n * - A `Transfer(holder, reserve, amount)` event should be emited.\\n * - If the amount previously held by `holder` was not zero,\\n * - Since the reserve balance and total supply have changed, the `FastFrontendFacet.emitDetailsChanged()` function should be called.\\n * @param holder is the address for which to move the tokens from.\\n */\\n function retrieveDeadTokens(address holder) external onlyIssuerMember {\\n // Cache how many tokens the holder has.\\n uint256 amount = balanceOf(holder);\\n // Note: The amount **can** be zero in this function.\\n\\n // Grab a pointer to the token storage.\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // These should only run if the amount is zero, as they result in a no-op.\\n if (amount > 0) {\\n // Set the holder balance to zero.\\n s.balances[holder] = 0;\\n // Increment the reserve's balance.\\n s.balances[address(0)] += amount;\\n // The tokens aren't in circulation anymore - decrease total supply.\\n s.totalSupply -= amount;\\n }\\n\\n // Since the holder's account is now empty, make sure to keep track of it both\\n // in this FAST and in the marketplace.\\n s.tokenHolders.remove(holder, true);\\n MarketplaceTokenHoldersFacet(LibFast.data().marketplace).fastBalanceChanged(holder, 0);\\n\\n // Keep track of this transfer in history facet.\\n FastHistoryFacet(address(this)).transfered(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n\\n // This operation can be seen as a regular transfer between holder and reserve. Emit.\\n emit FastTransfer(msg.sender, holder, address(0), amount, DEAD_TOKENS_RETRIEVAL);\\n emit IERC20.Transfer(holder, address(0), amount);\\n\\n // If amount wasn't zero, total supply and reserve balance have changed - emit.\\n if (amount > 0) FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n // ERC20 implementation and transfer related methods.\\n\\n /**\\n * @notice The name of this FAST (ERC20 standard).\\n * @return string Name of the FAST.\\n */\\n function name() external view returns (string memory) {\\n return LibFastToken.data().name;\\n }\\n\\n /**\\n * @notice The symbol of this FAST (ERC20 standard).\\n * @return string Symbol of the FAST.\\n */\\n function symbol() external view returns (string memory) {\\n return LibFastToken.data().symbol;\\n }\\n\\n /**\\n * @notice The `decimals` of this FAST (ERC20 standard).\\n * @return uint256 Number of decimals the FAST has.\\n */\\n function decimals() external view returns (uint256) {\\n return LibFastToken.data().decimals;\\n }\\n\\n /**\\n * @notice The total supply of the FAST (ERC20 standard).\\n * @return uint256 Total supply of the FAST.\\n */\\n function totalSupply() external view override(IERC20) returns (uint256) {\\n return LibFastToken.data().totalSupply;\\n }\\n\\n /**\\n * @notice The balance of the passed owner (ERC20 standard).\\n * @param owner The owners address to get the balance of.\\n * @return uint256 The current balance of this owner's account.\\n */\\n function balanceOf(address owner) public view override(IERC20) returns (uint256) {\\n return LibFastToken.data().balances[owner];\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`, and the `ref` will be defauted. */\\n function transfer(address to, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(\\n TransferArgs({\\n spender: msg.sender,\\n from: msg.sender,\\n to: to,\\n amount: amount,\\n ref: LibFastToken.DEFAULT_TRANSFER_REFERENCE\\n })\\n );\\n return true;\\n }\\n\\n /**\\n * @notice See `performTransfer`, the spender will be equal to the `owner`. */\\n function transferWithRef(address to, uint256 amount, string calldata ref) external returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: msg.sender, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view override(IERC20) returns (uint256) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // If the allowance being queried is owned by the reserve, and `spender` is\\n // an Issuer member, `spender` owns the full balance of `owner`. If they are\\n // not an Issuer member then their allowance is zero. Otherwise, the regular given\\n // allowance for `spender` over `owner` applies.\\n if (owner == address(0)) return AHasMembers(LibFast.data().issuer).isMember(spender) ? s.balances[owner] : 0;\\n else return s.allowances[owner][spender];\\n }\\n\\n /**\\n * @notice This method directly calls `performApproval`, setting its `from` paramter to the sender of\\n * the transaction.\\n * @param spender is the address to allow spending from the caller's wallet.\\n * @param amount is how much to **increase** the allowance.\\n */\\n function approve(address spender, uint256 amount) external override(IERC20) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performApproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice This method directly calls `performDisapproval`, setting its `from` parameter to the sender of\\n * the transaction.\\n * @param spender is the address to disallow spending from the caller's wallet.\\n * @param amount is how much to **decrease** the allowance.\\n */\\n function disapprove(address spender, uint256 amount) external onlyMember(msg.sender) returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performDisapproval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`, the `ref` will be defaulted.\\n function transferFrom(address from, address to, uint256 amount) external override(IERC20) returns (bool) {\\n transferFromWithRef(from, to, amount, LibFastToken.DEFAULT_TRANSFER_REFERENCE);\\n return true;\\n }\\n\\n /// @notice See `performTransfer`.\\n function transferFromWithRef(address from, address to, uint256 amount, string memory ref) public returns (bool) {\\n // Make sure the call is performed externally so that we can mock.\\n this.performTransfer(TransferArgs({spender: msg.sender, from: from, to: to, amount: amount, ref: ref}));\\n return true;\\n }\\n\\n // Allowances query operations.\\n\\n function givenAllowanceCount(address owner) external view returns (uint256) {\\n return LibFastToken.data().allowancesByOwner[owner].values.length;\\n }\\n\\n function paginateAllowancesByOwner(\\n address owner,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesByOwner[owner].values, index, perPage);\\n }\\n\\n function receivedAllowanceCount(address spender) external view returns (uint256) {\\n return LibFastToken.data().allowancesBySpender[spender].values.length;\\n }\\n\\n function paginateAllowancesBySpender(\\n address spender,\\n uint256 index,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibFastToken.data().allowancesBySpender[spender].values, index, perPage);\\n }\\n\\n // These functions would be internal / private if we weren't using the diamond pattern.\\n // Instead, they're `onlyDiamondFacet` - eg can only be called by facets of the current\\n // FAST.\\n\\n struct TransferArgs {\\n address spender;\\n address from;\\n address to;\\n uint256 amount;\\n string ref;\\n }\\n\\n /**\\n * @notice This is the internal method that gets called whenever a transfer is initiated. Both `transfer`,\\n * `transferWithRef`, and their variants internally call this function.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that transfers are enabled for this FAST.\\n * - Requires that `from` and `to` are different addresses.\\n * - Requires that `from` membership is active in the marketplace.\\n * - If `from` is not the reserve, requires that `from` is a valid token holder.\\n * - If `from` is the reserve, requires that the message sender is an issuer member.\\n * - Requires that `to` is a valid token holder.\\n * - Requires that the amount is a positive value.\\n * - If the transfer is an allowance - e.g. the `spender` is not the same as the `from` address,\\n * - The allowance given by the `from` address to the `spender` covers for the `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Decreases the allowance given by `from` to `spender`.\\n * - If the new allowance reaches zero,\\n * - Stop tracking the allowance in the allowance lookup tables for both spending and receiving directions.\\n * - Decreases the balance of the `owner` address.\\n * - Increases the balance of the `to` address by `amount`.\\n * - If we are **not** transfering **from** the reserve,\\n * - Requires that there are enough transfer credits to cover for `amount`.\\n * - Decreases the transfer credits by `amount`.\\n * - If the `to` address is the reserve,\\n * - Decreases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Else, if the `from` address is the reserve,\\n * - Increases the total supply by `amount`.\\n * - Calls `FastFrontendFacet.emitDetailsChanged`.\\n * - Calls `FastHistoryFacet.transfered`.\\n * - Emits a `Transfer(from, to, amount)` event.\\n */\\n function performTransfer(TransferArgs calldata p) external onlyDiamondFacet {\\n // TODO: Make this function return instead of raising errors.\\n\\n // Grab a pointer to our top-level storage.\\n LibFast.Data storage topData = LibFast.data();\\n\\n // Requires that transfers are enabled for this FAST.\\n if (FastTopFacet(address(this)).transfersDisabled()) revert ICustomErrors.RequiresTransfersEnabled();\\n // Requires that `from` and `to` are different addresses.\\n else if (p.from == p.to) revert ICustomErrors.RequiresDifferentSenderAndRecipient(p.from);\\n // Requires that allowance transfers from the reserve are performed by issuer members only.\\n else if (p.from == address(0) && !AHasMembers(topData.issuer).isMember(p.spender))\\n revert ICustomErrors.RequiresIssuerMembership(p.spender);\\n // Requires that the `from` address can hold tokens.\\n else if (!canHoldTokens(p.from)) revert ICustomErrors.RequiresValidTokenHolder(p.from);\\n // Requires that the `from` address marketplace membership is active if not the reserve.\\n else if (p.from != address(0) && !IHasActiveMembers(LibFast.data().marketplace).isActiveMember(p.from))\\n revert ICustomErrors.RequiresMarketplaceActiveMembership(p.from);\\n // Requires that the `to` address can hold tokens.\\n else if (!canHoldTokens(p.to)) revert ICustomErrors.RequiresValidTokenHolder(p.to);\\n\\n // For any non-zero amount, update balances and allowances, notify other contracts, etc.\\n if (p.amount != 0) {\\n // Grab a pointer to our token storage.\\n LibFastToken.Data storage tokenData = LibFastToken.data();\\n\\n // If this is an allowance transfer and if the `from` account is not the reserve...\\n if (p.spender != p.from && p.from != address(0)) {\\n // Decrease allowance.\\n uint256 newAllowance = tokenData.allowances[p.from][p.spender] -= p.amount;\\n // If the allowance reached zero, we want to remove that allowance from\\n // the various other places where we keep track of it.\\n if (newAllowance == 0) {\\n tokenData.allowancesByOwner[p.from].remove(p.spender, true);\\n tokenData.allowancesBySpender[p.spender].remove(p.from, true);\\n }\\n }\\n\\n // Keep track of the balances - `from` spends (decrease), `to` receives (increase).\\n uint256 fromBalance = (tokenData.balances[p.from] -= p.amount);\\n uint256 toBalance = (tokenData.balances[p.to] += p.amount);\\n\\n // Keep track of who has what FAST.\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.from, fromBalance);\\n MarketplaceTokenHoldersFacet(topData.marketplace).fastBalanceChanged(p.to, toBalance);\\n\\n // Keep track of who holds this token.\\n balanceChanged(p.from, fromBalance);\\n balanceChanged(p.to, toBalance);\\n\\n // If the funds are going to the reserve...\\n if (p.to == address(0)) {\\n // Decrease total supply.\\n tokenData.totalSupply -= p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n // If the funds are moving from the zero address...\\n else if (p.from == address(0)) {\\n // Increase total supply.\\n tokenData.totalSupply += p.amount;\\n // Emit a top-level details change event.\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n // Keep track of the transfer in the history facet.\\n FastHistoryFacet(address(this)).transfered(p.spender, p.from, p.to, p.amount, p.ref);\\n\\n // Emit!\\n emit FastTransfer(p.spender, p.from, p.to, p.amount, p.ref);\\n emit Transfer(p.from, p.to, p.amount);\\n }\\n\\n /**\\n * @notice Increases the allowance given by `from` to `spender` by `amount`.\\n * Note that this function should run and emit even if the amount passed is zero.\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - Requires that `onlyTokenHolder` passes for the `from` address.\\n * - Requires that the `amount` is positive number.\\n * - Increases the allowance given by `from` to `spender` by `amount`.\\n * - Update the allowance lookup tables in both directions.\\n * - Emits an `Approval(from, spender, amount)`.\\n * @param from is the wallet from which to give the allowance.\\n * @param spender is the receiver of the allowance.\\n * @param amount is how much to **increase** the current allowance by.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performApproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n // Allowance cannot be given over the reserve.\\n if (from == address(0)) revert ICustomErrors.UnsupportedOperation();\\n // Require that the `from` address can hold tokens.\\n else if (!canHoldTokens(from)) revert ICustomErrors.RequiresValidTokenHolder(from);\\n\\n if (amount > 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n // Note that we are not exactly following ERC20 here - we don't want to **set** the allowance to `amount`\\n // to mitigate a possible attack.\\n // See https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.gmr6zdg47087.\\n s.allowances[from][spender] += amount;\\n // Keep track of given and received allowances.\\n s.allowancesByOwner[from].add(spender, true);\\n s.allowancesBySpender[spender].add(from, true);\\n }\\n\\n // Emit!\\n emit IERC20.Approval(from, spender, amount);\\n }\\n\\n /**\\n * @notice Decreases allowance given by `from` to `spender` by `amount`.\\n *\\n * Business logic:\\n * - Modifiers:\\n * - Only facets of the current diamond should be able to call this.\\n * - The allowance given by `from` to `spender` is decreased by `amount`.\\n * - Whether the allowance reached zero, stop tracking it by owner and by spender.\\n * - Emit a `Disapproval(from, spender, amount)` event.\\n *\\n * Note: This function runs when amount is zero, and will emit.\\n */\\n function performDisapproval(address from, address spender, uint256 amount) external onlyDiamondFacet {\\n if (amount != 0) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove allowance.\\n s.allowances[from][spender] -= amount;\\n\\n // Whenever the allowance reaches zero, stop tracking it by owner and spender.\\n if (s.allowances[from][spender] == 0) {\\n s.allowancesByOwner[from].remove(spender, true);\\n s.allowancesBySpender[spender].remove(from, true);\\n }\\n }\\n\\n // Emit!\\n emit Disapproval(from, spender, amount);\\n }\\n\\n // WARNING: This method contains two loops. We know that this should never\\n // happen in solidity. However:\\n // - In the context of our private chain, gas is cheap.\\n // - It can only be called by a governor.\\n function beforeRemovingMember(address member) external onlyDiamondFacet {\\n if (balanceOf(member) != 0) revert ICustomErrors.RequiresPositiveBalance(member);\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // Remove all given allowances.\\n {\\n address[] storage gaData = s.allowancesByOwner[member].values;\\n while (gaData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address spender = gaData[0];\\n this.performDisapproval(member, spender, s.allowances[member][spender]);\\n }\\n }\\n\\n // Remove all received allowances.\\n {\\n address[] storage raData = s.allowancesBySpender[member].values;\\n while (raData.length > 0) {\\n // Make sure the call is performed externally so that we can mock.\\n address owner = raData[0];\\n this.performDisapproval(owner, member, s.allowances[owner][member]);\\n }\\n }\\n }\\n\\n function holders() external view returns (address[] memory) {\\n LibFastToken.Data storage s = LibFastToken.data();\\n return s.tokenHolders.values;\\n }\\n\\n function balanceChanged(address holder, uint256 balance) private {\\n // Return early if this is the zero address.\\n if (holder == address(0)) return;\\n\\n LibFastToken.Data storage s = LibFastToken.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.tokenHolders.contains(holder))\\n s.tokenHolders.add(holder, false);\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.tokenHolders.contains(holder)) s.tokenHolders.remove(holder, false);\\n }\\n\\n // Private and helper methods.\\n\\n /**\\n * @notice Ensures that the given address is a member of the current FAST or the Zero Address.\\n *\\n * Business logic:\\n * - If the candidate is the reserve, it is a valid token holder.\\n * - If the FAST is semi-public,\\n * - We require that candidate is a member of the Marketplace contract and is active in it.\\n * - Otherwise,\\n * - Require that the candidate is a member of the FAST.\\n * @param candidate The address to check.\\n * @return A boolean set to `true` if `candidate` can hold tokens, `false` otherwise.\\n */\\n function canHoldTokens(address candidate) private view returns (bool) {\\n // Zero address can hold tokens, in any cases.\\n if (candidate == address(0)) return true;\\n // If the FAST is semi public, any member of the marketplace can hold tokens.\\n else if (FastTopFacet(address(this)).isSemiPublic()) {\\n return AHasMembers(LibFast.data().marketplace).isMember(candidate);\\n }\\n // FAST is private, only members of the fast can hold tokens.\\n else {\\n return AHasMembers(address(this)).isMember(candidate);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7a4b4820614c5dd57658ecfe853ec6daed8c1f87e14f3dd81adc03cda9780ed7\",\"license\":\"MIT\"},\"contracts/fast/FastTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"./lib/AFastFacet.sol\\\";\\nimport \\\"./lib/LibFast.sol\\\";\\nimport \\\"./lib/IFastEvents.sol\\\";\\nimport \\\"./FastFrontendFacet.sol\\\";\\nimport \\\"./FastTokenFacet.sol\\\";\\n\\ncontract FastTopFacet is AFastFacet {\\n // Getters and setters for global flags.\\n\\n /**\\n * @notice Get the Issuer address.\\n * @return address Address of Issuer.\\n */\\n function issuerAddress() external view returns (address) {\\n return LibFast.data().issuer;\\n }\\n\\n /**\\n * @notice Get the Marketplace address.\\n * @return address Address of Marketplace.\\n */\\n function marketplaceAddress() external view returns (address) {\\n return LibFast.data().marketplace;\\n }\\n\\n /**\\n * @notice Is this FAST a semi public FAST?\\n * @return bool Yes/no semi public.\\n */\\n function isSemiPublic() external view returns (bool) {\\n return LibFast.data().isSemiPublic;\\n }\\n\\n /**\\n * @notice Is this FAST a fixed supply FAST?\\n * @return bool Yes/no fixed supply.\\n */\\n function hasFixedSupply() external view returns (bool) {\\n return LibFast.data().hasFixedSupply;\\n }\\n\\n /**\\n * @notice Are transfers enabled across this FAST?\\n * @return boolean `true` if transfers are disabled, `false` if transfers are enabled.\\n */\\n function transfersDisabled() external view returns (bool) {\\n return LibFast.data().transfersDisabled;\\n }\\n\\n // Setters for global flags.\\n\\n /**\\n * @notice Allows to switch from a private scheme to a semi-public scheme,\\n * but not the other way around, unless the total supply is zero.\\n * @param flag Set the semi public flag to true/false.\\n */\\n function setIsSemiPublic(bool flag) external onlyIssuerMember {\\n // Someone is trying to toggle back to private?... No can do!\\n if (this.isSemiPublic() && FastTokenFacet(address(this)).totalSupply() != 0) {\\n revert ICustomErrors.UnsupportedOperation();\\n }\\n LibFast.data().isSemiPublic = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n\\n /**\\n * @notice Allows an issuer member to enable or disable all transfers within this FAST.\\n * @param flag Set the transfer capability to active or not.\\n */\\n function setTransfersDisabled(bool flag) external onlyIssuerMemberOrIssuerContract {\\n LibFast.Data storage d = LibFast.data();\\n // Only make changes and emit if the new flag is different than the old one.\\n if (d.transfersDisabled != flag) {\\n // Set flag.\\n d.transfersDisabled = flag;\\n // Emit!\\n FastFrontendFacet(address(this)).emitDetailsChanged();\\n }\\n }\\n\\n /**\\n * @notice Retrieves the group slug to which this FAST belongs.\\n * @return string The group slug string.\\n */\\n function group() external view returns (string memory) {\\n return LibFast.data().group;\\n }\\n\\n /**\\n * @notice Assigns the FAST into a group given its slug.\\n * It should only be callable by the Issuer contract.\\n * @param newGroup is the slug for the new group for this FAST.\\n */\\n function setGroup(string calldata newGroup) external onlyIssuerContract {\\n // Set group slug.\\n LibFast.data().group = newGroup;\\n }\\n}\\n\",\"keccak256\":\"0xc92847559953aa4130a76c0ddf63d9f9e90cf26351153fa691aea503210f7c8d\",\"license\":\"MIT\"},\"contracts/fast/lib/AFastFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\nimport \\\"../../common/AHasGovernors.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../common/AHasAutomatons.sol\\\";\\nimport \\\"../../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"../lib/LibFast.sol\\\";\\nimport \\\"./IFastEvents.sol\\\";\\n\\n/**\\n * @title Abstract FAST helper contract.\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AFastFacet is IFastEvents {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// Internal ACL functions.\\n\\n function _isMarketplaceMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().marketplace).isMember(who);\\n }\\n\\n function _isMarketplaceActiveMember(address who) internal view returns (bool) {\\n return IHasActiveMembers(LibFast.data().marketplace).isActiveMember(who);\\n }\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibFast.data().issuer).isMember(who);\\n }\\n\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the issuer contract.\\n modifier onlyIssuerContract() {\\n if (msg.sender != LibFast.data().issuer) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceMember(address who) {\\n if (!_isMarketplaceMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures a who is an active member of the Marketplace.\\n * @param who The address to check.\\n */\\n modifier onlyMarketplaceActiveMember(address who) {\\n if (!_isMarketplaceActiveMember(who)) revert ICustomErrors.RequiresMarketplaceActiveMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the message sender is a member of the Issuer.\\n */\\n modifier onlyIssuerMember() {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n modifier onlyIssuerMemberOrIssuerContract() {\\n if (!_isIssuerMember(msg.sender) && msg.sender != LibFast.data().issuer)\\n revert ICustomErrors.RequiresIssuerMemberOrIssuerCaller();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a governor of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyGovernor(address who) {\\n if (!AHasGovernors(address(this)).isGovernor(who)) revert ICustomErrors.RequiresFastGovernorship(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresFastMembership(who);\\n _;\\n }\\n\\n /**\\n * @notice Ensures address `a` and `b` are different.\\n * @param a Address a\\n * @param b Address b\\n */\\n modifier differentAddresses(address a, address b) {\\n if (a == b) revert ICustomErrors.RequiresDifferentSenderAndRecipient(a);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x71ae529ee7eb8055921ecf3080045b5e6286b90b2809301da1938e250793ee7d\",\"license\":\"MIT\"},\"contracts/fast/lib/IFastEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../fast/Distribution.sol\\\";\\nimport \\\"../../fast/Crowdfund.sol\\\";\\n\\n/**\\n * @title FAST events inventory.\\n * @notice An interface allowing to use events within the Diamond pattern without name colisions.\\n * @dev The idea is that as several facets can emit the same events, we don't want to have to re-declare\\n * the same event several time. This interface is a per-diamond central place for such event declaration.\\n */\\ninterface IFastEvents {\\n /// Issuance related events.\\n\\n /**\\n * @notice Emited whenever an issuance happens in a FAST.\\n * @param amount is the amount of tokens that have been minted.\\n * @param ref is the reference associated with the minting operation.\\n * @param who is the account from which the minting operation originated.\\n */\\n event Minted(uint256 indexed amount, string ref, address indexed who);\\n\\n /**\\n * @notice Emited whenever an burning happens in a FAST.\\n * @param amount is the amount of tokens that have been burnt.\\n * @param ref is the reference associated with the burning operation.\\n * @param who is the account from which the burning operation originated.\\n */\\n event Burnt(uint256 indexed amount, string ref, address indexed who);\\n\\n /// Transfer and ERC20 stuff.\\n\\n /// @notice See `ERC20.Disapproval`.\\n event Disapproval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @notice As we augmented the ERC20 standard with a few concepts, we emit our custom events\\n * in addition to the ERC20 ones.\\n * @param spender is the account who performed the transfer.\\n * @param from is the account from which the tokens will be debited from.\\n * @param to is the account to which the tokens will be credited to.\\n * @param value is the amount of tokens transfered.\\n * @param ref is the optional reference associated with the transfer.\\n */\\n event FastTransfer(address indexed spender, address indexed from, address indexed to, uint256 value, string ref);\\n\\n /// Distribution related events.\\n\\n event DistributionDeployed(Distribution indexed distribution);\\n event DistributionRemoved(Distribution indexed distribution);\\n\\n /// Crowdfund related events.\\n\\n event CrowdfundDeployed(Crowdfund indexed crowdfund);\\n event CrowdfundRemoved(Crowdfund indexed crowdfund);\\n event CrowdfundDefaultBasisPointFeeSet(uint32 indexed basisPointFee);\\n\\n /// General events.\\n\\n /**\\n * @notice This is an event that is fired whenever any of some of the FAST parameters\\n * change, so that the frontend can react to it and refresh the general header\\n * for that fast as well as the baseball cards in the FASTs list.\\n * @param transfersDisabled marks whether or not transfers are disabled by an issuer member at FAST level.\\n * @param memberCount is the number of members in the FAST.\\n * @param governorCount is the number of governors in the FAST.\\n * @param totalSupply is the amount of tokens in circulation in the FAST.\\n * @param reserveBalance is the balance of the zero-address (aka reserve) for the FAST.\\n */\\n event DetailsChanged(\\n bool transfersDisabled,\\n uint32 crowdfundsDefaultBasisPointsFee,\\n uint256 memberCount,\\n uint256 governorCount,\\n uint256 totalSupply,\\n uint256 reserveBalance\\n );\\n}\\n\",\"keccak256\":\"0x64ac3bc4aaa8ea06efef19407baed93a5e960c2b822e732517efc2c991e96795\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice Top-level shared functionality for FAST diamonds.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFast {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0x80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705;\\n\\n // Data structures.\\n\\n /**\\n * @notice The top-level data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n /// @notice The internal pointer to the Marketplace contract.\\n address marketplace;\\n /// @notice We have to track whether the token facet provides continuous minting or fixed supply.\\n bool hasFixedSupply;\\n /// @notice Whether or not this FAST requires to be a member to hold tokens.\\n bool isSemiPublic;\\n /// @notice A flag which when toggled to `true` disables all transfers across this FAST.\\n bool transfersDisabled;\\n /// @notice To which FAST group this FAST belongs to, if any.\\n string group;\\n }\\n\\n /**\\n * @notice Returns the top-level storage for the calling FAST.\\n * @return s a struct pointer for top-level FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d0e728e344cf6a93f7a75c2a19261dbae575878ac9830b496c9a225985f8de3\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastCrowdfunds.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastCrowdfunds {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 2;\\n /// @notice This is keccak256('Fast.storage.Crowdfunds'):\\n bytes32 internal constant STORAGE_SLOT = 0xc843fbb8f0f5694376d391c1687b800112a6eed97820d8e7a2b82618dd1b69ed;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed crowdfund contract is held here.\\n LibAddressSet.Data crowdfundSet;\\n /// @notice The default crowdfund fee for this FAST.\\n uint32 crowdfundsDefaultBasisPointsFee;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3f43bc03bbdd3d7d1e2dc957e060310ba97eea02ce64ac91082cc30c9e7c82b7\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastDistributions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibFastDistributions {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Distributions'):\\n bytes32 internal constant STORAGE_SLOT = 0xe865e85b076245a187a9d3cc15c47264cd0b46df4afd899817bd2e16523485ad;\\n\\n /**\\n * @notice The access data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice Every deployed distribution contract is held here.\\n LibAddressSet.Data distributionSet;\\n }\\n\\n /**\\n * @notice Returns the access storage for the calling FAST.\\n * @return s a struct pointer for access FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dbd277dde92dc23bd8fd81a005783e50903690b3acf4ca9e98f6dea3570426e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastHistory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with transfer\\n * history tracking.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastHistory {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.History'):\\n bytes32 internal constant STORAGE_SLOT = 0x6bc8b61a9dd5fc049ea98027492a801d74e35fdf4d80d7fecd551a16e88fdbb4;\\n\\n // Storage structures.\\n\\n /**\\n * @notice The history data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice All minting proofs are kept here.\\n SupplyProof[] supplyProofs;\\n /// @notice All transfer proofs are kept here.\\n TransferProof[] transferProofs;\\n /// @notice All transfers indices involving a given address are kept here.\\n mapping(address => uint256[]) transferProofInvolvements;\\n }\\n\\n // Other structures.\\n\\n /// @notice A minting operation could either be to mint or burn tokens.\\n enum SupplyOp {\\n Mint,\\n Burn\\n }\\n\\n /// @notice Minting operations are recorded for papertrail. This is the structure that keeps track of them.\\n struct SupplyProof {\\n /// @notice How...\\n SupplyOp op;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /// @notice Every transfer in is recorded. This is the structure that keeps track of them.\\n struct TransferProof {\\n /// @notice Who spent...\\n address spender;\\n /// @notice Who performed the transfer...\\n address from;\\n /// @notice Who received...\\n address to;\\n /// @notice How much...\\n uint256 amount;\\n /// @notice When...\\n uint256 blockNumber;\\n /// @notice Why...\\n string ref;\\n }\\n\\n /**\\n * @notice Returns the history storage for the calling FAST.\\n * @return s a struct pointer for history FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x21e2cb01ca5bc6109080cd9695296e4ae346a2936c8cae3b3c0b68cef9a90a5e\",\"license\":\"MIT\"},\"contracts/fast/lib/LibFastToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\n/**\\n * @notice This library centralises shared functionality between FAST diamonds facets that have to do with token related logic.\\n * @dev Note that if you feel like a method should be created inside this library, you might want to really consider\\n * whether or not it is the right place for it. Any facet using a method from internal libraries see their bytecode\\n * size increase, kind of defeating the benefits of using facets in the first place. So please keep it reasonable.\\n */\\nlibrary LibFastToken {\\n /// @notice The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n /// @notice This is keccak256('Fast.storage.Token'):\\n bytes32 internal constant STORAGE_SLOT = 0xb098747b87c5c0e2a32eb9b06725e9bad4263809bcda628ceadc1a686bcb8261;\\n\\n // Constants.\\n\\n string internal constant DEFAULT_TRANSFER_REFERENCE = \\\"Unspecified - via ERC20\\\";\\n\\n // Data structures.\\n\\n /**\\n * @notice The token data structure required for operating any given FAST diamond.\\n * @dev The `version` field is used to ensure that storage is at a known version during upgrades.\\n */\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // ERC20 related properties for this FAST Token.\\n /// @notice The name of the FAST.\\n string name;\\n /// @notice The symbol for this FAST.\\n string symbol;\\n /// @notice The decimal points used by this FAST.\\n uint8 decimals;\\n /// @notice The amount of tokens in circulation.\\n uint256 totalSupply;\\n /// @notice Legacy variable.\\n uint256 LEGACY_transferCredits;\\n /// @notice Our members balances are held here.\\n mapping(address => uint256) balances;\\n // Allowances are stored here.\\n /// @notice Allowance amounts are stored in here, via mapping of `owner.spender.amount`\\n mapping(address => mapping(address => uint256)) allowances;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by owner.\\n mapping(address => LibAddressSet.Data) allowancesByOwner;\\n /// @notice A reverse lookup table allowing to retrieve allowances given by spender.\\n mapping(address => LibAddressSet.Data) allowancesBySpender;\\n /// @notice All of this FAST token holders.\\n LibAddressSet.Data tokenHolders;\\n }\\n\\n /**\\n * @notice Returns the token storage for the calling FAST.\\n * @return s a struct pointer for token FAST data storage.\\n */\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf101b0347e095905f91f32ec41dcbe1dca1d8a84cc99664ca5254f21dcf3d8e9\",\"license\":\"MIT\"},\"contracts/interfaces/ICustomErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface ICustomErrors {\\n error AlreadyInitialized();\\n error CannotSelfRemove(address who);\\n error DuplicateEntry();\\n error InconsistentParameter(string param);\\n error InsufficientFunds(uint256 amount);\\n error InterfaceNotSupported(string);\\n error InternalMethod();\\n error InvalidCrowdfundBasisPointsFee(uint32 fee);\\n error InvalidPhase();\\n error NonExistentEntry();\\n error OutOfBounds();\\n error Overfunded(uint256 amount);\\n error ReentrancyError();\\n error RequiresAutomatonsManager(address who);\\n error RequiresContinuousSupply();\\n error RequiresDiamondOwnership(address who);\\n error RequiresDifferentSenderAndRecipient(address a);\\n error RequiresFastCaller();\\n error RequiresFastContractCaller();\\n error RequiresFastGovernorship(address who);\\n error RequiresFastMemberCaller();\\n error RequiresFastMembership(address who);\\n error RequiresGovernorsManager(address who);\\n error RequiresIssuerMemberCaller();\\n error RequiresIssuerMemberOrIssuerCaller();\\n error RequiresIssuerMembership(address who);\\n error RequiresManagerCaller();\\n error RequiresMarketplaceActiveMembership(address who);\\n error RequiresMarketplaceDeactivatedMember(address who);\\n error RequiresMarketplaceMembership(address who);\\n error RequiresMembersManager(address who);\\n error RequiresNoFastMemberships(address who);\\n error RequiresOwner(address who);\\n error RequiresPositiveBalance(address holder);\\n error RequiresTransfersEnabled();\\n error RequiresValidGovernor(address who);\\n error RequiresValidMember(address who);\\n error RequiresValidTokenHolder(address who);\\n error TokenContractError();\\n error UnknownBeneficiary(address who);\\n error UnknownPledger(address who);\\n error UnsupportedOperation();\\n}\\n\",\"keccak256\":\"0xd6da7364331de0a387574a44c5a4e7555b63cfe4baaca4dfef42c5d2345f0683\",\"license\":\"MIT\"},\"contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n/// @title A facet providing diamond cut mechanisms.\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a method with `delegatecall`.\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xf548f40da69f2c54f4e03f92dc31094f6825669314b87266cce22e0a8f1a4c47\",\"license\":\"MIT\"},\"contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// Directly import IERC165 from OpenZeppelin contracts.\\n// Solves an issue with 2 conflicting definitions of IERC165.\\nimport {IERC165} from \\\"@openzeppelin/contracts/interfaces/IERC165.sol\\\";\\n\",\"keccak256\":\"0x4d40fa89830d0f833aacefdbab507408a29b692e37990192c6b5e4ce581db830\",\"license\":\"MIT\"},\"contracts/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/**\\n * @title ERC173 Contract Ownership Standard\\n * @dev The ERC165 identifier for this interface is 0x7f5828d0.\\n */\\ninterface IERC173 {\\n /// @notice This emits when ownership of a contract changes.\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @notice Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x797855e7870ec3c9f32dda93166bd12dc19fec66cc9a8a7a58f03339a31439c0\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\",\"keccak256\":\"0x8af6e7ffd7a4cbae707b539d4271f8a3e36e373ea1470706fe368b7e6e6c33f7\",\"license\":\"MIT\"},\"contracts/interfaces/IHasActiveMembers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/// @title An interface signifying that the inheriting contract implements the concept of active memberships.\\ninterface IHasActiveMembers {\\n /**\\n * @notice Queries whether a given account is a member of the marketplace and flagged as active.\\n * @param member is the address to query.\\n * @return A `bool` set to `true` if the candidate is an active member.\\n */\\n function isActiveMember(address member) external view returns (bool);\\n\\n /**\\n * @notice Deactivates a given member address.\\n * @param member is the address to deactivate.\\n */\\n function deactivateMember(address member) external;\\n\\n /**\\n * @notice Activates a given member address.\\n * @param member is the address to activate.\\n */\\n function activateMember(address member) external;\\n}\\n\",\"keccak256\":\"0x0958282b7db89cef8026f5e57b870ed8bf4b0c59b197d44f3154261cc4eb6fd8\",\"license\":\"MIT\"},\"contracts/issuer/IssuerAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuerAccess.sol\\\";\\nimport \\\"./lib/IIssuerEvents.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\n\\ncontract IssuerAccessFacet is AIssuerFacet, AHasMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return AHasMembers(this).isMember(who);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n /// Membership management.\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor added to a FAST.\\n */\\n function governorAddedToFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].add(msg.sender, true);\\n\\n emit GovernorshipAdded(msg.sender, governor);\\n }\\n\\n /** @notice Callback from FAST contracts allowing the Issuer contract to keep track of governorships.\\n * @param governor The governor removed from a FAST.\\n */\\n function governorRemovedFromFast(address governor) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(address(this)).isFastRegistered(msg.sender)) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked governorship.\\n // TODO: We don't throw until we've fixed the `issuer.fastGovernorships`.\\n LibIssuerAccess.data().fastGovernorships[governor].remove(msg.sender, true);\\n\\n emit GovernorshipRemoved(msg.sender, governor);\\n }\\n\\n /** @notice Returns a list of FASTs that the passed address is a governor of.\\n * @param governor is the address to check governorships of.\\n * @param cursor is the index at which to start.\\n * @param perPage is how many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateGovernorships(\\n address governor,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuerAccess.data().fastGovernorships[governor].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0xb8eb9a8eb626f61ecc5627b927bdd81a97f38b05e621e903f77000e63a21b37c\",\"license\":\"MIT\"},\"contracts/issuer/IssuerTopFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../lib/LibHelpers.sol\\\";\\nimport \\\"../fast/FastTopFacet.sol\\\";\\nimport \\\"../fast/FastTokenFacet.sol\\\";\\nimport \\\"./lib/AIssuerFacet.sol\\\";\\nimport \\\"./lib/LibIssuer.sol\\\";\\n\\ncontract IssuerTopFacet is AIssuerFacet {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n // FAST management related methods.\\n\\n /**\\n * @notice Queries whether a given address is a known and registered FAST contract.\\n * @param fast The address of the contract to check.\\n * @return A boolean.\\n */\\n function isFastRegistered(address fast) external view returns (bool) {\\n return LibIssuer.data().fastSet.contains(fast);\\n }\\n\\n /**\\n * @notice Allows to retrieve the address of a FAST diamond given its symbol.\\n * @param symbol The symbol of the FAST diamond to get the address of.\\n * @return The address of the corresponding FAST diamond, or the Zero Address if not found.\\n */\\n function fastBySymbol(string calldata symbol) external view returns (address) {\\n return LibIssuer.data().fastSymbols[symbol];\\n }\\n\\n /**\\n * @notice Allows the registration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be registered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastRegistered` event.\\n */\\n function registerFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n if (s.fastSymbols[symbol] != address(0)) {\\n revert ICustomErrors.DuplicateEntry();\\n }\\n\\n // Add the FAST to our list.\\n s.fastSet.add(fast, false);\\n // Add the fast symbol to our list.\\n s.fastSymbols[symbol] = fast;\\n\\n // Emit!\\n emit FastRegistered(fast);\\n }\\n\\n /**\\n * @notice Allows the unregistration of a given FAST diamond with this Issuer.\\n * @param fast The address of the FAST diamond to be unregistered.\\n * @notice Requires that the caller is a member of this Issuer.\\n * @notice Emits a `FastUnregistered` event.\\n */\\n function unregisterFast(address fast) external onlyMember(msg.sender) {\\n LibIssuer.Data storage s = LibIssuer.data();\\n string memory symbol = FastTokenFacet(fast).symbol();\\n\\n // Disable transfers in the FAST.\\n FastTopFacet(fast).setTransfersDisabled(true);\\n\\n // Remove the FAST from our lists.\\n s.fastSet.remove(fast, false);\\n delete s.fastSymbols[symbol];\\n\\n // Emit!\\n emit FastUnregistered(fast);\\n }\\n\\n /**\\n * @notice Counts the number of FAST diamonds registered with this Issuer.\\n * @return The number of FAST diamonds registered with this Issuer.\\n */\\n function fastCount() external view returns (uint256) {\\n return LibIssuer.data().fastSet.values.length;\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a starting cursor and a number of records per page.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFasts(uint256 cursor, uint256 perPage) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastSet.values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Allows an issuer member to move collected ERC20 fees from this contract\\n * to an arbitrary address.\\n * @param token is the address of the ERC20 to be collected.\\n * @param amount is how much should be moved from the ERC20 to the collection address.\\n * @param to is the collection address - eg the address that will receive the ERC20 tokens.\\n */\\n function transferERC20Tokens(IERC20 token, uint256 amount, address to) public onlyMember(msg.sender) {\\n require(token.transfer(to, amount));\\n }\\n\\n /**\\n * @notice Allows to assign FASTs to groups.\\n * @param fast The FAST address to assign.\\n * @param newGroup The name of the group in which the FAST should be placed.\\n */\\n function setFastGroup(address fast, string calldata newGroup) external onlyMember(msg.sender) {\\n string memory oldGroup = FastTopFacet(fast).group();\\n // Remove FAST from old group.\\n if (bytes(oldGroup).length > 0) LibIssuer.data().fastGroups[oldGroup].remove(fast, false);\\n // Add FAST to new group.\\n if (bytes(newGroup).length > 0) LibIssuer.data().fastGroups[newGroup].add(fast, false);\\n // Set group name at FAST level.\\n FastTopFacet(fast).setGroup(newGroup);\\n // Emit!\\n emit FastGroupChanged(fast, oldGroup, newGroup);\\n }\\n\\n /**\\n * @notice Paginates the FAST diamonds registered with this Issuer based on a group, starting cursor and a number of records per page.\\n * @param group The group to paginate.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n * @return A `address[]` list of values at most `perPage` big.\\n * @return A `uint256` index to the next page.\\n */\\n function paginateFastsInGroup(\\n string calldata group,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibIssuer.data().fastGroups[group].values, cursor, perPage);\\n }\\n}\\n\",\"keccak256\":\"0x1f0e0e3a107552b4155e3fbc2f7cdba5d482e3de23b1abaff858f5cbaf1a70ec\",\"license\":\"MIT\"},\"contracts/issuer/lib/AIssuerFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"./IIssuerEvents.sol\\\";\\n\\n/**\\n * @notice This abstract contract encapsulates modifiers allowing inheriting facets to guard against\\n * certain permissions.\\n */\\nabstract contract AIssuerFacet is IIssuerEvents {\\n /// Modifiers.\\n\\n /// @notice Ensures that a method can only be called by another facet of the same diamond.\\n modifier onlyDiamondFacet() {\\n if (!LibHelpers._isDiamondFacet(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the owner of this diamond.\\n modifier onlyDiamondOwner() {\\n if (!LibHelpers._isDiamondOwner(msg.sender)) revert ICustomErrors.RequiresDiamondOwnership(msg.sender);\\n _;\\n }\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Ensures that the given address is a member of the FAST.\\n * @param who The address to check.\\n */\\n modifier onlyMember(address who) {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresIssuerMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x4ab53f3e2ce4e78f13c93f46c10c581c0b5ebc520979191d6092d2d7f7aa733c\",\"license\":\"MIT\"},\"contracts/issuer/lib/IIssuerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n// WARNING: These events must be maintained 1:1 with LibIssuerEvents!\\n// They also should never be emitted directly, they only help us defining\\n// typescript types!\\ninterface IIssuerEvents {\\n /// FAST registration events.\\n\\n /**\\n * @notice Emited when a new FAST is registered.\\n * @param fast The address of the newly registered FAST diamond.\\n */\\n event FastRegistered(address indexed fast);\\n /**\\n * @notice Emited when a FAST is removed from the Issuer contract.\\n * @param fast The address of the unregistered FAST.\\n */\\n event FastUnregistered(address indexed fast);\\n\\n /// FAST groupping events.\\n\\n event FastGroupChanged(address indexed fast, string indexed oldGroup, string indexed newGroup);\\n\\n /// Governors.\\n\\n event GovernorshipRemoved(address indexed fast, address indexed governor);\\n event GovernorshipAdded(address indexed fast, address indexed governor);\\n}\\n\",\"keccak256\":\"0x7ab2611cedeaf69aba2461e083ce436cde93f53e0ebf7ae882bf1800a839f543\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuer {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xd681d5f1de7bc4b7442c088939dc202585e09699e92a94c9717ace8d0f4fcaa5;\\n\\n // Data structures.\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // This is where we keep our list of deployed fast FASTs.\\n LibAddressSet.Data fastSet;\\n // We keep track of the FAST symbols that were already used - string to FAST address.\\n mapping(string => address) fastSymbols;\\n // We also keep track of the FAST groups here - slug to FAST address set.\\n mapping(string => LibAddressSet.Data) fastGroups;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x82972d98e290aa68b6fa14dee5e9f3e0ca3d80604e96435ea437e9f92891f7e9\",\"license\":\"MIT\"},\"contracts/issuer/lib/LibIssuerAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibIssuerAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Issuer.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0x3ceaa4d5edf9c96fbd56140abe6389d65a87143d4f11819874ff2fe0ae9574db;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n // For a given address we store list of FASTs where that address is a governor.\\n mapping(address => LibAddressSet.Data) fastGovernorships;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x225043d709577f7c580aa46637ef2910336dc0ef75a508a1252484fa45558fca\",\"license\":\"MIT\"},\"contracts/lib/LibAddressSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibAddressSet {\\n /// @notice Represents a list of addresses.\\n struct Data {\\n mapping(address => uint256) indices;\\n address[] values;\\n }\\n\\n /**\\n * @notice Adds an item into the storage set. If the address already exists in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be added.\\n */\\n function add(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && exists) {\\n return;\\n }\\n require(!exists, \\\"Address already in set\\\");\\n d.indices[key] = d.values.length;\\n d.values.push(key);\\n }\\n\\n /**\\n * @notice Removes an item from the storage set. If the address does not exist in the set, the method reverts.\\n * @param d is the internal data storage to use.\\n * @param key is the address to be removed.\\n */\\n function remove(Data storage d, address key, bool noThrow) internal {\\n bool exists = contains(d, key);\\n if (noThrow && !exists) {\\n return;\\n }\\n require(exists, \\\"Address does not exist in set\\\");\\n address keyToMove = d.values[d.values.length - 1];\\n uint256 idxToReplace = d.indices[key];\\n d.indices[keyToMove] = idxToReplace;\\n d.values[idxToReplace] = keyToMove;\\n\\n delete d.indices[key];\\n d.values.pop();\\n }\\n\\n /**\\n * @notice Tests whether or not a given item already exists in the set.\\n * @param d is the internal data storage to use.\\n * @param key is the address to test.\\n * @return a boolean.\\n */\\n function contains(Data storage d, address key) internal view returns (bool) {\\n return d.values.length == 0 ? false : d.values[d.indices[key]] == key;\\n }\\n}\\n\",\"keccak256\":\"0x47c911c8b83ffd42c9d6088104f3c2c5eac2899fdf200b3683d1de10ca96b1a8\",\"license\":\"MIT\"},\"contracts/lib/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x0e12d54c3afccb656312e8bc7c31d16feb3718a421d2ea732024f608ccb6aab4\",\"license\":\"MIT\"},\"contracts/lib/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./LibHelpers.sol\\\";\\nimport \\\"../interfaces/IERC173.sol\\\";\\n\\nlibrary LibHelpers {\\n address internal constant ZERO_ADDRESS = address(0);\\n address internal constant DEPLOYER_CONTRACT = 0x6DF2D25d8C6FD680730ee658b530A05a99BB769a;\\n\\n function _isDiamondFacet(address who) internal view returns (bool) {\\n return who == address(this);\\n }\\n\\n function _isDiamondOwner(address who) internal view returns (bool) {\\n return who == IERC173(address(this)).owner();\\n }\\n\\n function _isDeployer(address who) internal pure returns (bool) {\\n return who == LibHelpers.DEPLOYER_CONTRACT;\\n }\\n}\\n\",\"keccak256\":\"0x14f9bbd2c6f21fcd5cc1760c3eb92f808c25f6a908d69c89e22868f8d54dc062\",\"license\":\"MIT\"},\"contracts/lib/LibPaginate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../fast/lib/LibFastHistory.sol\\\";\\n\\nlibrary LibPaginate {\\n function addresses(\\n address[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (address[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n address[] memory values = new address[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function uint256s(\\n uint256[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (uint256[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n uint256[] memory values = new uint256[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function supplyProofs(\\n LibFastHistory.SupplyProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.SupplyProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.SupplyProof[] memory values = new LibFastHistory.SupplyProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n\\n function transferProofs(\\n LibFastHistory.TransferProof[] storage collection,\\n uint256 cursor,\\n uint256 perPage\\n ) internal view returns (LibFastHistory.TransferProof[] memory, uint256) {\\n uint256 length = (perPage > collection.length - cursor) ? collection.length - cursor : perPage;\\n LibFastHistory.TransferProof[] memory values = new LibFastHistory.TransferProof[](length);\\n for (uint256 i = 0; i < length; ) {\\n values[i] = collection[cursor + i];\\n unchecked {\\n ++i;\\n }\\n }\\n return (values, cursor + length);\\n }\\n}\\n\",\"keccak256\":\"0xf2f7e33b965e27fa953f0b95922856f42b2563f9a037a17e1973af5a496899ca\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAccessFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../lib/LibAddressSet.sol\\\";\\nimport \\\"../lib/LibPaginate.sol\\\";\\nimport \\\"../common/AHasMembers.sol\\\";\\nimport \\\"../common/AHasForwarder.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../interfaces/IHasActiveMembers.sol\\\";\\nimport \\\"./lib/LibMarketplaceAccess.sol\\\";\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./MarketplaceAutomatonsFacet.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Access facet is in charge of keeping track of marketplace members.\\n */\\ncontract MarketplaceAccessFacet is AMarketplaceFacet, AHasMembers, AHasContext, IHasActiveMembers {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasContext implementation.\\n\\n // TODO: Could _isTrustedForwarder actually have it's default implementation point to\\n // IHasForwarder(address(this)).isTrustedForwarder(forwarder) or similar?\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n // Override base classes to use the AHasContext implementation.\\n function _msgSender() internal view override(AHasMembers, AHasContext) returns (address) {\\n return AHasContext._msgSender();\\n }\\n\\n /// AHasMembers implementation.\\n\\n function isMembersManager(address who) internal view override(AHasMembers) returns (bool) {\\n return _isIssuerMember(who) || AHasAutomatons(address(this)).automatonCan(who, MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS);\\n }\\n\\n function isValidMember(address who) internal pure override(AHasMembers) returns (bool) {\\n return who != LibHelpers.ZERO_ADDRESS;\\n }\\n\\n function onMemberRemoved(address member) internal view override(AHasMembers) {\\n LibMarketplaceAccess.Data storage s = LibMarketplaceAccess.data();\\n // Ensure that member doesn't have any FAST membership.\\n if (s.fastMemberships[member].values.length != 0) revert ICustomErrors.RequiresNoFastMemberships(member);\\n }\\n\\n /// FAST memberships functions.\\n\\n /**\\n * @notice Allows to query FAST memberships for a given member address.\\n * @param member Is the address to check.\\n * @param cursor The index at which to start.\\n * @param perPage How many records should be returned at most.\\n */\\n function fastMemberships(\\n address member,\\n uint256 cursor,\\n uint256 perPage\\n ) external view returns (address[] memory, uint256) {\\n return LibPaginate.addresses(LibMarketplaceAccess.data().fastMemberships[member].values, cursor, perPage);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a new FAST membership has been added.\\n */\\n function memberAddedToFast(address member) external {\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Keep track of the member's FAST membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].add(_msgSender(), true);\\n }\\n\\n /**\\n * @notice Callback from FAST contracts allowing the Marketplace contract to keep track of FAST memberships.\\n * @param member The member for which a FAST membership has been removed.\\n */\\n function memberRemovedFromFast(address member) external {\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n // Remove the tracked membership.\\n // TODO: We don't throw until we've fixed the `marketplace.fastMemberships`.\\n LibMarketplaceAccess.data().fastMemberships[member].remove(_msgSender(), true);\\n }\\n\\n /// IHasActiveMembers implementation.\\n\\n /**\\n * @notice Given a member returns it's activation status.\\n * @param candidate The address to check activation status on.\\n */\\n function isActiveMember(address candidate) external view override(IHasActiveMembers) returns (bool) {\\n return AHasMembers(this).isMember(candidate) && !LibMarketplaceAccess.data().deactivatedMemberSet.contains(candidate);\\n }\\n\\n /**\\n * @notice Activates a member at the Marketplace level.\\n * @param member The member to remove from the deactivation member set.\\n */\\n function activateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to activate an already active member.\\n if (this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceDeactivatedMember(member);\\n // Remove the member from the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.remove(member, false);\\n // Emit!\\n emit MemberActivated(member);\\n }\\n\\n /**\\n * @notice Deactivates a member at the Marketplace level.\\n * @param member The member to add to the deactivation member set.\\n */\\n function deactivateMember(address member) external override(IHasActiveMembers) onlyIssuerMember onlyMember(member) {\\n // Guard against attempting to deactivate an already deactivated member.\\n if (!this.isActiveMember(member)) revert ICustomErrors.RequiresMarketplaceActiveMembership(member);\\n // Add the member to the deactivated members list.\\n LibMarketplaceAccess.data().deactivatedMemberSet.add(member, false);\\n // Emit!\\n emit MemberDeactivated(member);\\n }\\n}\\n\",\"keccak256\":\"0x7a8f193f18b8c2f39d38aafb2c7cb936b07fff612299a4620ac932cc9ee4766e\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceAutomatonsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"../common/AHasAutomatons.sol\\\";\\n\\n// Privileges bits.\\nuint32 constant MARKETPLACE_PRIVILEGE_MANAGE_MEMBERS = 1;\\n\\n/**\\n * @title The Marketplace Smart Contract.\\n * @notice The Marketplace Automatons facet is in charge of keeping track of automaton accounts.\\n */\\ncontract MarketplaceAutomatonsFacet is AMarketplaceFacet, AHasAutomatons {\\n /// Automatons management.\\n\\n function isAutomatonsManager(address who) internal view override(AHasAutomatons) returns (bool) {\\n return _isIssuerMember(who);\\n }\\n}\\n\",\"keccak256\":\"0xa2a142702268b2d33ddd7703c23f36274161cb2b9b707369e703ebbfa2f5a53c\",\"license\":\"MIT\"},\"contracts/marketplace/MarketplaceTokenHoldersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"./lib/AMarketplaceFacet.sol\\\";\\nimport \\\"./lib/LibMarketplaceTokenHolders.sol\\\";\\nimport \\\"../issuer/IssuerTopFacet.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../common/AHasContext.sol\\\";\\nimport \\\"../common/AHasForwarder.sol\\\";\\n\\n/** @dev The Marketplace FAST balances facet.\\n */\\ncontract MarketplaceTokenHoldersFacet is AMarketplaceFacet, AHasContext {\\n using LibAddressSet for LibAddressSet.Data;\\n\\n /// AHasContext implementation.\\n\\n function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {\\n return AHasForwarder(address(this)).isTrustedForwarder(forwarder);\\n }\\n\\n /** @dev The callback used when a balance changes on a FAST.\\n */\\n function fastBalanceChanged(address account, uint256 balance) external {\\n // Return early if this is the zero address.\\n if (account == address(0)) {\\n return;\\n }\\n\\n // Verify that the given address is in fact a registered FAST contract.\\n if (!IssuerTopFacet(LibMarketplace.data().issuer).isFastRegistered(_msgSender())) {\\n revert ICustomErrors.RequiresFastContractCaller();\\n }\\n\\n // Get the storage pointer and balance of the token holder.\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n\\n // If this is a positive balance and it doesn't already exist in the set, add address.\\n if (balance > 0 && !s.fastHoldings[account].contains(_msgSender())) {\\n s.fastHoldings[account].add(_msgSender(), false);\\n }\\n // If the balance is 0 and it exists in the set, remove it.\\n else if (balance == 0 && s.fastHoldings[account].contains(_msgSender())) {\\n s.fastHoldings[account].remove(_msgSender(), false);\\n }\\n }\\n\\n /** @dev A way to get a list of FASTs for an account.\\n * @return list of FAST addresses.\\n */\\n function holdings(address account) external view returns (address[] memory) {\\n LibMarketplaceTokenHolders.Data storage s = LibMarketplaceTokenHolders.data();\\n return s.fastHoldings[account].values;\\n }\\n}\\n\",\"keccak256\":\"0xb8fb7178c40f36efc80271a2441cdcea03f072452a99650e550a737c50bced15\",\"license\":\"MIT\"},\"contracts/marketplace/lib/AMarketplaceFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibHelpers.sol\\\";\\nimport \\\"../../common/AHasMembers.sol\\\";\\nimport \\\"../../interfaces/ICustomErrors.sol\\\";\\nimport \\\"../lib/LibMarketplace.sol\\\";\\nimport \\\"./IMarketplaceEvents.sol\\\";\\n\\n/**\\n * @notice This contract is a group of modifiers that can be used by any Marketplace facets to guard against\\n * certain permissions.\\n */\\nabstract contract AMarketplaceFacet is IMarketplaceEvents {\\n /// Internal ACL functions.\\n\\n function _isIssuerMember(address who) internal view returns (bool) {\\n return AHasMembers(LibMarketplace.data().issuer).isMember(who);\\n }\\n\\n // Modifiers.\\n\\n /// @notice Ensures that a method can only be called by the singleton deployer contract factory.\\n modifier onlyDeployer() virtual {\\n if (!LibHelpers._isDeployer(msg.sender)) revert ICustomErrors.InternalMethod();\\n _;\\n }\\n\\n /**\\n * @notice Requires that the message sender is a member of the linked Issuer.\\n */\\n modifier onlyIssuerMember() virtual {\\n if (!_isIssuerMember(msg.sender)) revert ICustomErrors.RequiresIssuerMembership(msg.sender);\\n _;\\n }\\n\\n /**\\n * @notice Requires that the given address is a member of the marketplace.\\n * @param who is the address to be checked.\\n */\\n modifier onlyMember(address who) virtual {\\n if (!AHasMembers(address(this)).isMember(who)) revert ICustomErrors.RequiresMarketplaceMembership(who);\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xb9569fef0cef86a40828714a131f6dafb98ae4cd21ff44e710f8e57413bd6ffb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/IMarketplaceEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\ninterface IMarketplaceEvents {\\n /// @dev See `IHasActiveMembers`.\\n event MemberActivated(address indexed member);\\n /// @dev See `IHasActiveMembers`.\\n event MemberDeactivated(address indexed member);\\n /// @dev Emitted when a FAST deployment is requested.\\n event FastDeploymentRequested(uint256 indexed index);\\n}\\n\",\"keccak256\":\"0xeb89df40f51b42b444f698f8d13cf4318396f9393d7fab049c131e2f6bd45b4d\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplace.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nlibrary LibMarketplace {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xb59ec141376cee83f618e10e881bbb4789cdeee27e0d441a8c37ead3cb8b93c1;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice The internal pointer to the Issuer contract.\\n address issuer;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x03c52542f4b27ba631639502855cdc9d5e56347c254595b42a7d6567441933bb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceAccess {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.storage.Access'):\\n bytes32 internal constant STORAGE_SLOT = 0xecb992c7a1185ca18ac50bc1672192fb67e7c3e74465887a8fcaab265dab37bd;\\n\\n struct Data {\\n /// @notice The latest intializer version that was called.\\n uint16 version;\\n /// @notice This is where we keep track of our member FAST memberships.\\n mapping(address => LibAddressSet.Data) fastMemberships;\\n /// @notice This is where we keep track of our deactivated memberships.\\n LibAddressSet.Data deactivatedMemberSet;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac8cc51395e6e5b357b72f0cb3b4b681b5cbe0e0338692fde4d1087bc98b03eb\",\"license\":\"MIT\"},\"contracts/marketplace/lib/LibMarketplaceTokenHolders.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.10;\\n\\nimport \\\"../../lib/LibAddressSet.sol\\\";\\n\\nlibrary LibMarketplaceTokenHolders {\\n // The current version of the storage.\\n uint16 internal constant STORAGE_VERSION = 1;\\n // This is keccak256('Marketplace.TokenHolders.storage'):\\n bytes32 internal constant STORAGE_SLOT = 0xecf50453542504034bd40d376fb1408ada3025f2fe86ca1b9b4b1440b8d4a2f4;\\n\\n struct Data {\\n /// @dev The latest intializer version that was called.\\n uint16 version;\\n /// @dev The tracked FAST holdings of a user.\\n mapping(address => LibAddressSet.Data) fastHoldings;\\n }\\n\\n function data() internal pure returns (Data storage s) {\\n assembly {\\n s.slot := STORAGE_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa6edcacafdaaac79b202288095948b7b3bee0e01f7d4b4efb8eee3425f9a8c04\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afe806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a63234e011610076578063d65cd0101161005b578063d65cd010146101e1578063daa17f49146101f4578063ddb2d22b1461023157600080fd5b8063a63234e01461016a578063c97b9730146101ce57600080fd5b8063034cd725146100a857806311e54933146100fd57806329e7ef2d146101405780638762d38e14610155575b600080fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70654760100000000000000000000000000000000000000000000900460ff165b60405190151581526020015b60405180910390f35b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547501000000000000000000000000000000000000000000900460ff166100e8565b610148610273565b6040516100f49190610924565b6101686101633660046109a8565b610327565b005b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f4565b6101686101dc3660046109cc565b6104d2565b6101686101ef3660046109a8565b610578565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166101a9565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065474010000000000000000000000000000000000000000900460ff166100e8565b60607f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70560020180546102a490610a3e565b80601f01602080910402602001604051908101604052809291908181526020018280546102d090610a3e565b801561031d5780601f106102f25761010080835404028352916020019161031d565b820191906000526020600020905b81548152906001019060200180831161030057829003601f168201915b5050505050905090565b610330336107ab565b15801561037a57507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314155b156103b1576040517f7fc5627f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7059082151576010000000000000000000000000000000000000000000090910460ff161515146104ce576001810180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff1676010000000000000000000000000000000000000000000084151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b1580156104b557600080fd5b505af11580156104c9573d6000803e3d6000fd5b505050505b5050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314610548576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105737f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e707838361086d565b505050565b610581336107ab565b6105bd576040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815233600482015260240160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015610608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062c9190610a92565b80156106a557503073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a29190610aaf565b15155b156106dc576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70680547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000083151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b5050505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190610a92565b92915050565b82805461087990610a3e565b90600052602060002090601f01602090048101928261089b57600085556108ff565b82601f106108d2578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556108ff565b828001600101855582156108ff579182015b828111156108ff5782358255916020019190600101906108e4565b5061090b92915061090f565b5090565b5b8082111561090b5760008155600101610910565b600060208083528351808285015260005b8181101561095157858101830151858201604001528201610935565b81811115610963576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b80151581146109a557600080fd5b50565b6000602082840312156109ba57600080fd5b81356109c581610997565b9392505050565b600080602083850312156109df57600080fd5b823567ffffffffffffffff808211156109f757600080fd5b818501915085601f830112610a0b57600080fd5b813581811115610a1a57600080fd5b866020828501011115610a2c57600080fd5b60209290920196919550909350505050565b600181811c90821680610a5257607f821691505b60208210811415610a8c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215610aa457600080fd5b81516109c581610997565b600060208284031215610ac157600080fd5b505191905056fea2646970667358221220db7053a75daaf32c194f974bb57df05c1f05f668aec89d047e9ad1cec23237d964736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a63234e011610076578063d65cd0101161005b578063d65cd010146101e1578063daa17f49146101f4578063ddb2d22b1461023157600080fd5b8063a63234e01461016a578063c97b9730146101ce57600080fd5b8063034cd725146100a857806311e54933146100fd57806329e7ef2d146101405780638762d38e14610155575b600080fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70654760100000000000000000000000000000000000000000000900460ff165b60405190151581526020015b60405180910390f35b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547501000000000000000000000000000000000000000000900460ff166100e8565b610148610273565b6040516100f49190610924565b6101686101633660046109a8565b610327565b005b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f4565b6101686101dc3660046109cc565b6104d2565b6101686101ef3660046109a8565b610578565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065473ffffffffffffffffffffffffffffffffffffffff166101a9565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7065474010000000000000000000000000000000000000000900460ff166100e8565b60607f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70560020180546102a490610a3e565b80601f01602080910402602001604051908101604052809291908181526020018280546102d090610a3e565b801561031d5780601f106102f25761010080835404028352916020019161031d565b820191906000526020600020905b81548152906001019060200180831161030057829003601f168201915b5050505050905090565b610330336107ab565b15801561037a57507f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314155b156103b1576040517f7fc5627f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e706547f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7059082151576010000000000000000000000000000000000000000000090910460ff161515146104ce576001810180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff1676010000000000000000000000000000000000000000000084151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b1580156104b557600080fd5b505af11580156104c9573d6000803e3d6000fd5b505050505b5050565b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e7055462010000900473ffffffffffffffffffffffffffffffffffffffff163314610548576040517f12e9ad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105737f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e707838361086d565b505050565b610581336107ab565b6105bd576040517f1dd41c4d00000000000000000000000000000000000000000000000000000000815233600482015260240160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff166311e549336040518163ffffffff1660e01b8152600401602060405180830381865afa158015610608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062c9190610a92565b80156106a557503073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a29190610aaf565b15155b156106dc576040517f9ba6061b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e70680547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000083151502179055604080517f4f2274c000000000000000000000000000000000000000000000000000000000815290513091634f2274c091600480830192600092919082900301818387803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b5050505050565b60007f80c187ea6f955fd624c41fb7a18011cc87d98c6f4c06d897b59142f65707e705546040517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152620100009092049091169063a230c52490602401602060405180830381865afa158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190610a92565b92915050565b82805461087990610a3e565b90600052602060002090601f01602090048101928261089b57600085556108ff565b82601f106108d2578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556108ff565b828001600101855582156108ff579182015b828111156108ff5782358255916020019190600101906108e4565b5061090b92915061090f565b5090565b5b8082111561090b5760008155600101610910565b600060208083528351808285015260005b8181101561095157858101830151858201604001528201610935565b81811115610963576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b80151581146109a557600080fd5b50565b6000602082840312156109ba57600080fd5b81356109c581610997565b9392505050565b600080602083850312156109df57600080fd5b823567ffffffffffffffff808211156109f757600080fd5b818501915085601f830112610a0b57600080fd5b813581811115610a1a57600080fd5b866020828501011115610a2c57600080fd5b60209290920196919550909350505050565b600181811c90821680610a5257607f821691505b60208210811415610a8c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215610aa457600080fd5b81516109c581610997565b600060208284031215610ac157600080fd5b505191905056fea2646970667358221220db7053a75daaf32c194f974bb57df05c1f05f668aec89d047e9ad1cec23237d964736f6c634300080a0033", "devdoc": { "kind": "dev", "methods": { @@ -506,9 +456,6 @@ }, "userdoc": { "events": { - "Approval(address,address,uint256)": { - "notice": "See `ERC20.Approval`." - }, "Burnt(uint256,string,address)": { "notice": "Emited whenever an burning happens in a FAST." }, @@ -529,9 +476,6 @@ }, "Minted(uint256,string,address)": { "notice": "Emited whenever an issuance happens in a FAST." - }, - "Transfer(address,address,uint256)": { - "notice": "See `ERC20.Transfer`." } }, "kind": "user",