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

Make task manager upgradeable #56

Merged
merged 1 commit into from
Aug 8, 2024
Merged
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
7 changes: 6 additions & 1 deletion SmartContracts/src/avs/PreconfTaskManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import {IPreconfServiceManager} from "../interfaces/IPreconfServiceManager.sol";
import {IRegistryCoordinator} from "eigenlayer-middleware/interfaces/IRegistryCoordinator.sol";
import {IIndexRegistry} from "eigenlayer-middleware/interfaces/IIndexRegistry.sol";
import {ECDSA} from "openzeppelin-contracts/utils/cryptography/ECDSA.sol";
import {IERC20} from "openzeppelin-contracts/token/ERC20/IERC20.sol";
import {Initializable} from "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol";

contract PreconfTaskManager is IPreconfTaskManager {
contract PreconfTaskManager is IPreconfTaskManager, Initializable {
IPreconfServiceManager internal immutable preconfServiceManager;
IRegistryCoordinator internal immutable registryCoordinator;
IIndexRegistry internal immutable indexRegistry;
Expand Down Expand Up @@ -59,8 +61,11 @@ contract PreconfTaskManager is IPreconfTaskManager {
indexRegistry = _indexRegistry;
taikoL1 = _taikoL1;
beaconBlockRootContract = _beaconBlockRootContract;
}

function initialize(IERC20 _taikoToken) external initializer {
nextBlockId = 1;
_taikoToken.approve(address(taikoL1), type(uint256).max);
}

/**
Expand Down