-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ██████████████████████████████████ | ||
// ████████████████████████ ██████████ | ||
// ████████████████████████ ██████████ | ||
// ████████████████████████ ██████████ | ||
// ████████████████████████ ██████████ | ||
// ████████████████████ | ||
// ████████████████████ | ||
// ████████████████████ | ||
// ████████████████████ | ||
// | ||
// | ||
// █████╗ ███╗ ██╗ ██████╗ ████████╗██╗ ██╗███████╗██████╗ ██████╗ ██╗ ██████╗ ██████╗██╗ ██╗ | ||
// ██╔══██╗████╗ ██║██╔═══██╗╚══██╔══╝██║ ██║██╔════╝██╔══██╗██╔══██╗██║ ██╔═══██╗██╔════╝██║ ██╔╝ | ||
// ███████║██╔██╗ ██║██║ ██║ ██║ ███████║█████╗ ██████╔╝██████╔╝██║ ██║ ██║██║ █████╔╝ | ||
// ██╔══██║██║╚██╗██║██║ ██║ ██║ ██╔══██║██╔══╝ ██╔══██╗██╔══██╗██║ ██║ ██║██║ ██╔═██╗ | ||
// ██║ ██║██║ ╚████║╚██████╔╝ ██║ ██║ ██║███████╗██║ ██║██████╔╝███████╗╚██████╔╝╚██████╗██║ ██╗ | ||
// ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ | ||
// | ||
|
||
/** | ||
* @title ABClaim | ||
* @author anotherblock Technical Team | ||
* @notice anotherblock contract responsible for paying out royalties | ||
* | ||
*/ | ||
|
||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.18; | ||
|
||
/* Openzeppelin Contract */ | ||
import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; | ||
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | ||
|
||
/* anotherblock Libraries */ | ||
import {ABErrors} from "src/libraries/ABErrors.sol"; | ||
import {ABEvents} from "src/libraries/ABEvents.sol"; | ||
|
||
/* anotherblock Interfaces */ | ||
|
||
contract ABClaim is Initializable, AccessControlUpgradeable { | ||
// _____ __ __ | ||
// / ___// /_____ _/ /____ _____ | ||
// \__ \/ __/ __ `/ __/ _ \/ ___/ | ||
// ___/ / /_/ /_/ / /_/ __(__ ) | ||
// /____/\__/\__,_/\__/\___/____/ | ||
|
||
///@dev ABClaim implementation version | ||
uint8 public constant IMPLEMENTATION_VERSION = 1; | ||
|
||
// ______ __ __ | ||
// / ____/___ ____ _____/ /________ _______/ /_____ _____ | ||
// / / / __ \/ __ \/ ___/ __/ ___/ / / / ___/ __/ __ \/ ___/ | ||
// / /___/ /_/ / / / (__ ) /_/ / / /_/ / /__/ /_/ /_/ / / | ||
// \____/\____/_/ /_/____/\__/_/ \__,_/\___/\__/\____/_/ | ||
|
||
/** | ||
* @notice | ||
* Contract Constructor | ||
*/ | ||
/// @custom:oz-upgrades-unsafe-allow constructork | ||
constructor() { | ||
_disableInitializers(); | ||
} | ||
|
||
/** | ||
* @notice | ||
* Contract Initializer | ||
* | ||
* @param _publisher collection publisher address | ||
* @param _abDataRegistry anotherblock data registry contract address | ||
*/ | ||
function initialize(address _publisher, address _abDataRegistry) external initializer { | ||
// Initialize Access Control | ||
__AccessControl_init(); | ||
_grantRole(DEFAULT_ADMIN_ROLE, _publisher); | ||
_revokeRole(DEFAULT_ADMIN_ROLE, msg.sender); | ||
_grantRole(REGISTRY_ROLE, _abDataRegistry); | ||
|
||
// Assign the publisher address | ||
publisher = _publisher; | ||
} | ||
|
||
// ______ __ __ ______ __ _ | ||
// / ____/ __/ /____ _________ ____ _/ / / ____/_ ______ _____/ /_(_)___ ____ _____ | ||
// / __/ | |/_/ __/ _ \/ ___/ __ \/ __ `/ / / /_ / / / / __ \/ ___/ __/ / __ \/ __ \/ ___/ | ||
// / /____> </ /_/ __/ / / / / / /_/ / / / __/ / /_/ / / / / /__/ /_/ / /_/ / / / (__ ) | ||
// /_____/_/|_|\__/\___/_/ /_/ /_/\__,_/_/ /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/ | ||
|
||
// ____ __ ___ __ _ | ||
// / __ \____ / /_ __ / | ____/ /___ ___ (_)___ | ||
// / / / / __ \/ / / / / / /| |/ __ / __ `__ \/ / __ \ | ||
// / /_/ / / / / / /_/ / / ___ / /_/ / / / / / / / / / / | ||
// \____/_/ /_/_/\__, / /_/ |_\__,_/_/ /_/ /_/_/_/ /_/ | ||
// /____/ | ||
|
||
// ____ __ ____ _ __ | ||
// / __ \____ / /_ __ / __ \___ ____ _(_)____/ /________ __ | ||
// / / / / __ \/ / / / / / /_/ / _ \/ __ `/ / ___/ __/ ___/ / / / | ||
// / /_/ / / / / / /_/ / / _, _/ __/ /_/ / (__ ) /_/ / / /_/ / | ||
// \____/_/ /_/_/\__, / /_/ |_|\___/\__, /_/____/\__/_/ \__, / | ||
// /____/ /____/ /____/ | ||
|
||
// _ ___ ______ __ _ | ||
// | | / (_)__ _ __ / ____/_ ______ _____/ /_(_)___ ____ _____ | ||
// | | / / / _ \ | /| / / / /_ / / / / __ \/ ___/ __/ / __ \/ __ \/ ___/ | ||
// | |/ / / __/ |/ |/ / / __/ / /_/ / / / / /__/ /_/ / /_/ / / / (__ ) | ||
// |___/_/\___/|__/|__/ /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/ | ||
|
||
// ____ __ __ ______ __ _ | ||
// / _/___ / /____ _________ ____ _/ / / ____/_ ______ _____/ /_(_)___ ____ _____ | ||
// / // __ \/ __/ _ \/ ___/ __ \/ __ `/ / / /_ / / / / __ \/ ___/ __/ / __ \/ __ \/ ___/ | ||
// _/ // / / / /_/ __/ / / / / / /_/ / / / __/ / /_/ / / / / /__/ /_/ / /_/ / / / (__ ) | ||
// /___/_/ /_/\__/\___/_/ /_/ /_/\__,_/_/ /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/ | ||
} |