编译器
0.8.20+commit.a1b79de6
文件 1 的 26:Actions.sol
pragma solidity ^0.8.17;
uint64 constant DAILY_EPOCH_DURATION = 1 days;
uint64 constant DAILY_EPOCH_OFFSET = 0 hours;
uint64 constant HOURLY_EPOCH_DURATION = 1 hours;
uint64 constant NO_OFFSET = 0 hours;
uint256 constant ACTION_LOCK = 101;
uint256 constant ACTION_ADVENTURER_HOMAGE = 1001;
uint256 constant ACTION_ADVENTURER_BATTLE_V3 = 1002;
uint256 constant ACTION_ADVENTURER_COLLECT_EPOCH_REWARDS = 1003;
uint256 constant ACTION_ADVENTURER_VOID_CRAFTING = 1004;
uint256 constant ACTION_ADVENTURER_REALM_CRAFTING = 1005;
uint256 constant ACTION_ADVENTURER_ANIMA_REGENERATION = 1006;
uint256 constant ACTION_ADVENTURER_BATTLE_V3_OPPONENT = 1007;
uint256 constant ACTION_ADVENTURER_TRAINING = 1008;
uint256 constant ACTION_ADVENTURER_TRANSCENDENCE = 1009;
uint256 constant ACTION_ADVENTURER_MINT_MULTIPASS = 1010;
uint256 constant ACTION_ARMORY_STAKE_RARITY_ITEM = 2001;
uint256 constant ACTION_ARMORY_UNSTAKE_RARITY_ITEM = 2002;
uint256 constant ACTION_ARMORY_STAKE_RARITY_ITEM_SHARD = 2011;
uint256 constant ACTION_ARMORY_UNSTAKE_RARITY_ITEM_SHARD = 2012;
uint256 constant ACTION_ARMORY_STAKE_MATERIAL_SHARD = 2021;
uint256 constant ACTION_ARMORY_UNSTAKE_MATERIAL_SHARD = 2022;
uint256 constant ACTION_ARMORY_STAKE_LAB = 2031;
uint256 constant ACTION_ARMORY_UNSTAKE_LAB = 2032;
uint256 constant ACTION_ARMORY_STAKE_COLLECTIBLE = 2041;
uint256 constant ACTION_ARMORY_UNSTAKE_COLLECTIBLE = 2042;
uint256 constant ACTION_ARMORY_STAKE_MATERIAL = 2051;
uint256 constant ACTION_ARMORY_UNSTAKE_MATERIAL = 2052;
uint256 constant ACTION_ARMORY_STAKE_CITY = 2061;
uint256 constant ACTION_ARMORY_UNSTAKE_CITY = 2062;
uint256 constant ACTION_ARMORY_STAKE_MONUMENT = 2071;
uint256 constant ACTION_ARMORY_UNSTAKE_MONUMENT = 2072;
uint256 constant ACTION_ARMORY_STAKE_ANIMA_CHAMBER = 2081;
uint256 constant ACTION_ARMORY_UNSTAKE_ANIMA_CHAMBER = 2082;
uint256 constant ACTION_ANIMA_STAKING_COLLECT_STAKER_REWARDS = 2083;
uint256 constant ACTION_ANIMA_STAKING_COLLECT_REALMER_REWARDS = 2084;
uint256 constant ACTION_REALM_COLLECT_COLLECTIBLES = 4001;
uint256 constant ACTION_REALM_BUILD_LAB = 4011;
uint256 constant ACTION_REALM_BUILD_MONUMENT = 4012;
uint256 constant ACTION_REALM_BUILD_CITY = 4013;
文件 2 的 26:ArrayUtils.sol
pragma solidity ^0.8.17;
library ArrayUtils {
error ArrayLengthMismatch(uint _length1, uint _length2);
error InvalidArrayOrder(uint index);
function ensureSameLength(uint _l1, uint _l2) internal pure {
if (_l1 != _l2) {
revert ArrayLengthMismatch(_l1, _l2);
}
}
function ensureSameLength(uint _l1, uint _l2, uint _l3) internal pure {
ensureSameLength(_l1, _l2);
ensureSameLength(_l1, _l3);
}
function ensureSameLength(
uint _l1,
uint _l2,
uint _l3,
uint _l4
) internal pure {
ensureSameLength(_l1, _l2);
ensureSameLength(_l1, _l3);
ensureSameLength(_l1, _l4);
}
function ensureSameLength(
uint _l1,
uint _l2,
uint _l3,
uint _l4,
uint _l5
) internal pure {
ensureSameLength(_l1, _l2);
ensureSameLength(_l1, _l3);
ensureSameLength(_l1, _l4);
ensureSameLength(_l1, _l5);
}
function checkAddressesForDuplicates(
address[] memory _tokenAddrs
) internal pure {
address lastAddress;
for (uint i = 0; i < _tokenAddrs.length; i++) {
if (lastAddress > _tokenAddrs[i]) {
revert InvalidArrayOrder(i);
}
lastAddress = _tokenAddrs[i];
}
}
function checkForDuplicates(uint[] memory _ids) internal pure {
uint lastId;
for (uint i = 0; i < _ids.length; i++) {
if (lastId > _ids[i]) {
revert InvalidArrayOrder(i);
}
lastId = _ids[i];
}
}
function checkForDuplicates(
address[] memory _tokenAddrs,
uint[] memory _tokenIds
) internal pure {
address lastAddress;
int256 lastTokenId = -1;
for (uint i = 0; i < _tokenAddrs.length; i++) {
if (_tokenAddrs[i] > lastAddress) {
lastTokenId = -1;
}
if (_tokenAddrs[i] < lastAddress || int(_tokenIds[i]) <= lastTokenId) {
revert InvalidArrayOrder(i);
}
lastAddress = _tokenAddrs[i];
lastTokenId = int(_tokenIds[i]);
}
}
function toSingleValueDoubleArray(
uint[] memory _vals
) internal pure returns (uint[][] memory result) {
result = new uint[][](_vals.length);
for (uint i = 0; i < _vals.length; i++) {
result[i] = ArrayUtils.toMemoryArray(_vals[i], 1);
}
}
function toMemoryArray(
uint _value,
uint _length
) internal pure returns (uint[] memory result) {
result = new uint[](_length);
for (uint i = 0; i < _length; i++) {
result[i] = _value;
}
}
function toMemoryArray(
uint[] calldata _value
) internal pure returns (uint[] memory result) {
result = new uint[](_value.length);
for (uint i = 0; i < _value.length; i++) {
result[i] = _value[i];
}
}
function toMemoryArray(
address _address,
uint _length
) internal pure returns (address[] memory result) {
result = new address[](_length);
for (uint i = 0; i < _length; i++) {
result[i] = _address;
}
}
function toMemoryArray(
address[] calldata _addresses
) internal pure returns (address[] memory result) {
result = new address[](_addresses.length);
for (uint i = 0; i < _addresses.length; i++) {
result[i] = _addresses[i];
}
}
}
文件 3 的 26:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 4 的 26:Epoch.sol
pragma solidity ^0.8.17;
import "../lib/FloatingPointConstants.sol";
uint256 constant MASK_128 = ((1 << 128) - 1);
uint128 constant MASK_64 = ((1 << 64) - 1);
library Epoch {
function toEpochNumber(
uint256 _timestamp,
uint256 _duration,
uint256 _offset
) internal pure returns (uint256) {
return (_timestamp + _offset) / _duration;
}
function toEpochNumber(uint256 _timestamp, uint128 _config) internal pure returns (uint256) {
return (_timestamp + (_config & MASK_64)) / ((_config >> 64) & MASK_64);
}
function toEpochCompleteness(
uint256 _timestamp,
uint128 _config
) internal pure returns (uint256 result) {
result = (_config >> 64) & MASK_64;
result = (ONE_HUNDRED * ((_timestamp + (_config & MASK_64)) % result)) / result;
}
function epochToTimestamp(
uint256 _epoch,
uint128 _config
) internal pure returns (uint256 result) {
result = _epoch * ((_config >> 64) & MASK_64);
if (result > 0) {
result -= (_config & MASK_64);
}
}
function toConfig(uint64 _duration, uint64 _offset) internal pure returns (uint128) {
return (uint128(_duration) << 64) | uint128(_offset);
}
function packEpoch(uint256 _epochNumber, uint128 _config) internal pure returns (uint256) {
return (uint256(_config) << 128) | uint128(_epochNumber);
}
function packTimestampToEpoch(
uint256 _timestamp,
uint128 _config
) internal pure returns (uint256) {
return packEpoch(toEpochNumber(_timestamp, _config), _config);
}
function unpack(
uint256 _packedEpoch
) internal pure returns (uint256 epochNumber, uint128 config) {
config = uint128(_packedEpoch >> 128);
epochNumber = _packedEpoch & MASK_128;
}
}
文件 5 的 26:EpochConfigurable.sol
pragma solidity ^0.8.17;
import "./Epoch.sol";
import "../Manager/ManagerModifier.sol";
import "./IEpochConfigurable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract EpochConfigurable is Pausable, ManagerModifier, IEpochConfigurable {
uint128 public EPOCH_CONFIG;
constructor(
address _manager,
uint64 _epochDuration,
uint64 _epochOffset
) ManagerModifier(_manager) {
EPOCH_CONFIG = Epoch.toConfig(_epochDuration, _epochOffset);
}
function currentEpoch() public view returns (uint) {
return epochAtTimestamp(block.timestamp);
}
function epochAtTimestamp(uint _timestamp) public view returns (uint) {
return Epoch.toEpochNumber(_timestamp, EPOCH_CONFIG);
}
function pause() external onlyAdmin {
_pause();
}
function unpause() external onlyAdmin {
_unpause();
}
function updateEpochConfig(uint64 duration, uint64 offset) external onlyAdmin {
EPOCH_CONFIG = Epoch.toConfig(duration, offset);
}
}
文件 6 的 26:FloatingPointConstants.sol
pragma solidity ^0.8.17;
uint256 constant DECIMAL_POINT = 10 ** 3;
uint256 constant ROUNDING_ADJUSTER = DECIMAL_POINT - 1;
int256 constant SIGNED_DECIMAL_POINT = int256(DECIMAL_POINT);
uint256 constant ONE_HUNDRED = 100 * DECIMAL_POINT;
uint256 constant ONE_HUNDRED_SQUARE = ONE_HUNDRED * ONE_HUNDRED;
int256 constant SIGNED_ONE_HUNDRED = 100 * SIGNED_DECIMAL_POINT;
int256 constant SIGNED_ONE_HUNDRED_SQUARE = SIGNED_ONE_HUNDRED * SIGNED_ONE_HUNDRED;
int256 constant SIGNED_ZERO = 0;
文件 7 的 26:IActionPermit.sol
pragma solidity ^0.8.17;
error Unauthorized(address _tokenAddr, uint256 _tokenId);
error EntityLocked(address _tokenAddr, uint256 _tokenId, uint _lockedUntil);
error MinEpochsTooLow(uint256 _minEpochs);
error InsufficientEpochSpan(
uint256 _minEpochs,
uint256 _epochs,
address _tokenAddr,
uint256 _tokenId
);
error DuplicateActionAttempt(address _tokenAddr, uint256 _tokenId);
interface IActionPermit {
function checkAndMarkActionComplete(
address _sender,
address _tokenAddr,
uint256 _tokenId,
bytes32[] calldata _proof,
uint256 _action,
uint256 _minEpochs,
uint128 _epochConfig
) external;
function checkAndMarkActionCompleteMany(
address _sender,
address[] calldata _tokenAddrs,
uint256[] calldata _tokenIds,
bytes32[][] calldata _proofs,
uint256 _action,
uint256 _minEpochs,
uint128 _epochConfig
) external;
function checkAndMarkActionCompleteMany(
address _sender,
address[] calldata _tokenAddrs,
uint256[] calldata _tokenIds,
bytes32[][] calldata _proofs,
uint256 _action,
uint256[] calldata _minEpochs,
uint128 _epochConfig
) external;
function forceMarkActionComplete(address _tokenAddr, uint256 _tokenId, uint256 _action) external;
function checkPermissions(
address _sender,
address _tokenAddr,
uint256 _tokenId,
bytes32[] calldata _proof,
uint256 _action
) external view;
function checkOwner(
address _tokenAddr,
uint256 _tokenId,
bytes32[] calldata _proof
) external view returns (address);
function checkPermissionsMany(
address _sender,
address[] calldata _tokenAddr,
uint256[] calldata _tokenId,
bytes32[][] calldata _proofs,
uint256 _action
) external view;
function checkPermissionsMany(
address _sender,
address _tokenAddr,
uint256[] calldata _tokenId,
bytes32[][] calldata _proofs,
uint256 _action
) external view;
function checkOwnerBatch(
address[] calldata _tokenAddrs,
uint256[] calldata _tokenIds,
bytes32[][] calldata _proofs
) external view returns (address[] memory);
function checkIfEnoughEpochsElapsed(
address _tokenAddr,
uint256 _tokenId,
uint256 _action,
uint256 _minEpochs,
uint128 _epochConfig
) external view;
function checkIfEnoughEpochsElapsedBatch(
address[] calldata _tokenAddrs,
uint256[] calldata _tokenIds,
uint256 _action,
uint256 _minEpochs,
uint128 _epochConfig
) external view;
function checkIfEnoughEpochsElapsedBatch(
address[] calldata _tokenAddrs,
uint256[] calldata _tokenIds,
uint256 _action,
uint256[] calldata _minEpochs,
uint128 _epochConfig
) external view;
function getElapsedEpochs(
address[] calldata _tokenAddrs,
uint256[] calldata _tokenIds,
uint256 _action,
uint128 _epochConfig
) external view returns (uint[] memory result);
}
文件 8 的 26:IAnima.sol
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface IAnima is IERC20, IERC20Metadata {
function CAP() external view returns (uint256);
function mintFor(address _for, uint256 _amount) external;
function burnFrom(address account, uint256 amount) external;
}
文件 9 的 26:IArmory.sol
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../Manager/ManagerModifier.sol";
import "./IArmoryEntityStorageAdapter.sol";
struct MultiStakeRequest {
address _staker;
address[] _ownerAddresses;
uint256[] _ownerTokenIds;
bytes32[][] _proofs;
address[] _entityAddresses;
uint256[][][] _entityIds;
uint256[][][] _entityAmounts;
}
interface IArmory {
function adapters(
address _entityAddress
) external view returns (IArmoryEntityStorageAdapter);
function stake(
address _staker,
address _ownerAddress,
uint256 _ownerTokenId,
address _entityAddress,
bytes32[] calldata _proof,
uint256 _entityId,
uint256 _entityAmount
) external;
function stakeBatch(
address _staker,
address _ownerAddress,
uint256 _ownerTokenId,
bytes32[] calldata _proof,
address _entityAddress,
uint256[] calldata _entityIds,
uint256[] calldata _entityAmounts
) external;
function stakeBatch(
address _staker,
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
bytes32[][] calldata _proofs,
address _entityAddress,
uint256[][] calldata _entityIds,
uint256[][] calldata _entityAmounts
) external;
function stakeBatchMulti(MultiStakeRequest calldata _request) external;
function unstake(
address _staker,
address _ownerAddress,
uint256 _ownerTokenId,
bytes32[] calldata _proof,
address _entityAddress,
uint256 _entityId,
uint256 _entityAmount
) external;
function unstakeBatch(
address _staker,
address _ownerAddress,
uint256 _ownerTokenId,
bytes32[] calldata _proof,
address _entityAddress,
uint256[] calldata _entityIds,
uint256[] calldata _entityAmounts
) external;
function unstakeBatch(
address _staker,
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
bytes32[][] calldata _proofs,
address _entityAddress,
uint256[][] calldata _entityIds,
uint256[][] calldata _entityAmounts
) external;
function unstakeBatchMulti(MultiStakeRequest calldata _request) external;
function burn(
address _ownerAddress,
uint256 _ownerTokenId,
address _entityAddress,
uint256 _entityId,
uint256 _entityAmount
) external;
function burnBatch(
address _ownerAddress,
uint256 _ownerTokenId,
address _entityAddress,
uint256[] calldata _entityIds,
uint256[] calldata _entityAmounts
) external;
function burnBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
address _entityAddress,
uint256[][] calldata _entityIds,
uint256[][] calldata _entityAmounts
) external;
function burnBatchMulti(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
address[] calldata _entityAddresses,
uint256[][][] calldata _entityIds,
uint256[][][] calldata _entityAmounts
) external;
function mint(
address _ownerAddress,
uint256 _ownerTokenId,
address _entityAddress,
uint256 _entityId,
uint256 _entityAmount
) external;
function mintBatch(
address _ownerAddresses,
uint256 _ownerTokenIds,
address _entityAddress,
uint256[] calldata _entityIds,
uint256[] calldata _entityAmounts
) external;
function mintBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
address _entityAddress,
uint256[][] calldata _entityIds,
uint256[][] calldata _entityAmounts
) external;
function checkMinimumAmounts(
address _ownerAddresses,
uint256 _ownerTokenIds,
address _entityAddress,
uint256[] calldata _entityIds,
uint256[] calldata _entityAmounts
) external view;
function checkMinimumAmounts(
address _ownerAddresses,
uint256 _ownerTokenIds,
address _entityAddress,
uint256[] calldata _entityIds,
uint256 _entityAmounts
) external view;
function checkMinimumAmountsBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
address _entityAddress,
uint256[][] calldata _entityIds,
uint256[][] calldata _entityAmounts
) external view;
function checkMinimumAmountsBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerTokenIds,
address _entityAddress,
uint256[][] calldata _entityIds,
uint256 _entityAmount
) external view;
function balanceOf(
address _ownerAddress,
uint _ownerId,
address _entityAddress,
uint _entityTokenId
) external view returns (uint);
function balanceOfBatch(
address _ownerAddress,
uint _ownerId,
address _entityAddress,
uint[] memory _entityTokenIds
) external view returns (uint[] memory);
}
文件 10 的 26:IArmoryEntityStorageAdapter.sol
pragma solidity ^0.8.17;
interface IArmoryEntityStorageAdapter {
error Unauthorized(address _staker, address _ownerAddress, uint _ownerId);
error UnsupportedOperation(address _entityAddress, string operation);
error UnsupportedEntity(address _entityAddress);
error AlreadyStaked(
address _ownerAddress,
uint _ownerId,
address _entityAddress,
uint _entityId,
uint _tokenAmounts
);
error InsufficientAmountStaked(
address _ownerAddress,
uint _ownerId,
address _entityAddress,
uint _tokenIds,
uint _tokenAmounts
);
function entityType() external pure returns (uint);
function stake(
address _staker,
address _ownerAddress,
uint256 _ownerId,
bytes32[] calldata _proof,
address _entityAddress,
uint256 _entityTokenId,
uint256 _entityAmount
) external;
function stakeBatch(
address _staker,
address _ownerAddresses,
uint256 _ownerIds,
bytes32[] calldata _proof,
address _entityAddress,
uint256[] calldata _entityTokenIds,
uint256[] calldata _entityAmounts
) external;
function stakeBatch(
address _staker,
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
bytes32[][] calldata _proofs,
address _entityAddress,
uint256[][] calldata _entityTokenIds,
uint256[][] calldata _entityAmounts
) external;
function unstake(
address _staker,
address _ownerAddress,
uint256 _ownerId,
bytes32[] calldata _proof,
address _entityAddress,
uint256 _entityTokenId,
uint256 _entityAmount
) external;
function unstakeBatch(
address _staker,
address _ownerAddresses,
uint256 _ownerIds,
bytes32[] calldata _proof,
address _entityAddress,
uint256[] calldata _entityTokenIds,
uint256[] calldata _entityAmounts
) external;
function unstakeBatch(
address _staker,
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
bytes32[][] calldata _proofs,
address _entityAddress,
uint256[][] calldata _entityTokenIds,
uint256[][] calldata _entityAmounts
) external;
function burn(
address _ownerAddress,
uint256 _ownerId,
address _entityAddress,
uint256 _entityTokenId,
uint256 _entityAmount
) external;
function burnBatch(
address _ownerAddress,
uint256 _ownerId,
address _entityAddress,
uint256[] calldata _entityTokenIds,
uint256[] calldata _entityAmounts
) external;
function burnBatch(
address[] calldata _ownerAddress,
uint256[] calldata _ownerId,
address _entityAddress,
uint256[][] calldata _entityTokenIds,
uint256[][] calldata _entityAmounts
) external;
function mint(
address _ownerAddresses,
uint256 _ownerIds,
address _entityAddress,
uint256 _entityTokenId,
uint256 _entityAmount
) external;
function mintBatch(
address _ownerAddresses,
uint256 _ownerIds,
address _entityAddress,
uint256[] calldata _entityTokenIds,
uint256[] calldata _entityAmounts
) external;
function mintBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
address _entityAddress,
uint256[][] calldata _entityTokenIds,
uint256[][] calldata _entityAmounts
) external;
function batchCheckAmounts(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
address _entityAddress,
uint256[][] calldata _entityTokenIds,
uint256[][] calldata _entityAmounts
) external view;
function batchCheckAmounts(
address _ownerAddresses,
uint256 _ownerIds,
address _entityAddress,
uint256[] calldata _entityTokenIds,
uint256[] calldata _entityAmounts
) external view;
function batchCheckAmounts(
address _ownerAddresses,
uint256 _ownerIds,
address _entityAddress,
uint256[] calldata _entityTokenIds,
uint256 _entityAmounts
) external view;
function balanceOf(
address _ownerAddress,
uint _ownerIds,
address _entityAddress,
uint _entityTokenId
) external view returns (uint);
function balanceOfBatch(
address _ownerAddress,
uint _ownerIds,
address _entityAddress,
uint[] calldata _entityTokenIds
) external view returns (uint[] memory);
}
文件 11 的 26:IBattleBoost.sol
pragma solidity ^0.8.17;
interface IBattleBoost {
function getAnimaBase(address staker) external view returns (uint256);
}
文件 12 的 26:IBattlePowerScouter.sol
pragma solidity ^0.8.17;
import "../lib/SigmoidFunction.sol";
struct BattlePowerScan {
uint256 probability;
int256 attackerBase;
int256 attackerFinal;
uint256 attackerLevel;
int256 opponentBase;
int256 opponentFinal;
uint256 opponentLevel;
}
enum DataType {
BASE,
ADVANCED,
EXTENSION,
ACTIONS
}
struct LevelAdjustment {
uint32 levelThreshold;
uint32 adjustmentCoefficient;
uint32 reverseAdjustmentCoefficient;
}
struct PeripheralRestriction {
DataType requirementType;
uint32 requirementId;
uint32 value;
}
struct PeripheralAdditiveBonus {
DataType bonusType;
uint32 bonusId;
uint32 value;
PeripheralRestriction[] restrictions;
StatAffinity affinity;
}
struct PeripheralMultiplicativeBonus {
DataType baseStatType;
uint32 baseStatId;
DataType bonusType;
uint32 bonusId;
uint32 value;
PeripheralRestriction[] restrictions;
}
struct StatAffinity {
bool enabled;
uint16[6] baseStats;
int24[6] coefficient;
RangeConfig sigmoidRange;
}
struct BattleUtility {
bool enabled;
LevelAdjustment adjustment;
PeripheralAdditiveBonus[] additiveBonuses;
PeripheralMultiplicativeBonus[] multiplicativeBonuses;
}
interface IBattlePowerScouter {
function baseBattlePower(
address _adventurerAddr,
uint256 _adventurerId
) external returns (int256 battlePower, uint256 level);
function scanBattlePower(
uint _fightEpoch,
address _adventurerAddr,
uint256 _adventurerId,
address _opponentAddr,
uint256 _opponentId,
uint256[] calldata _params
) external returns (BattlePowerScan memory);
function invalidateCache(address _adventurerAddr, uint256 _adventurerId) external;
function invalidateCaches(
address[] calldata _adventurerAddr,
uint256[] calldata _adventurerId
) external;
}
文件 13 的 26:IBattleVersusV3.sol
pragma solidity ^0.8.20;
import "./IBattlePowerScouter.sol";
struct FightData {
address advAddress;
uint256 advTokenId;
address oppAddress;
uint256 oppTokenId;
uint256[] params;
BattlePowerScan scan;
uint256 attackerRenown;
uint256 defenderRenown;
}
struct FightRequest {
address[] advAddresses;
uint256[] advTokenIds;
uint256[][] addEquipmentToArmoryIds;
uint256[][] addEquipmentToArmoryAmounts;
uint256[][] equipmentIds;
bytes32[][] advProofs;
address[] oppAddresses;
uint256[] oppTokenIds;
bytes32[][] oppProofs;
uint256[] slots;
uint256[][] params;
}
struct FightResult {
uint adventurerLevel;
int adventurerBp;
uint opponentLevel;
int opponentBp;
uint rounds;
uint wins;
uint losses;
bool overallWin;
uint[] rolls;
uint probability;
uint nextRandomBase;
}
文件 14 的 26:IDurabilityEnabledArmory.sol
pragma solidity ^0.8.17;
import { IArmory } from "./IArmory.sol";
interface IDurabilityEnabledArmory is IArmory {
function durabilitySupport(
address _entityAddress
) external view returns (bool);
function currentDurability(
address _ownerAddress,
uint256 _ownerId,
address _entityAddress,
uint256 _entityId
) external view returns (uint);
function currentDurabilityBatch(
address _ownerAddress,
uint256 _ownerId,
address _entityAddress,
uint256[] calldata _entityId
) external view returns (uint[] memory);
function currentDurabilityBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
address _entityAddress,
uint256[][] calldata _entityIds
) external view returns (uint[][] memory);
function currentDurabilityBatchMulti(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
address[] calldata _entityAddress,
uint256[][][] calldata _entityIds
) external view returns (uint[][][] memory);
function currentDurabilityPercentage(
address _ownerAddress,
uint256 _ownerId,
address _entityAddress,
uint256 _entityId
) external view returns (uint);
function currentDurabilityPercentageBatch(
address _ownerAddress,
uint256 _ownerId,
address _entityAddress,
uint256[] calldata _entityId
) external view returns (uint[] memory);
function currentDurabilityPercentageBatch(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
address _entityAddress,
uint256[][] calldata _entityIds
) external view returns (uint[][] memory);
function currentDurabilityPercentageBatchMulti(
address[] calldata _ownerAddresses,
uint256[] calldata _ownerIds,
address[] calldata _entityAddress,
uint256[][][] calldata _entityIds
) external view returns (uint[][][] memory);
function reduceDurability(
address _ownerAddress,
uint _ownerTokenId,
address _ownedTokenAddress,
uint _ownedTokenId,
uint _durabilityLoss,
bool _startNewTokenIfNeeded,
bool _ignoreAvailability
) external;
function reduceDurabilityBatch(
address[] calldata _ownerAddresses,
uint[] calldata _ownerTokenIds,
address _ownedTokenAddress,
uint[][] calldata _ownedTokenIds,
uint durabilityLoss,
bool _startNewTokenIfNeeded,
bool _ignoreAvailability
) external;
function reduceDurabilityBatch(
address[] calldata _ownerAddresses,
uint[] calldata _ownerTokenIds,
address _entityAddress,
uint[][] calldata _entityTokenIds,
uint[][] calldata _durabilityLosses,
bool _startNewTokenIfNeeded,
bool _ignoreAvailability
) external;
function reduceDurabilityMultiBatch(
address[] calldata _ownerAddresses,
uint[] calldata _ownerTokenIds,
address[] calldata _ownedTokenAddresses,
uint[][][] calldata _ownedTokenIds,
uint _durabilityLoss,
bool _startNewTokenIfNeeded,
bool _ignoreAvailability
) external;
function reduceDurabilityMultiBatch(
address[] calldata _ownerAddresses,
uint[] calldata _ownerTokenIds,
address[] calldata _entityAddresses,
uint[][][] calldata _entityTokenIds,
uint[][][] calldata _durabilityLosses,
bool _startNewTokenIfNeeded,
bool _ignoreAvailability
) external;
}
文件 15 的 26:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
文件 16 的 26:IERC20Metadata.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 17 的 26:IEpochConfigurable.sol
pragma solidity ^0.8.17;
interface IEpochConfigurable {
function currentEpoch() external view returns (uint);
function epochAtTimestamp(uint _timestamp) external view returns (uint);
}
文件 18 的 26:IManager.sol
pragma solidity ^0.8.4;
interface IManager {
function isAdmin(address _addr) external view returns (bool);
function isManager(address _addr, uint256 _type) external view returns (bool);
function addManager(address _addr, uint256 _type) external;
function removeManager(address _addr, uint256 _type) external;
function addAdmin(address _addr) external;
function removeAdmin(address _addr) external;
}
文件 19 的 26:IPostBattleV3Hook.sol
pragma solidity ^0.8.17;
import "./IBattleVersusV3.sol";
interface IPostBattleV3Hook {
function postBattle(
address _owner,
FightRequest calldata _request,
uint[] calldata _levels
) external;
}
文件 20 的 26:IRenown.sol
pragma solidity ^0.8.17;
interface IRenown {
event RenownInitialized(address adventurerAddress, uint adventurerId, uint level, int baseAmount);
event RenownChange(address adventurerAddress, uint adventurerId, uint level, int delta);
function currentRenown(
address _tokenAddress,
uint256 _tokenId,
uint256 _level
) external view returns (int);
function currentRenowns(
address _tokenAddress1,
uint256 _tokenId1,
uint _level1,
address _tokenAddress2,
uint256 _tokenId2,
uint _level2
) external view returns (int, int);
function currentRenownBatch(
address[] calldata _tokenAddresses,
uint256[] calldata _tokenIds,
uint256[] calldata _levels
) external view returns (int[] memory);
function forceInitIfNeeded(
address _tokenAddress,
uint256 _tokenId,
uint _level
) external returns (int);
function change(address _tokenAddress, uint256 _tokenId, uint _level, int _delta) external;
function changeBatch(
address[] calldata _tokenAddresses,
uint256[] calldata _tokenIds,
uint256[] calldata _levels,
int[] calldata _deltas
) external;
function changeBatch(
address[] calldata _tokenAddresses,
uint256[] calldata _tokenIds,
uint256[] calldata _levels,
int _delta
) external;
}
文件 21 的 26:ITokenMinter.sol
pragma solidity ^0.8.17;
import "../Utils/IEpochConfigurable.sol";
uint constant MINTER_ADVENTURER_BUCKET = 1;
uint constant MINTER_REALM_BUCKET = 2;
uint constant MINTER_STAKER_BUCKET = 3;
interface ITokenMinter is IEpochConfigurable {
function getEpochValue(uint _epoch) external view returns (uint);
function getEpochValueBatch(
uint startEpoch,
uint endEpoch
) external view returns (uint[] memory result);
function getBucketEpochValueBatch(
uint _startEpoch,
uint _endEpoch,
uint _bucket
) external view returns (uint[] memory result);
function getEpochValueBatchTotal(
uint startEpoch,
uint endEpoch
) external view returns (uint result);
function getBucketEpochValueBatchTotal(
uint _startEpoch,
uint _endEpoch,
uint _bucket
) external view returns (uint result);
function mint(address _owner, uint _amount, uint _bucket) external;
}
文件 22 的 26:ManagerModifier.sol
pragma solidity ^0.8.4;
import "../Manager/IManager.sol";
abstract contract ManagerModifier {
IManager public immutable MANAGER;
constructor(address _manager) {
MANAGER = IManager(_manager);
}
modifier onlyAdmin() {
require(MANAGER.isAdmin(msg.sender), "Manager: Not an Admin");
_;
}
modifier onlyManager() {
require(MANAGER.isManager(msg.sender, 0), "Manager: Not manager");
_;
}
modifier onlyMinter() {
require(MANAGER.isManager(msg.sender, 1), "Manager: Not minter");
_;
}
modifier onlyTokenMinter() {
require(MANAGER.isManager(msg.sender, 2), "Manager: Not token minter");
_;
}
modifier onlyBinder() {
require(MANAGER.isManager(msg.sender, 3), "Manager: Not binder");
_;
}
modifier onlyConfigManager() {
require(MANAGER.isManager(msg.sender, 4), "Manager: Not config manager");
_;
}
modifier onlyTokenSpender() {
require(MANAGER.isManager(msg.sender, 5), "Manager: Not token spender");
_;
}
modifier onlyTokenEmitter() {
require(MANAGER.isManager(msg.sender, 6), "Manager: Not token emitter");
_;
}
modifier onlyPauser() {
require(
MANAGER.isAdmin(msg.sender) || MANAGER.isManager(msg.sender, 6),
"Manager: Not pauser"
);
_;
}
}
文件 23 的 26:Pausable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor() {
_paused = false;
}
modifier whenNotPaused() {
_requireNotPaused();
_;
}
modifier whenPaused() {
_requirePaused();
_;
}
function paused() public view virtual returns (bool) {
return _paused;
}
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
文件 24 的 26:PostBattleV3Hook.sol
pragma solidity ^0.8.17;
import "./IPostBattleV3Hook.sol";
import "../Manager/ManagerModifier.sol";
import "../Armory/IDurabilityEnabledArmory.sol";
import "../Action/Actions.sol";
import "../Action/IActionPermit.sol";
import "../Utils/ArrayUtils.sol";
import "../Utils/EpochConfigurable.sol";
import "../Renown/IRenown.sol";
import "../Anima/IAnima.sol";
import "./IBattleBoost.sol";
import "../ERC20/ITokenMinter.sol";
contract PostBattleV3Hook is IPostBattleV3Hook, EpochConfigurable {
error InvalidOpponent(address oppAddress, uint oppId);
event EmitAnimaRewards(
address _adventurerAddress,
uint _adventurerId,
uint _level,
int _renown,
uint _baseAnima,
uint _lpAnima
);
IDurabilityEnabledArmory public immutable ARMORY;
IActionPermit public immutable ACTION_PERMIT;
IRenown public immutable RENOWN;
ITokenMinter public immutable ANIMA_MINTER;
IBattleBoost public immutable BATTLE_BOOST;
address public immutable AOV;
address public immutable RARITY_ITEM_ADDRESS;
uint public immutable DURABILITY_LOSS;
uint public immutable MAX_EPOCHS_SINCE_FIGHT = 7;
uint public immutable IGNORED_EPOCHS_LIMIT = 5000;
uint public immutable BASE_ANIMA = 1.5 ether;
uint public immutable BASE_RENOWN = 100_000;
uint public immutable LP_BASE_RENOWN = 100_000;
int public immutable UPPER_RENOWN_CAP = 100_000_000;
constructor(
address _manager,
address _armory,
address _rarityItemAddress,
address _renown,
address _battleBoost,
address _actionPermit,
address _animaMinter,
address _aov,
uint _durabilityCost
) EpochConfigurable(_manager, 1 days, 0) {
ARMORY = IDurabilityEnabledArmory(_armory);
RARITY_ITEM_ADDRESS = _rarityItemAddress;
DURABILITY_LOSS = _durabilityCost;
RENOWN = IRenown(_renown);
ACTION_PERMIT = IActionPermit(_actionPermit);
BATTLE_BOOST = IBattleBoost(_battleBoost);
ANIMA_MINTER = ITokenMinter(_animaMinter);
AOV = _aov;
}
function postBattle(
address _owner,
FightRequest calldata _request,
uint[] calldata _levels
) external onlyManager {
ArrayUtils.checkForDuplicates(_request.advAddresses, _request.advTokenIds);
_verifyOpponentsAreInTheArena(_request);
ARMORY.reduceDurabilityBatch(
_request.advAddresses,
_request.advTokenIds,
RARITY_ITEM_ADDRESS,
_request.equipmentIds,
DURABILITY_LOSS,
true,
false
);
uint lpBase = BATTLE_BOOST.getAnimaBase(_owner);
int[] memory renown = RENOWN.currentRenownBatch(
_request.advAddresses,
_request.advTokenIds,
_levels
);
uint totalAnima = _calculateAnima(
_request.advAddresses,
_request.advTokenIds,
_levels,
renown,
lpBase
);
ANIMA_MINTER.mint(_owner, totalAnima, MINTER_ADVENTURER_BUCKET);
}
function _calculateAnima(
address[] calldata _addresses,
uint[] calldata _ids,
uint[] calldata _levels,
int[] memory _renown,
uint _lpBoost
) internal returns (uint totalAnima) {
uint base;
uint lp;
int renown;
for (uint i = 0; i < _addresses.length; i++) {
renown = _renown[i];
if (renown > UPPER_RENOWN_CAP) {
renown = UPPER_RENOWN_CAP;
}
if (renown > 0) {
base = (BASE_ANIMA * uint(renown)) / BASE_RENOWN;
if (_addresses[i] != AOV) {
base /= 5;
}
lp = (_lpBoost * uint(renown)) / BASE_RENOWN;
emit EmitAnimaRewards(
_addresses[i],
_ids[i],
_levels[i],
_renown[i],
base,
lp
);
totalAnima += base;
totalAnima += lp;
}
}
}
function _verifyOpponentsAreInTheArena(
FightRequest calldata _request
) internal view {
uint[] memory epochs = ACTION_PERMIT.getElapsedEpochs(
_request.oppAddresses,
_request.oppTokenIds,
ACTION_ADVENTURER_BATTLE_V3,
EPOCH_CONFIG
);
uint currentEpoch = currentEpoch();
for (uint i = 0; i < epochs.length; i++) {
if (
currentEpoch > epochs[i] &&
currentEpoch - epochs[i] > MAX_EPOCHS_SINCE_FIGHT
) {
revert InvalidOpponent(
_request.oppAddresses[i],
_request.oppTokenIds[i]
);
}
}
}
}
文件 25 的 26:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
}
文件 26 的 26:SigmoidFunction.sol
pragma solidity ^0.8.17;
import "./FloatingPointConstants.sol";
struct RangeConfig {
int24 leftCurveX;
int24 mid;
int24 rightCurveX;
}
struct SigmoidConfig {
int24 shiftY;
CurveConfig leftCurve;
CurveConfig rightCurve;
}
struct CurveConfig {
bool ascending;
int24 rangeY;
int24 yAdjustment;
int24 steepness;
int24 steepnessCoefficient;
}
library SigmoidFunction {
function calculate(
SigmoidConfig memory config,
RangeConfig memory range,
int x
) internal pure returns (int) {
if (x >= range.mid) {
return
_calculateCurve(config.rightCurve, int(range.rightCurveX), x - int(range.mid), -1) +
config.shiftY;
} else {
return
_calculateCurve(config.leftCurve, (range.leftCurveX), int(range.mid) - x, 1) +
config.shiftY;
}
}
function _calculateCurve(
CurveConfig memory config,
int rangeX,
int x,
int sign
) internal pure returns (int) {
if (!config.ascending) {
sign *= -1;
}
return
config.yAdjustment +
((SIGNED_ONE_HUNDRED +
((sign *
((rangeX * SIGNED_ONE_HUNDRED_SQUARE) /
(rangeX * SIGNED_ONE_HUNDRED + x * int(config.steepness)) -
SIGNED_ONE_HUNDRED)) * int(config.steepnessCoefficient)) /
SIGNED_ONE_HUNDRED) * int(config.rangeY)) /
SIGNED_ONE_HUNDRED;
}
}
{
"compilationTarget": {
"contracts/Battle/PostBattleV3Hook.sol": "PostBattleV3Hook"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_manager","type":"address"},{"internalType":"address","name":"_armory","type":"address"},{"internalType":"address","name":"_rarityItemAddress","type":"address"},{"internalType":"address","name":"_renown","type":"address"},{"internalType":"address","name":"_battleBoost","type":"address"},{"internalType":"address","name":"_actionPermit","type":"address"},{"internalType":"address","name":"_animaMinter","type":"address"},{"internalType":"address","name":"_aov","type":"address"},{"internalType":"uint256","name":"_durabilityCost","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"InvalidArrayOrder","type":"error"},{"inputs":[{"internalType":"address","name":"oppAddress","type":"address"},{"internalType":"uint256","name":"oppId","type":"uint256"}],"name":"InvalidOpponent","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_adventurerAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_adventurerId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_level","type":"uint256"},{"indexed":false,"internalType":"int256","name":"_renown","type":"int256"},{"indexed":false,"internalType":"uint256","name":"_baseAnima","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lpAnima","type":"uint256"}],"name":"EmitAnimaRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ACTION_PERMIT","outputs":[{"internalType":"contract IActionPermit","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ANIMA_MINTER","outputs":[{"internalType":"contract ITokenMinter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AOV","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ARMORY","outputs":[{"internalType":"contract IDurabilityEnabledArmory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_ANIMA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_RENOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BATTLE_BOOST","outputs":[{"internalType":"contract IBattleBoost","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DURABILITY_LOSS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EPOCH_CONFIG","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IGNORED_EPOCHS_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LP_BASE_RENOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER","outputs":[{"internalType":"contract IManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_EPOCHS_SINCE_FIGHT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RARITY_ITEM_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RENOWN","outputs":[{"internalType":"contract IRenown","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPPER_RENOWN_CAP","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"epochAtTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"components":[{"internalType":"address[]","name":"advAddresses","type":"address[]"},{"internalType":"uint256[]","name":"advTokenIds","type":"uint256[]"},{"internalType":"uint256[][]","name":"addEquipmentToArmoryIds","type":"uint256[][]"},{"internalType":"uint256[][]","name":"addEquipmentToArmoryAmounts","type":"uint256[][]"},{"internalType":"uint256[][]","name":"equipmentIds","type":"uint256[][]"},{"internalType":"bytes32[][]","name":"advProofs","type":"bytes32[][]"},{"internalType":"address[]","name":"oppAddresses","type":"address[]"},{"internalType":"uint256[]","name":"oppTokenIds","type":"uint256[]"},{"internalType":"bytes32[][]","name":"oppProofs","type":"bytes32[][]"},{"internalType":"uint256[]","name":"slots","type":"uint256[]"},{"internalType":"uint256[][]","name":"params","type":"uint256[][]"}],"internalType":"struct FightRequest","name":"_request","type":"tuple"},{"internalType":"uint256[]","name":"_levels","type":"uint256[]"}],"name":"postBattle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"duration","type":"uint64"},{"internalType":"uint64","name":"offset","type":"uint64"}],"name":"updateEpochConfig","outputs":[],"stateMutability":"nonpayable","type":"function"}]