mirror of
https://github.com/vacp2p/staking-reward-streamer.git
synced 2026-01-07 22:43:53 -05:00
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
23 lines
654 B
Solidity
23 lines
654 B
Solidity
// 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);
|
|
}
|
|
}
|