Exemple #1
0
 def make_deploy_transaction(
         code: str, name: str, code_version: str, author: str, email: str,
         description: str, gas_price: int, gas_limit: int,
         payer: Union[str, bytes, Address]) -> DeployTransaction:
     tx = DeployTransaction(code, VmType.Neo, name, code_version, author,
                            email, description, gas_price, gas_limit, payer)
     return tx
Exemple #2
0
 def make_deploy_transaction(code_str: str, need_storage: bool, name: str,
                             code_version: str, author: str, email: str,
                             desp: str, payer: str, gas_limit: int,
                             gas_price: int):
     unix_time_now = int(time())
     deploy_tx = DeployTransaction()
     deploy_tx.payer = Address.b58decode(payer)
     deploy_tx.attributes = bytearray()
     deploy_tx.nonce = unix_time_now
     deploy_tx.code = bytearray.fromhex(code_str)
     deploy_tx.code_version = code_version
     deploy_tx.version = 0
     deploy_tx.need_storage = need_storage
     deploy_tx.name = name
     deploy_tx.author = author
     deploy_tx.email = email
     deploy_tx.gas_limit = gas_limit
     deploy_tx.gas_price = gas_price
     deploy_tx.description = desp
     return deploy_tx