@@ -31,6 +31,7 @@ import type { EvmNtt, EvmNttWormholeTranceiver } from "@wormhole-foundation/sdk-
31
31
import type { EvmChains } from "@wormhole-foundation/sdk-evm" ;
32
32
import { getAvailableVersions , getGitTagName } from "./tag" ;
33
33
import * as configuration from "./configuration" ;
34
+ import { ethers } from "ethers" ;
34
35
35
36
// TODO: contract upgrades on solana
36
37
// TODO: set special relaying?
@@ -947,8 +948,13 @@ async function deployEvm<N extends Network, C extends Chain>(
947
948
const rpc = ch . config . rpc ;
948
949
const specialRelayer = "0x63BE47835c7D66c4aA5B2C688Dc6ed9771c94C74" ; // TODO: how to configure this?
949
950
951
+ const provider = new ethers . JsonRpcProvider ( rpc ) ;
952
+ const abi = [ "function decimals() external view returns (uint8)" ] ;
953
+ const tokenContract = new ethers . Contract ( token , abi , provider ) ;
954
+ const decimals : number = await tokenContract . decimals ( ) ;
955
+
950
956
// TODO: should actually make these ENV variables.
951
- const sig = "run(address,address,address,address,uint8)" ;
957
+ const sig = "run(address,address,address,address,uint8,uint8 )" ;
952
958
const modeUint = mode === "locking" ? 0 : 1 ;
953
959
const signer = await getSigner ( ch , signerType ) ;
954
960
const signerArgs = forgeSignerArgs ( signer . source ) ;
@@ -975,7 +981,7 @@ async function deployEvm<N extends Network, C extends Chain>(
975
981
execSync ( `
976
982
forge script --via-ir script/DeployWormholeNtt.s.sol \
977
983
--rpc-url ${ rpc } \
978
- --sig "${ sig } " ${ wormhole } ${ token } ${ relayer } ${ specialRelayer } ${ modeUint } \
984
+ --sig "${ sig } " ${ wormhole } ${ token } ${ relayer } ${ specialRelayer } ${ decimals } ${ modeUint } \
979
985
--broadcast ${ verifyArgs . join ( ' ' ) } ${ signerArgs } | tee last-run.stdout` , {
980
986
cwd : `${ pwd } /evm` ,
981
987
encoding : 'utf8' ,
0 commit comments