1
- import consola from 'consola'
2
1
import yargs , { Argv } from 'yargs'
3
2
4
3
import { sendTransaction } from '../../network'
5
4
import { loadEnv , CLIArgs , CLIEnvironment } from '../../env'
6
-
7
- const logger = consola . create ( { } )
5
+ import { logger } from '../../logging'
8
6
9
7
export const createProposal = async ( cli : CLIEnvironment , cliArgs : CLIArgs ) : Promise < void > => {
10
8
const id = cliArgs . id
11
9
const votes = cliArgs . votes
12
10
const metadata = cliArgs . metadata
13
11
const resolution = cliArgs . resolution
14
- const governance = cli . contracts . Governance
12
+ const governance = cli . contracts . GraphGovernance
15
13
16
14
logger . info ( `Creating proposal ${ id } ...` )
17
15
await sendTransaction ( cli . wallet , governance , 'createProposal' , [ id , votes , metadata , resolution ] )
@@ -22,7 +20,7 @@ export const upgradeProposal = async (cli: CLIEnvironment, cliArgs: CLIArgs): Pr
22
20
const votes = cliArgs . votes
23
21
const metadata = cliArgs . metadata
24
22
const resolution = cliArgs . resolution
25
- const governance = cli . contracts . Governance
23
+ const governance = cli . contracts . GraphGovernance
26
24
27
25
logger . info ( `Upgrade proposal ${ id } ...` )
28
26
await sendTransaction ( cli . wallet , governance , 'upgradeProposal' , [
0 commit comments