Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Emissions alignment with expected schedule #20

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/contracts/envs/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function createLocalConfig() {
EMISSIONS_VOTE_2_EARN_ALLOCATION_DECAY_PERIOD: 50, // every 50 cycles
EMISSIONS_TREASURY_PERCENTAGE: 2500, // 25% of the emissions go to the treasury
EMISSIONS_MAX_VOTE_2_EARN_DECAY_PERCENTAGE: 80,
EMISSIONS_IS_NOT_ALIGNED: true,

X_ALLOCATION_VOTING_QUORUM_PERCENTAGE: 40, // 40 -> Need 40% of total supply to succeed
X_ALLOCATION_VOTING_VOTING_THRESHOLD: BigInt("1000000000000000000"), // 1 vote
Expand Down
1 change: 1 addition & 0 deletions config/contracts/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type ContractsConfig = {
EMISSIONS_VOTE_2_EARN_ALLOCATION_DECAY_PERIOD: number
EMISSIONS_TREASURY_PERCENTAGE: number
EMISSIONS_MAX_VOTE_2_EARN_DECAY_PERCENTAGE: number
EMISSIONS_IS_NOT_ALIGNED: boolean

X_ALLOCATION_VOTING_QUORUM_PERCENTAGE: number
X_ALLOCATION_VOTING_VOTING_THRESHOLD: bigint
Expand Down
77 changes: 52 additions & 25 deletions contracts/Emissions.sol

Large diffs are not rendered by default.

707 changes: 707 additions & 0 deletions contracts/deprecated/V1/EmissionsV1.sol

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions contracts/deprecated/V1/interfaces/IB3TR.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;

interface IB3TR {
error AccessControlBadConfirmation();

error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

error ERC20ExceededCap(uint256 increasedSupply, uint256 cap);

error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

error ERC20InvalidApprover(address approver);

error ERC20InvalidCap(uint256 cap);

error ERC20InvalidReceiver(address receiver);

error ERC20InvalidSender(address sender);

error ERC20InvalidSpender(address spender);

error EnforcedPause();

error ExpectedPause();

event Approval(address indexed owner, address indexed spender, uint256 value);

event Paused(address account);

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

event Transfer(address indexed from, address indexed to, uint256 value);

event Unpaused(address account);

function DEFAULT_ADMIN_ROLE() external view returns (bytes32);

function MINTER_ROLE() external view returns (bytes32);

function allowance(address owner, address spender) external view returns (uint256);

function approve(address spender, uint256 value) external returns (bool);

function balanceOf(address account) external view returns (uint256);

function cap() external view returns (uint256);

function decimals() external view returns (uint8);

function getRoleAdmin(bytes32 role) external view returns (bytes32);

function grantRole(bytes32 role, address account) external;

function hasRole(bytes32 role, address account) external view returns (bool);

function mint(address to, uint256 amount) external;

function name() external view returns (string memory);

function pause() external;

function paused() external view returns (bool);

function renounceRole(bytes32 role, address callerConfirmation) external;

function revokeRole(bytes32 role, address account) external;

function supportsInterface(bytes4 interfaceId) external view returns (bool);

function symbol() external view returns (string memory);

function tokenDetails() external view returns (string memory, string memory, uint8, uint256, uint256);

function totalSupply() external view returns (uint256);

function transfer(address to, uint256 value) external returns (bool);

function transferFrom(address from, address to, uint256 value) external returns (bool);

function unpause() external;
}
Loading
Loading