CharacterSale
Inherits: ICharacterSale, LinearVRGDA, Character, Ownable
State Variables
usdc
address public immutable usdc;
chainId
uint256 public immutable chainId;
nrChains
uint256 public immutable nrChains;
totalSold
uint256 public totalSold;
startTime
uint256 public immutable startTime = block.timestamp;
gameController
address public gameController;
gameControllerFeePercentage
uint256 public gameControllerFeePercentage;
Functions
constructor
constructor(
IBank bank_,
IItem item_,
address military_,
address boss_,
address lzEndpoint_,
address usdc_,
uint8 chainId_,
uint8 nrChains_,
uint8 gameControllerFeePercentage_
) Character(bank_, item_, lzEndpoint_, military_, boss_) LinearVRGDA(10e18, 0.31e18, 10e18);
buy
function buy(
address from_,
uint256 usdcSent_,
uint256 validAfter_,
uint256 validBefore_,
bytes32 nonce_,
Signature calldata signature_,
string memory tokenURI_
) external override returns (uint256 mintedId_);
changeGameController
function changeGameController(address gameController_) external override onlyOwner;
changeGameControllerFeePercentage
function changeGameControllerFeePercentage(uint256 gameControllerFeePercentage_) external override onlyOwner;
sendUsdcToBankAndGameController
function sendUsdcToBankAndGameController() public override;
getPrice
function getPrice() external view override returns (uint256 price_);