class EtherDev::CLI
Public Instance Methods
deploy(filename, private_key = nil)
click to toggle source
# File lib/ether_dev/cli.rb, line 4 def deploy(filename, private_key = nil) config = YAML.load(File.open("config.yml"))["development"] || {} key = ::Eth::Key.new priv: (private_key || config["account_key"]) client = Ethereum::HttpClient.new(config["rpc"]) contract = Ethereum::Contract.create(file: "contracts/#{filename}", client: client) contract.key = key puts "Deploying contract..." contract.deploy_and_wait() puts "Deployed contract to #{contract.address}" end
new(project_name)
click to toggle source
# File lib/ether_dev/cli.rb, line 18 def new(project_name) require "ether_dev/generators/project_generator" generator = ProjectGenerator.new(project_name) generator.generate end