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: Add a timelock to the xMPL migration function (SC-4848) #4

Merged
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
26 changes: 25 additions & 1 deletion contracts/interfaces/IXMPL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,34 @@ import { IRevenueDistributionToken } from "../../modules/revenue-distribution-to

interface IXMPL is IRevenueDistributionToken {

/**************/
/*** Events ***/
/**************/

event MigrationCancelled();

event MigrationPerformed(uint256 amount);

event MigrationScheduled(address from, address to, address migrator);

/********************************/
/*** Administrative Functions ***/
/********************************/

function migrateAll(address migrator_, address newToken_) external;
function cancelMigration() external;

function performMigration(address migrator_, address newAsset_) external;

function scheduleMigration(address migrator_, address newAsset) external;

/**********************/
/*** View Functions ***/
/**********************/

function migrationHash() external view returns (bytes32 migrationHash_);

function migrationScheduled() external view returns (uint256 migrationScheduled_);

function minimumDelay() external pure returns (uint256 minimumDelay_);

}
14 changes: 11 additions & 3 deletions contracts/test/accounts/Owner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ import { IXMPL } from "../../interfaces/IXMPL.sol";

contract xMPLOwner is Owner {

function xMPL_migrateAll(address xmpl_, address migrator_, address newToken_) external {
IXMPL(xmpl_).migrateAll(migrator_, newToken_);
function xMPL_cancelMigration(address xmpl_) external {
IXMPL(xmpl_).cancelMigration();
}

}
function xMPL_performMigration(address xmpl_, address migrator_, address newAsset_) external {
IXMPL(xmpl_).performMigration(migrator_, newAsset_);
}

function xMPL_scheduleMigration(address xmpl_, address migrator_, address newAsset_) external {
IXMPL(xmpl_).scheduleMigration(migrator_, newAsset_);
}

}
Loading