예제 #1
0
파일: prepare.py 프로젝트: CBobRobison/DAO
 def compile_contract(self, contract_name):
     if self.args.no_limits and contract_name == "DAO.sol":
         contract_path = edit_dao_source(
             self.args.contracts_dir,
             False,  # keep limits
             self.args.min_proposal_debate,
             self.args.min_split_debate,
             True,  # halve min quorum test, remove year limit
             self.args.split_execution_period,
             True,  # Normal pricing
             True,  # Don't edit creationGracePeriod
         )
     else:
         contract_path = os.path.join(
             self.args.contracts_dir,
             contract_name
         )
     print("    Compiling {}...".format(contract_path))
     data = subprocess.check_output([
         self.args.solc,
         contract_path,
         "--optimize",
         "--combined-json",
         "abi,bin"
     ])
     return json.loads(data)
예제 #2
0
 def compile_contract(self, contract_name):
     if self.args.no_limits:
         contract_path = edit_dao_source(self.args.contracts_dir, False,
                                         True)
     else:
         contract_path = os.path.join(self.args.contracts_dir,
                                      contract_name)
     print("    Compiling {}...".format(contract_path))
     data = subprocess.check_output([
         self.args.solc, contract_path, "--optimize", "--combined-json",
         "abi,bin"
     ])
     return json.loads(data)
예제 #3
0
 def compile_contract(self, contract_name):
     if self.args.no_limits and contract_name == "DAO.sol":
         contract_path = edit_dao_source(
             self.args.contracts_dir,
             False,  # keep limits
             self.args.min_proposal_debate,
             self.args.min_split_debate,
             True,  # halve min quorum test, remove year limit
             self.args.split_execution_period,
             True,  # Normal pricing
             True,  # Don't edit creationGracePeriod
         )
     else:
         contract_path = os.path.join(self.args.contracts_dir,
                                      contract_name)
     print("    Compiling {}...".format(contract_path))
     data = subprocess.check_output([
         self.args.solc, contract_path, "--optimize", "--combined-json",
         "abi,bin"
     ])
예제 #4
0
파일: prepare.py 프로젝트: FelixA/DAO
 def compile_contract(self, contract_name):
     if self.args.no_limits:
         contract_path = edit_dao_source(
             self.args.contracts_dir,
             False,
             True
         )
     else:
         contract_path = os.path.join(
             self.args.contracts_dir,
             contract_name
         )
     print("    Compiling {}...".format(contract_path))
     data = subprocess.check_output([
       self.args.solc,
       contract_path,
       "--optimize",
       "--combined-json",
       "abi,bin"
     ])
     return json.loads(data)