Commit 4d59bf04 authored by smartcontracts's avatar smartcontracts Committed by GitHub

feat(ctp): install kovan faucet drip (#2884)

Installs a new Drippie drip to fund Tony's kovan faucet.
parent 861ae315
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { DrippieConfig } from '../../src' import { DrippieConfig, Time } from '../../src'
const config: DrippieConfig = { const config: DrippieConfig = {
TeleportrWithdrawal: { TeleportrWithdrawal: {
interval: 60 * 10, interval: 10 * Time.MINUTE,
dripcheck: 'CheckBalanceHigh', dripcheck: 'CheckBalanceHigh',
checkparams: { checkparams: {
target: '0x4821975ca220601c153d02353300d6ad34adc362', target: '0x4821975ca220601c153d02353300d6ad34adc362',
...@@ -21,7 +21,7 @@ const config: DrippieConfig = { ...@@ -21,7 +21,7 @@ const config: DrippieConfig = {
], ],
}, },
GelatoBalance: { GelatoBalance: {
interval: 60 * 60 * 24, interval: 1 * Time.DAY,
dripcheck: 'CheckGelatoLow', dripcheck: 'CheckGelatoLow',
checkparams: { checkparams: {
treasury: '0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c', treasury: '0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c',
......
import { ethers } from 'ethers'
import { DrippieConfig, Time } from '../../src'
const config: DrippieConfig = {
GelatoBalance: {
interval: 1 * Time.DAY,
dripcheck: 'CheckGelatoLow',
checkparams: {
treasury: '0x527a819db1eb0e34426297b03bae11F2f8B3A19E',
recipient: '0xc37f6a6c4AB335E20d10F034B90386E2fb70bbF5',
threshold: ethers.utils.parseEther('0.1'),
},
actions: [
{
target: '0x527a819db1eb0e34426297b03bae11F2f8B3A19E',
value: ethers.utils.parseEther('1'),
data: {
fn: 'depositFunds',
args: [
// receiver
'0xc37f6a6c4AB335E20d10F034B90386E2fb70bbF5',
// token
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
// amount
ethers.utils.parseEther('1'),
],
},
},
],
},
TonyOptimismKovanFaucet: {
interval: 1 * Time.WEEK,
dripcheck: 'CheckBalanceLow',
checkparams: {
target: '0xa8019d6F7bC3008a0a708A422f223Ccb21b61eAD',
threshold: ethers.utils.parseEther('20'),
},
actions: [
{
target: '0xa8019d6F7bC3008a0a708A422f223Ccb21b61eAD',
value: ethers.utils.parseEther('100'),
},
],
},
}
export default config
...@@ -26,6 +26,14 @@ export interface DrippieConfig { ...@@ -26,6 +26,14 @@ export interface DrippieConfig {
[name: string]: DripConfig [name: string]: DripConfig
} }
export enum Time {
SECOND = 1,
MINUTE = 60 * Time.SECOND,
HOUR = 60 * Time.MINUTE,
DAY = 24 * Time.HOUR,
WEEK = 7 * Time.DAY,
}
export const getDrippieConfig = async ( export const getDrippieConfig = async (
hre: HardhatRuntimeEnvironment hre: HardhatRuntimeEnvironment
): Promise<Required<DrippieConfig>> => { ): Promise<Required<DrippieConfig>> => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment