一种以太坊发布智能合约时指定地址的方法技术

技术编号:20003917 阅读:59 留言:0更新日期:2019-01-05 17:10
本发明专利技术公开了一种以太坊发布智能合约时指定地址的方法,包括:根据交易需求创建智能合约;在创建的智能合约参数中添加一个标志位attach;将创建的智能合约利用以太坊发布到区块链中;区块链中的节点通过attach判断发布的智能合约是否是指定地址的智能合约,若attach的标志位为1,则表示该智能合约为指定地址的智能合约,其地址在参数to中给出,若attach的标志位为0或者没有attach标志位,则表示该智能合约不是指定地址的智能合约,其地址由系统自动生成。本发明专利技术通过在智能合约中指定发布地址,可以直接发出以智能合约签名的交易,也能直接管理智能合约的余额。

A Method of Designating Address when Isaifang Publishes Intelligent Contracts

The invention discloses a method for specifying an address when ETF publishes an intelligent contract, including: creating an intelligent contract according to the transaction requirements; adding a flag bit attach to the parameters of the created intelligent contract; publishing the created intelligent contract to the block chain using ETF; and judging whether the intelligent contract issued by the nodes in the block chain is an intelligent contract with a specified address through attachment. If the attach's flag bit is 1, it means the intelligent contract with the specified address, whose address is given in the parameter to. If the attach's flag bit is 0 or there is no attach flag bit, it means that the intelligent contract is not the intelligent contract with the specified address, and its address is automatically generated by the system. By specifying a publishing address in an intelligent contract, the invention can directly issue transactions signed by an intelligent contract and directly manage the balance of the intelligent contract.

【技术实现步骤摘要】
一种以太坊发布智能合约时指定地址的方法
本专利技术涉及区块链
,尤其涉及一种以太坊发布智能合约时指定地址的方法。
技术介绍
智能合约是一套数字形式定义的承诺,对数字资产进行控制并规定了合约参与者的权利与义务,智能合约由计算机系统自动执行,智能合约的执行过程就是对数据的处理过程。本质上讲,智能合约就是使用计算机系统中如果-则(if-then)的方式与真实世界的财产进行交互。虽然智能合约概念提出较早,但是由于缺乏能够支持智能合约特性的系统或者技术,智能合约的目标难以实现。以太坊是一种区块链实现方案,智能合约是以太坊上的可执行代码,通常使用truffle进行智能合约的开发。其中truffle是以太坊一种开发框架。区块链(Blockchain)是比特币的一个重要概念,区块链是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了过去十分钟内所有比特币网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。该概念在中本聪的白皮书中提出,中本聪持有第一个区块,即"创世区块"。区块链的最新技术应用:脱胎于2008年出现的比特币技术,它提供了一种去中心化的、无需信任积累的信用建立范本文档来自技高网...

【技术保护点】
1.一种以太坊发布智能合约时指定地址的方法,其特征在于:包括:根据交易需求创建智能合约;在创建的智能合约参数中添加一个标志位attach;将创建的智能合约利用以太坊发布到区块链中;区块链中的节点通过attach判断发布的智能合约是否是指定地址的智能合约,若attach的标志位为1,则表示该智能合约为指定地址的智能合约,其地址在参数to中给出,若attach的标志位为0或者没有attach标志位,则表示该智能合约不是指定地址的智能合约,其地址由系统自动生成。

【技术特征摘要】
1.一种以太坊发布智能合约时指定地址的方法,其特征在于:包括:根据交易需求创建智能合约;在创建的智能合约参数中添加一个标志位attach;将创建的智能合约利用以太坊发布到区块链中;区块链中的节点通过attach判断发布的智能合约是否是指定地址的智能合约,若attach的标志位为1,则表示该智能合约为指定地址的智能合约,其地址在参数to中给出,若attach的标志位为0或者没有attach标志位,则表示该智能合约不是指定地址的智能合约,其地址由系统自动生成。2.根据权利要求1所述的一种以太坊发布智能合约时指定地址的方法,其特征在于:所述智能合约需要签名,在签名过程中,会根据唯一交易编码生成对应的私钥...

【专利技术属性】
技术研发人员:陈晋飞胡振生陈华毅王旭
申请(专利权)人:夸克链科技深圳有限公司
类型:发明
国别省市:广东,44

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1