-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create ArtgenePlatform global config (#100)
* create ArtgenePlatform global config * move proxy implementation address to constants * check contract not empty before setting * update vanity deployer * update salt * move free functions to artgene utils * cleanup code * platform: add vanity constant, rename methods * remove utils * platform: transfer ownership after deploy * add task hh accounts * platform: check that it's deployed to correct address * platform: deploy to mainnet * deploy to mainnet
- Loading branch information
Showing
10 changed files
with
377 additions
and
31 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
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
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
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,59 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
import "@openzeppelin/contracts/utils/StorageSlot.sol"; | ||
|
||
import "./interfaces/IArtgenePlatform.sol"; | ||
|
||
contract ArtgenePlatform is Ownable, IArtgenePlatform { | ||
|
||
uint256 platformFee; // in bps | ||
address payable platformAddress; | ||
|
||
constructor() { | ||
require( | ||
ARTGENE_PLATFORM_ADDRESS == address(this), | ||
"ArtgenePlatformConfig: platform address mismatch" | ||
); | ||
|
||
platformFee = 500; | ||
platformAddress = payable(0x704C043CeB93bD6cBE570C6A2708c3E1C0310587); | ||
} | ||
|
||
function setPlatformFee(uint256 _platformFee) public onlyOwner { | ||
require( | ||
_platformFee <= 1000, | ||
"ArtgenePlatformConfig: platform fee cannot be more than 10%" | ||
); | ||
|
||
platformFee = _platformFee; | ||
} | ||
|
||
function setPlatformAddress( | ||
address payable _platformAddress | ||
) public onlyOwner { | ||
platformAddress = _platformAddress; | ||
} | ||
|
||
function getPlatformFee() external view override returns (uint256) { | ||
return platformFee; | ||
} | ||
|
||
function getPlatformAddress() | ||
external | ||
view | ||
override | ||
returns (address payable) | ||
{ | ||
return platformAddress; | ||
} | ||
|
||
function getPlatformInfo() | ||
external | ||
view | ||
returns (uint256, address payable) | ||
{ | ||
return (platformFee, platformAddress); | ||
} | ||
} |
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
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,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
address constant ARTGENE_PLATFORM_ADDRESS = 0xAaaeEee77ED0D0ffCc2813333b796E367f1E12d9; | ||
|
||
interface IArtgenePlatform { | ||
function getPlatformFee() external view returns (uint256); | ||
function getPlatformAddress() external view returns (address payable); | ||
|
||
function getPlatformInfo() external view returns (uint256, address payable); | ||
|
||
function setPlatformFee(uint256 _platformFee) external; | ||
function setPlatformAddress(address payable _platformAddress) external; | ||
} |
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
Oops, something went wrong.