import { patract , network } from "redspot" ; const { getContractFactory } = patract ; const { createSigner , keyring , api } = network ; async function run ( ) { await api . isReady ; const signer = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" ; const contractFactory = await getContractFactory ( "erc20" , signer ) ; const balance = await api . query . system . account ( signer ) ; console . log ( "Balance: " , balance . toHuman ( ) ) ; const contract = await contractFactory . deploy ( "new" , "1000000" , { gasLimit : "400000000000" , value : "1000 UNIT" , } ) ; console . log ( "" ) ; console . log ( "Deploy successfully. The contract address: " , contract . address . toString ( ) ) ; api . disconnect ( ) ; } run ( ) . catch ( ( err ) => { console . log ( err ) ; } ) ;