Address Contract Verified
Address
0xC1c3E82455162d4B47A893cdB1578aecbC5669DE
Balance
0 ETH
Nonce
1
Code Size
9947 bytes
Creator
0xD6590755...24dB at tx 0xb09ecbee...da695a
Indexed Transactions
0
Contract Bytecode
9947 bytes
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80635c975abb1161010f57806395d89b41116100a2578063d6314d6911610071578063d6314d69146104cf578063dd62ed3e146104f6578063e42e99331461053c578063f2fde38b1461054f57600080fd5b806395d89b411461047a5780639fd23d9214610482578063a9059cbb14610495578063c8b0cf68146104a857600080fd5b806378fc3cb3116100de57806378fc3cb314610421578063791a4b27146104345780637ed7eb9b146104495780638da5cb5b1461045c57600080fd5b80635c975abb146103ab57806368573107146103d057806370a08231146103e3578063715018a61461041957600080fd5b806323b872dd1161018757806340c10f191161015657806340c10f191461035f57806342966c681461037257806342ccb95d146103855780634a6cc6771461039857600080fd5b806323b872dd1461030a578063266565a91461031d578063313ce5671461033d5780633e47b1a91461034c57600080fd5b806318160ddd116101c357806318160ddd1461025e57806318817ff6146102705780631bb7cc99146102bc5780631c681a42146102e357600080fd5b806302329a29146101f557806306fdde031461020a578063095ea7b314610228578063132a5f541461024b575b600080fd5b610208610203366004611f23565b610562565b005b61021261063a565b60405161021f9190611fa9565b60405180910390f35b61023b610236366004611fde565b6106cc565b604051901515815260200161021f565b61020861025936600461200a565b61081a565b6002545b60405190815260200161021f565b6102977f0000000000000000000000002025847e1d91e4fe3971cf52f54a411e10a35a7081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021f565b6102627f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f250081565b6102627fffa60083152bd11704a80cc8c7a409dad8aa74288b454a3ba0e94c0abc7cf16881565b61023b610318366004612023565b6108e3565b61026261032b366004612064565b60066020526000908152604090205481565b6040516012815260200161021f565b61023b61035a3660046120cd565b610909565b61020861036d366004611fde565b610a58565b61020861038036600461200a565b610a6e565b61023b6103933660046120cd565b610a7b565b6102086103a63660046120cd565b610ba3565b60055461023b9074010000000000000000000000000000000000000000900460ff1681565b6102086103de3660046120cd565b610c46565b6102626103f1366004612064565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b610208610ce2565b61023b61042f366004612064565b610cf6565b61043c610d93565b60405161021f919061213e565b6102086104573660046120cd565b610e6c565b60055473ffffffffffffffffffffffffffffffffffffffff16610297565b6102126110f6565b6102086104903660046121c1565b611105565b61023b6104a3366004611fde565b611188565b6102627fc88ef414e1d5ad1d458fdfa42b508737177470135860c2a2ce45583ce28f207c81565b6102627f23267d6f5ad2314f05869ba21495e0e78a3e1f8e9b2316c24c46650016f6c17481565b610262610504366004612235565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b61021261054a36600461200a565b6111a0565b61020861055d366004612064565b61124c565b61056a6112ad565b801515600560149054906101000a900460ff161515036105b6576040517f1785c68100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805482151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f0e2fb031ee032dc02d8011dc50b816eb450cf856abd8261680dac74f72165bd29061062f90831515815260200190565b60405180910390a150565b6060600380546106499061226e565b80601f01602080910402602001604051908101604052809291908181526020018280546106759061226e565b80156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b5050505050905090565b60055460009074010000000000000000000000000000000000000000900460ff1615610724576040517f1785c68100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107507f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f2500336000611300565b61078d576040517fdf17e3160000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6107b97f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f2500846000611300565b610807576040517fdf17e31600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610784565b61081183836114d5565b90505b92915050565b6108226112ad565b600754811061085d576040517f4e23d03500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007805461086d906001906122f0565b8154811061087d5761087d612303565b906000526020600020016007828154811061089a5761089a612303565b9060005260206000200190816108b091906123a8565b5060078054806108c2576108c26124df565b6001900381819060005260206000200160006108de9190611ed5565b905550565b6000336108f18582856114e3565b6108fc8585856115b2565b60019150505b9392505050565b6000838214610944576040517ffc23596000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84811015610a4c576109a07f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f250087878481811061098557610985612303565b905060200201602081019061099a9190612064565b33611300565b1580156109c5575060055473ffffffffffffffffffffffffffffffffffffffff163314155b156109fc576040517fecda804200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a44868683818110610a1157610a11612303565b9050602002016020810190610a269190612064565b858584818110610a3857610a38612303565b90506020020135611662565b600101610947565b50600195945050505050565b610a606112ad565b610a6a8282611706565b5050565b610a783382611762565b50565b6000838214610ab6576040517ffc23596000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84811015610a4c57610af77f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f250087878481811061098557610985612303565b158015610b1c575060055473ffffffffffffffffffffffffffffffffffffffff163314155b15610b53576040517fecda804200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b9b868683818110610b6857610b68612303565b9050602002016020810190610b7d9190612064565b858584818110610b8f57610b8f612303565b905060200201356117be565b600101610ab9565b610bab6112ad565b828114610be4576040517ffc23596000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83811015610c3f57610c37858583818110610c0457610c04612303565b9050602002016020810190610c199190612064565b848484818110610c2b57610c2b612303565b90506020020135611762565b600101610be7565b5050505050565b610c4e6112ad565b828114610c87576040517ffc23596000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83811015610c3f57610cda858583818110610ca757610ca7612303565b9050602002016020810190610cbc9190612064565b848484818110610cce57610cce612303565b90506020020135611706565b600101610c8a565b610cea6112ad565b610cf460006118b5565b565b6000610d247f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f2500836000611300565b8015610d595750610d577f23267d6f5ad2314f05869ba21495e0e78a3e1f8e9b2316c24c46650016f6c174836000611300565b155b80156108145750610d8c7fc88ef414e1d5ad1d458fdfa42b508737177470135860c2a2ce45583ce28f207c836000611300565b1592915050565b60606007805480602002602001604051908101604052809291908181526020016000905b82821015610e63578382906000526020600020018054610dd69061226e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e029061226e565b8015610e4f5780601f10610e2457610100808354040283529160200191610e4f565b820191906000526020600020905b815481529060010190602001808311610e3257829003601f168201915b505050505081526020019060010190610db7565b50505050905090565b610e746112ad565b828114610ead576040517ffc23596000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83811015610c3f57828282818110610eca57610eca612303565b9050602002013560066000878785818110610ee757610ee7612303565b9050602002016020810190610efc9190612064565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610f6f576040517fa1bea92200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828282818110610f8157610f81612303565b9050602002013560066000878785818110610f9e57610f9e612303565b9050602002016020810190610fb39190612064565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ff891906122f0565b6006600087878581811061100e5761100e612303565b90506020020160208101906110239190612064565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205561106030848484818110610c2b57610c2b612303565b84848281811061107257611072612303565b90506020020160208101906110879190612064565b73ffffffffffffffffffffffffffffffffffffffff167fc48296d4225540ea593949e053273ecc46b685b3d24a91f6f46b106f4f37fe268484848181106110d0576110d0612303565b905060200201356040516110e691815260200190565b60405180910390a2600101610eb0565b6060600480546106499061226e565b61110d6112ad565b600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880161114a82848361250e565b507f8c8a6c87a0d502b53a3309a481362a59403e584f220d0fad0b1d1120bb063ff7828260405161117c929190612628565b60405180910390a15050565b6000336111968185856115b2565b5060019392505050565b600781815481106111b057600080fd5b9060005260206000200160009150905080546111cb9061226e565b80601f01602080910402602001604051908101604052809291908181526020018280546111f79061226e565b80156112445780601f1061121957610100808354040283529160200191611244565b820191906000526020600020905b81548152906001019060200180831161122757829003601f168201915b505050505081565b6112546112ad565b73ffffffffffffffffffffffffffffffffffffffff81166112a4576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b610a78816118b5565b60055473ffffffffffffffffffffffffffffffffffffffff163314610cf4576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610784565b600073ffffffffffffffffffffffffffffffffffffffff82166113f9576040517f67fb57650000000000000000000000000000000000000000000000000000000081526004810185905273ffffffffffffffffffffffffffffffffffffffff8481166024830152808416917f0000000000000000000000002025847e1d91e4fe3971cf52f54a411e10a35a70909116906367fb576590604401602060405180830381865afa1580156113b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113da9190612675565b73ffffffffffffffffffffffffffffffffffffffff1614159050610902565b6040517f67fb57650000000000000000000000000000000000000000000000000000000081526004810185905273ffffffffffffffffffffffffffffffffffffffff8481166024830152808416917f0000000000000000000000002025847e1d91e4fe3971cf52f54a411e10a35a70909116906367fb576590604401602060405180830381865afa158015611492573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b69190612675565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b60003361119681858561192c565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146115ac578181101561159d576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610784565b6115ac84848484036000611935565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316611602576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b73ffffffffffffffffffffffffffffffffffffffff8216611652576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b61165d838383611a7d565b505050565b61166d8230836115b2565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090205461169e908290612692565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260066020526040908190209290925590517ff97a274face0b5517365ad396b1fdba6f68bd3135ef603e44272adba3af5a1e0906116fa9084815260200190565b60405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff8216611756576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b610a6a60008383611a7d565b73ffffffffffffffffffffffffffffffffffffffff82166117b2576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b610a6a82600083611a7d565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090205481111561181d576040517fa1bea92200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118283083836115b2565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020546118599082906122f0565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260066020526040908190209290925590517fef4f289a26a5ff77ba542e60d1ce03e6c46988d0f1c3d81633511a322f9d0fab906116fa9084815260200190565b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61165d83838360015b73ffffffffffffffffffffffffffffffffffffffff8416611985576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b73ffffffffffffffffffffffffffffffffffffffff83166119d5576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610784565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020908152604080832093871683529290522082905580156115ac578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611a6f91815260200190565b60405180910390a350505050565b60055474010000000000000000000000000000000000000000900460ff1615611ad2576040517f1785c68100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff163314611bea5773ffffffffffffffffffffffffffffffffffffffff831615801590611b1c5750611b1a83610cf6565b155b15611b6b576040517fdf17e31600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610784565b73ffffffffffffffffffffffffffffffffffffffff821615801590611b965750611b9482610cf6565b155b15611be5576040517fdf17e31600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610784565b611d24565b73ffffffffffffffffffffffffffffffffffffffff831615801590611c385750611c367f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f2500846000611300565b155b15611c87576040517fdf17e31600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610784565b73ffffffffffffffffffffffffffffffffffffffff821615801590611cd55750611cd37f0af0c3ebe77999ca20698e1ff25f812bf82409a59d21ca15a41f39e0ce9f2500836000611300565b155b15611d24576040517fdf17e31600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610784565b61165d83838373ffffffffffffffffffffffffffffffffffffffff8316611d62578060026000828254611d579190612692565b90915550611e149050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015611de8576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024810182905260448101839052606401610784565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff8216611e3d57600280548290039055611e69565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611ec891815260200190565b60405180910390a3505050565b508054611ee19061226e565b6000825580601f10611ef1575050565b601f016020900490600052602060002090810190610a7891905b80821115611f1f5760008155600101611f0b565b5090565b600060208284031215611f3557600080fd5b8135801515811461090257600080fd5b6000815180845260005b81811015611f6b57602081850181015186830182015201611f4f565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006108116020830184611f45565b73ffffffffffffffffffffffffffffffffffffffff81168114610a7857600080fd5b60008060408385031215611ff157600080fd5b8235611ffc81611fbc565b946020939093013593505050565b60006020828403121561201c57600080fd5b5035919050565b60008060006060848603121561203857600080fd5b833561204381611fbc565b9250602084013561205381611fbc565b929592945050506040919091013590565b60006020828403121561207657600080fd5b813561090281611fbc565b60008083601f84011261209357600080fd5b50813567ffffffffffffffff8111156120ab57600080fd5b6020830191508360208260051b85010111156120c657600080fd5b9250929050565b600080600080604085870312156120e357600080fd5b843567ffffffffffffffff8111156120fa57600080fd5b61210687828801612081565b909550935050602085013567ffffffffffffffff81111561212657600080fd5b61213287828801612081565b95989497509550505050565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b828110156121b5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526121a0858351611f45565b94506020938401939190910190600101612166565b50929695505050505050565b600080602083850312156121d457600080fd5b823567ffffffffffffffff8111156121eb57600080fd5b8301601f810185136121fc57600080fd5b803567ffffffffffffffff81111561221357600080fd5b85602082840101111561222557600080fd5b6020919091019590945092505050565b6000806040838503121561224857600080fd5b823561225381611fbc565b9150602083013561226381611fbc565b809150509250929050565b600181811c9082168061228257607f821691505b6020821081036122bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610814576108146122c1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561165d57806000526020600020601f840160051c810160208510156123885750805b601f840160051c820191505b81811015610c3f5760008155600101612394565b8181036123b3575050565b6123bd825461226e565b67ffffffffffffffff8111156123d5576123d5612332565b6123e9816123e3845461226e565b84612361565b6000601f82116001811461243b57600083156124055750848201545b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455610c3f565b6000858152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841690600086815260209020845b838110156124935782860154825560019586019590910190602001612473565b50858310156124cf57818501547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b67ffffffffffffffff83111561252657612526612332565b61253a83612534835461226e565b83612361565b6000601f84116001811461258c57600085156125565750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610c3f565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156125db57868501358255602094850194600190920191016125bb565b5086821015612616577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b60006020828403121561268757600080fd5b815161090281611fbc565b80820180821115610814576108146122c156fea264697066735822122089dca00ab5e4297711a4e2d208af2b75415550d90b7b5b1fc58109fd08c4e84a64736f6c634300081c0033
Verified Source Code Full Match
Compiler: v0.8.28+commit.7893614a
EVM: paris
Optimization: Yes (1000000 runs)
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
ERC20.sol 316 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` amount of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
* ```
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
FSC20.sol 182 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '../walletList/interfaces/IWalletList.sol';
import './interfaces/IFSC20.sol';
contract FSC20 is IFSC20, ERC20, Ownable {
IWalletList public immutable walletListContract;
bool public paused;
mapping(address => uint256) public frozenBalance;
string[] public ipfsCids;
bytes32 public constant MEMBER = keccak256('MEMBER');
bytes32 public constant WHITELIST = keccak256('WHITELIST');
bytes32 public constant FROZENLIST = keccak256('FROZENLIST');
bytes32 public constant BLACKLIST = keccak256('BLACKLIST');
constructor(string memory name_, string memory symbol_, IWalletList walletListContract_) ERC20(name_, symbol_) Ownable(_msgSender()) {
walletListContract = walletListContract_;
}
modifier isPaused() {
if (paused) {
revert AlreadyPaused();
}
_;
}
function mint(address to, uint256 amount) external onlyOwner {
_mint(to, amount);
}
function batchMint(address[] calldata to, uint256[] calldata amounts) external onlyOwner {
if (to.length != amounts.length) {
revert ArraysLengthMismatch();
}
for (uint256 i = 0; i < to.length; i++) {
_mint(to[i], amounts[i]);
}
}
function burn(uint256 amount) external {
_burn(_msgSender(), amount);
}
function batchBurn(address[] calldata from, uint256[] calldata amounts) external onlyOwner {
if (from.length != amounts.length) {
revert ArraysLengthMismatch();
}
for (uint256 i = 0; i < from.length; i++) {
_burn(from[i], amounts[i]);
}
}
function pause(bool status) external onlyOwner {
if (paused == status) {
revert AlreadyPaused();
}
paused = status;
emit Paused(status);
}
function canTransfer(address account) public view returns (bool) {
return _isAddressInList(WHITELIST, account, address(0))
&& !_isAddressInList(FROZENLIST, account, address(0))
&& !_isAddressInList(BLACKLIST, account, address(0));
}
function _update(address from, address to, uint256 amount) internal virtual override isPaused {
if (_msgSender() != owner()) {
if (from != address(0) && !canTransfer(from)) {
revert NotWhitelisted(from);
}
if (to != address(0) && !canTransfer(to)) {
revert NotWhitelisted(to);
}
} else {
if (from != address(0) && !_isAddressInList(WHITELIST, from, address(0))) {
revert NotWhitelisted(from);
}
if (to != address(0) && !_isAddressInList(WHITELIST, to, address(0))) {
revert NotWhitelisted(to);
}
}
super._update(from, to, amount);
}
function approve(address spender, uint256 amount) public virtual override isPaused returns (bool) {
if (!_isAddressInList(WHITELIST, _msgSender(), address(0))) {
revert NotWhitelisted(_msgSender());
}
if (!_isAddressInList(WHITELIST, spender, address(0))) {
revert NotWhitelisted(spender);
}
return super.approve(spender, amount);
}
function batchFreeze(address[] calldata accounts, uint256[] calldata amounts) external virtual returns (bool) {
if (accounts.length != amounts.length) {
revert ArraysLengthMismatch();
}
for (uint256 i = 0; i < accounts.length; i++) {
if (!_isAddressInList(WHITELIST, accounts[i], _msgSender()) && _msgSender() != owner()) {
revert MemberNotRegistered();
}
_freeze(accounts[i], amounts[i]);
}
return true;
}
function batchUnFreeze(address[] calldata accounts, uint256[] calldata amounts) external virtual returns (bool) {
if (accounts.length != amounts.length) {
revert ArraysLengthMismatch();
}
for (uint256 i = 0; i < accounts.length; i++) {
if (!_isAddressInList(WHITELIST, accounts[i], _msgSender()) && _msgSender() != owner()) {
revert MemberNotRegistered();
}
_unFreeze(accounts[i], amounts[i]);
}
return true;
}
function _isAddressInList(bytes32 listName, address account, address memberAddress) internal view returns (bool) {
if (memberAddress == address(0)) {
return walletListContract.addressList(listName, account) != memberAddress;
}
return walletListContract.addressList(listName, account) == memberAddress;
}
function _freeze(address owner, uint256 amount) internal virtual {
_transfer(owner, address(this), amount);
frozenBalance[owner] = frozenBalance[owner] + amount;
emit Freeze(owner, amount);
}
function _unFreeze(address owner, uint256 amount) internal virtual {
if (frozenBalance[owner] < amount) {
revert InsufficientFrozenBalance();
}
_transfer(address(this), owner, amount);
frozenBalance[owner] = frozenBalance[owner] - amount;
emit UnFreeze(owner, amount);
}
function addDocumentUrl(string calldata url) external onlyOwner {
ipfsCids.push(url);
emit DocumentUrlAdded(url);
}
function removeDocumentUrl(uint256 index) external onlyOwner {
if (index >= ipfsCids.length) {
revert IndexOutOfBounds();
}
ipfsCids[index] = ipfsCids[ipfsCids.length - 1];
ipfsCids.pop();
}
function getIpfsCids() external view returns (string[] memory) {
return ipfsCids;
}
function batchBurnFrozen(address[] calldata accounts, uint256[] calldata amounts) external onlyOwner {
if (accounts.length != amounts.length) {
revert ArraysLengthMismatch();
}
for (uint256 i = 0; i < accounts.length; i++) {
if (frozenBalance[accounts[i]] < amounts[i]) {
revert InsufficientFrozenBalance();
}
frozenBalance[accounts[i]] = frozenBalance[accounts[i]] - amounts[i];
_burn(address(this), amounts[i]);
emit FrozenBurned(accounts[i], amounts[i]);
}
}
}
IFSC20.sol 39 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '../../walletList/interfaces/IWalletList.sol';
interface IFSC20 {
// Events
event Freeze(address indexed owner, uint256 value);
event UnFreeze(address indexed owner, uint256 value);
event Paused(bool status);
event DocumentUrlAdded(string url);
event FrozenBurned(address indexed account, uint256 amount);
// Custom error definitions
error AlreadyPaused();
error ArraysLengthMismatch();
error NotWhitelisted(address account);
error MemberNotRegistered();
error InsufficientFrozenBalance();
error IndexOutOfBounds();
// External functions
function mint(address to, uint256 amount) external;
function batchMint(address[] calldata to, uint256[] calldata amounts) external;
function burn(uint256 amount) external;
function batchBurn(address[] calldata from, uint256[] calldata amounts) external;
function pause(bool status) external;
function addDocumentUrl(string calldata url) external;
function removeDocumentUrl(uint256 index) external;
function batchFreeze(address[] calldata accounts, uint256[] calldata amounts) external returns (bool);
function batchUnFreeze(address[] calldata accounts, uint256[] calldata amounts) external returns (bool);
function batchBurnFrozen(address[] calldata accounts, uint256[] calldata amounts) external;
// View functions
function walletListContract() external view returns (IWalletList);
function paused() external view returns (bool);
function frozenBalance(address account) external view returns (uint256);
function getIpfsCids() external view returns (string[] memory);
}
IWalletList.sol 28 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
interface IWalletList {
// State getters
function addressList(bytes32 listName, address user) external view returns (address);
function roleManageList(bytes32 listName, bytes32 role) external view returns (bool);
// List management functions
function addToList(bytes32 listName, bytes32 role, address user) external;
function removeFromList(bytes32 listName, bytes32 role, address user) external;
function batchAddToList(bytes32 listName, bytes32 role, address[] calldata users) external;
function batchRemoveFromList(bytes32 listName, bytes32 role, address[] calldata users) external;
function batchAddToListByOwner(bytes32 listName, bytes32 role, address[] calldata users, address member) external;
function batchRemoveFromListByOwner(bytes32 listName, bytes32 role, address[] calldata users, address member) external;
function isAddressInList(bytes32 listName, address account) external view returns (bool);
// Role management functions
function setRoleManageList(bytes32 listName, bytes32 role, bool allowed) external;
// Events
event ListChanged(bytes32 indexed listName, address indexed user, address indexed member);
event ListPermissionChanged(bytes32 indexed listName, bytes32 indexed role, bool allowed);
// Errors
error AlreadyListed(address user);
error NotListed(address user);
error NoPermission(address user);
}
Read Contract
BLACKLIST 0xc8b0cf68 → bytes32
FROZENLIST 0xd6314d69 → bytes32
MEMBER 0x1c681a42 → bytes32
WHITELIST 0x1bb7cc99 → bytes32
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
canTransfer 0x78fc3cb3 → bool
decimals 0x313ce567 → uint8
frozenBalance 0x266565a9 → uint256
getIpfsCids 0x791a4b27 → string[]
ipfsCids 0xe42e9933 → string
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
walletListContract 0x18817ff6 → address
Write Contract 15 functions
These functions modify contract state and require a wallet transaction to execute.
addDocumentUrl 0x9fd23d92
string url
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
batchBurn 0x4a6cc677
address[] from
uint256[] amounts
batchBurnFrozen 0x7ed7eb9b
address[] accounts
uint256[] amounts
batchFreeze 0x3e47b1a9
address[] accounts
uint256[] amounts
returns: bool
batchMint 0x68573107
address[] to
uint256[] amounts
batchUnFreeze 0x42ccb95d
address[] accounts
uint256[] amounts
returns: bool
burn 0x42966c68
uint256 amount
mint 0x40c10f19
address to
uint256 amount
pause 0x02329a29
bool status
removeDocumentUrl 0x132a5f54
uint256 index
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address