mirror of
https://github.com/vacp2p/staking-reward-streamer.git
synced 2026-01-08 23:08:19 -05:00
feat: implement KarmaTiers
This commit introduces a new contract `KarmaTiers` that allows for maintaing tiers for gasless transactions. The owner of the contract can add tiers, update tiers and deactivate or activate them. Tier names can only be 32 bytes long and there's no overlap allowed between min and max Karma bounds of the tiers. Closes #216
This commit is contained in:
22
script/DeployKarmaTiers.s.sol
Normal file
22
script/DeployKarmaTiers.s.sol
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
import { BaseScript } from "./Base.s.sol";
|
||||
import { DeploymentConfig } from "./DeploymentConfig.s.sol";
|
||||
|
||||
import { KarmaTiers } from "../src/KarmaTiers.sol";
|
||||
|
||||
contract DeployKarmaTiersScript is BaseScript {
|
||||
function run() public returns (KarmaTiers, DeploymentConfig) {
|
||||
DeploymentConfig deploymentConfig = new DeploymentConfig(broadcaster);
|
||||
(address deployer,) = deploymentConfig.activeNetworkConfig();
|
||||
|
||||
vm.startBroadcast(deployer);
|
||||
|
||||
KarmaTiers karmaTiers = new KarmaTiers();
|
||||
|
||||
vm.stopBroadcast();
|
||||
|
||||
return (karmaTiers, deploymentConfig);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user