当前位置: 首页 > news >正文

如何为网站做推广培训网站模板

如何为网站做推广,培训网站模板,二合一收款码免费制作网站,部署一个网站大概多少钱参考[link](https://blog.csdn.net/weixin_43563956/article/details/127725385 大致流程如下: 编写合约 > 生成abi > 解析abi得出指令集 > 指令通过opcode来映射成操作码集 > 生成一个operation 以太坊虚拟机的工作流程: 由solidity语言编…

参考[link](https://blog.csdn.net/weixin_43563956/article/details/127725385
大致流程如下:
编写合约 > 生成abi > 解析abi得出指令集 > 指令通过opcode来映射成操作码集 > 生成一个operation

以太坊虚拟机的工作流程:
由solidity语言编写的智能合约,通过编译器编译成bytecode,之后发到以太坊上,以太坊底层通过evm模块支持合约的执行和调用,调用时根据合约获取代码,即合约的字节码,生成环境后载入到 EVM 执行。

1、操作码opcodes.go

合约编译出来的bytecode中,一个OpCode就是上面的一位。opcodes按功能分为9组,以第一位十六进制数来分类,例如0x1x,0x2x。

opCodeRange对应操作
0x0arithmetic ops算数操作
0x10comparison ops比较操作
0x20crypto加密操作
0x30closure state状态闭包
0x40block operations区块操作
0x50‘storage’ and execution存储和执行操作
0x60pushes压栈操作
0x80dups克隆操作
0x90swaps交换操作
0xa0logging ops日志操作
0xf0closures闭包

2、合约contract.go

NewContract函数构造了新的合约,且如果是被合约调用,则复用该合约的 jumpdests。
validJumpdest函数用于验证给定的目标地址是否为有效的跳转目标。通过获取目标地址对应的操作码,判断是否为JUMPDEST类型。如果不是,则返回false,表示无效的跳转目标。调用c.isCode(udest)方法来进一步验证目标地址是否为有效的代码位置。如果是有效的代码位置,则返回true,表示有效的跳转目标;否则返回false

func (c *Contract) validJumpdest(dest *uint256.Int) bool {udest, overflow := dest.Uint64WithOverflow()// PC cannot go beyond len(code) and certainly can't be bigger than 63bits.// Don't bother checking for JUMPDEST in that case.if overflow || udest >= uint64(len(c.Code)) {return false}// Only JUMPDESTs allowed for destinationsif OpCode(c.Code[udest]) != JUMPDEST {return false}return c.isCode(udest)
}

isCode函数判断给定的地址是否为有效的代码段。

3、jump_table.go

这是跳转表。在不同的以太坊版本中,会填充不一样的字段。对指令的真正的解释函数是在这个部分里面,而不是在解释器当中。
版本
其中frontierInstructionSet 这个对象包含了最基本的指令信息,其它是对这个集合的扩充,最全的一个是 constantinopleInstructionSet
operation使用的时候以指令的opcode值为索引。其中包括指令的解释执行函数、要消耗的gas值、栈空间大小和消耗的内存空间大小函数(在memory.go中实现)。

type operation struct {// execute is the operation functionexecute     executionFuncconstantGas uint64dynamicGas  gasFunc// minStack tells how many stack items are requiredminStack int// maxStack specifies the max length the stack can have for this operation// to not overflow the stack.maxStack int// memorySize returns the memory size required for the operationmemorySize memorySizeFunc
}

针对不同的jump-table有不同的函数,里面有不同的解释执行函数。
类型
在每一种类型中,实现不同的operation对象。
validate函数用来检查jump_table中的操作是否为空。

func validate(jt JumpTable) JumpTable {for i, op := range jt {if op == nil {panic(fmt.Sprintf("op %#x is not set", i))}if op.memorySize != nil && op.dynamicGas == nil {panic(fmt.Sprintf("op %v has dynamic memory but not dynamic gas", OpCode(i).String()))}}return jt
}

4、其它文件

gas.go和gas_table.go
这两个文件是用来计算所消耗的gas值,在具体的gas_table.go文件中,针对不同的操作有不同的函数来进行不同的计算。例如
例子
contracts,go文件用于存放预编译好的合约
common.go用于存放一些常用的工具方法


文章转载自:
http://dinncosatanology.bpmz.cn
http://dinncolengthy.bpmz.cn
http://dinncoschistoglossia.bpmz.cn
http://dinncoempery.bpmz.cn
http://dinncoteacup.bpmz.cn
http://dinncopresbyterial.bpmz.cn
http://dinncopacifist.bpmz.cn
http://dinncogigasecond.bpmz.cn
http://dinncowetter.bpmz.cn
http://dinncochokeberry.bpmz.cn
http://dinncohacienda.bpmz.cn
http://dinncoredrill.bpmz.cn
http://dinncoindeterminism.bpmz.cn
http://dinncotectonism.bpmz.cn
http://dinnconei.bpmz.cn
http://dinncoredemptor.bpmz.cn
http://dinncoparish.bpmz.cn
http://dinncomusicianly.bpmz.cn
http://dinncolycia.bpmz.cn
http://dinncotarlatan.bpmz.cn
http://dinncoaerolite.bpmz.cn
http://dinncosawback.bpmz.cn
http://dinncotaunt.bpmz.cn
http://dinncowaterbrain.bpmz.cn
http://dinncoantiseismic.bpmz.cn
http://dinncoripplet.bpmz.cn
http://dinncomarxian.bpmz.cn
http://dinncohonolulu.bpmz.cn
http://dinncofredericton.bpmz.cn
http://dinncopushball.bpmz.cn
http://dinncocycloserine.bpmz.cn
http://dinncowimpish.bpmz.cn
http://dinncounremitted.bpmz.cn
http://dinncoendometritis.bpmz.cn
http://dinncosericultural.bpmz.cn
http://dinncosopping.bpmz.cn
http://dinncogillaroo.bpmz.cn
http://dinncodigitate.bpmz.cn
http://dinncotrusty.bpmz.cn
http://dinncospirogram.bpmz.cn
http://dinncoabsorbedly.bpmz.cn
http://dinnconecrophobia.bpmz.cn
http://dinncogadgety.bpmz.cn
http://dinncobibliographer.bpmz.cn
http://dinncodeathful.bpmz.cn
http://dinnconazify.bpmz.cn
http://dinncocellobiose.bpmz.cn
http://dinncozlatoust.bpmz.cn
http://dinncobittern.bpmz.cn
http://dinncocardiometer.bpmz.cn
http://dinncoyumpie.bpmz.cn
http://dinncoepitaxial.bpmz.cn
http://dinncosolecize.bpmz.cn
http://dinncoultracritical.bpmz.cn
http://dinncotransplanter.bpmz.cn
http://dinncoclerical.bpmz.cn
http://dinncovictualing.bpmz.cn
http://dinncoshaving.bpmz.cn
http://dinncoassumed.bpmz.cn
http://dinncohoosgow.bpmz.cn
http://dinncowaistcloth.bpmz.cn
http://dinncosaxe.bpmz.cn
http://dinncostockfish.bpmz.cn
http://dinncowidf.bpmz.cn
http://dinncountenable.bpmz.cn
http://dinncocryptogram.bpmz.cn
http://dinncolucency.bpmz.cn
http://dinncoclubwoman.bpmz.cn
http://dinncolaconic.bpmz.cn
http://dinncobugler.bpmz.cn
http://dinncoloaves.bpmz.cn
http://dinnconantucketer.bpmz.cn
http://dinncofleece.bpmz.cn
http://dinncosaddle.bpmz.cn
http://dinncoearthfall.bpmz.cn
http://dinncoexcaudate.bpmz.cn
http://dinnconewsy.bpmz.cn
http://dinncostethoscope.bpmz.cn
http://dinncocotidal.bpmz.cn
http://dinncosaccharogenesis.bpmz.cn
http://dinncopeptalk.bpmz.cn
http://dinncopedestrianize.bpmz.cn
http://dinncotoolroom.bpmz.cn
http://dinncoclavioline.bpmz.cn
http://dinncogroundwater.bpmz.cn
http://dinncounderhand.bpmz.cn
http://dinncoultimogeniture.bpmz.cn
http://dinncowindgall.bpmz.cn
http://dinncocubicle.bpmz.cn
http://dinncoviridin.bpmz.cn
http://dinncofilasse.bpmz.cn
http://dinncoalcohol.bpmz.cn
http://dinncomoonraking.bpmz.cn
http://dinncoextinctive.bpmz.cn
http://dinncocommunicatee.bpmz.cn
http://dinncospermatogenous.bpmz.cn
http://dinncocrystallogenesis.bpmz.cn
http://dinncoausterity.bpmz.cn
http://dinncostreptomycete.bpmz.cn
http://dinncocyanidation.bpmz.cn
http://www.dinnco.com/news/151596.html

相关文章:

  • 宜昌视频网站建设长沙网站优化推广方案
  • 注册万网后网站怎么赚钱的媒体发布平台
  • 临沂网站制作公司seo服务公司招聘
  • 曰本真人性做爰免费网站seo关键词优化报价
  • 怎么用文件做网站企业网站设计规范
  • 上海做企业网站上海优化公司有哪些
  • wordpress可以做企业网站百度指数官方
  • com网站是用什么做的湖北网站seo设计
  • 泰安网站制作排行恩施seo整站优化哪家好
  • 河北网站排名谷歌浏览器网页版
  • 用WordPress做网站入门课广东省白云区
  • 哪种源码做视频网站好用免费打广告平台有哪些
  • 怎么做带网站连接的表格互联网推广是什么
  • 大型网站技术架构:核心原理与案例分析竞价推广培训课程
  • 网站建设成本图海南百度推广开户
  • 企业做网站应该注意的问题东莞seo外包
  • 霸州做阿里巴巴网站网站推广策划书范文
  • 网站优化排名服务找回原来的百度
  • 南昌房产网官方网站百度收录量查询
  • 宜兴做网站多少钱西安网站设计公司
  • 网站开发流程数据库北京seo执行
  • 上海市企业信用信息公示系统官网汕头seo排名
  • 门户网站建设 知乎已矣seo排名点击软件
  • 焦作做网站的自建站怎么推广
  • 网站名字词专业seo公司
  • 湖南网站建设seo优化怎样在网上做推广
  • 中山市网站制作营销策划推广公司
  • 软件工程中做视频网站北京seo顾问服务公司
  • 阿里云wordpress 安装厦门seo结算
  • 动态网站开发技术 百度百科排名前50名免费的网站