// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package generateId
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = abi.U256
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// GenerateIdABI is the input ABI used to generate the binding from.
const GenerateIdABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_id\",\"type\":\"bytes32\"}],\"name\":\"setId\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"id\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_id\",\"type\":\"bytes32\"}],\"name\":\"LogId\",\"type\":\"event\"}]"
// GenerateIdBin is the compiled bytecode used for deploying new contracts.
const GenerateIdBin = `608060405234801561001057600080fd5b507f300000000000000000000000000000000000000000000000000000000000000060008190555060fc806100466000396000f3fe60806040526004361060265760003560e01c806349bfcf0214602b578063af640d0f146056575b600080fd5b605460048036036020811015603f57600080fd5b8101908080359060200190929190505050607e565b005b348015606157600080fd5b50606860c1565b6040518082815260200191505060405180910390f35b806000819055507f2ec078554f30cba9aad72c89ddc37203c0e04df1058fa6c1959f5be52ca282d46000546040518082815260200191505060405180910390a150565b6000548156fea265627a7a72305820829398546dbcf67bba9333d3db024a17d501d25356086c9d9996672df12012af64736f6c63430005090032`
// DeployGenerateId deploys a new Ethereum contract, binding an instance of GenerateId to it.
func DeployGenerateId(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *GenerateId, error) {
parsed, err := abi.JSON(strings.NewReader(GenerateIdABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(GenerateIdBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &GenerateId{GenerateIdCaller: GenerateIdCaller{contract: contract}, GenerateIdTransactor: GenerateIdTransactor{contract: contract}, GenerateIdFilterer: GenerateIdFilterer{contract: contract}}, nil
}
// GenerateId is an auto generated Go binding around an Ethereum contract.
type GenerateId struct {
GenerateIdCaller // Read-only binding to the contract
GenerateIdTransactor // Write-only binding to the contract
GenerateIdFilterer // Log filterer for contract events
}
// GenerateIdCaller is an auto generated read-only Go binding around an Ethereum contract.
type GenerateIdCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// GenerateIdTransactor is an auto generated write-only Go binding around an Ethereum contract.
type GenerateIdTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// GenerateIdFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type GenerateIdFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// GenerateIdSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type GenerateIdSession struct {
Contract *GenerateId // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// GenerateIdCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type GenerateIdCallerSession struct {
Contract *GenerateIdCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// GenerateIdTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type GenerateIdTransactorSession struct {
Contract *GenerateIdTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// GenerateIdRaw is an auto generated low-level Go binding around an Ethereum contract.
type GenerateIdRaw struct {
Contract *GenerateId // Generic contract binding to access the raw methods on
}
// GenerateIdCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type GenerateIdCallerRaw struct {
Contract *GenerateIdCaller // Generic read-only contract binding to access the raw methods on
}
// GenerateIdTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type GenerateIdTransactorRaw struct {
Contract *GenerateIdTransactor // Generic write-only contract binding to access the raw methods on
}
// NewGenerateId creates a new instance of GenerateId, bound to a specific deployed contract.
func NewGenerateId(address common.Address, backend bind.ContractBackend) (*GenerateId, error) {
contract, err := bindGenerateId(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &GenerateId{GenerateIdCaller: GenerateIdCaller{contract: contract}, GenerateIdTransactor: GenerateIdTransactor{contract: contract}, GenerateIdFilterer: GenerateIdFilterer{contract: contract}}, nil
}
// NewGenerateIdCaller creates a new read-only instance of GenerateId, bound to a specific deployed contract.
func NewGenerateIdCaller(address common.Address, caller bind.ContractCaller) (*GenerateIdCaller, error) {
contract, err := bindGenerateId(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &GenerateIdCaller{contract: contract}, nil
}
// NewGenerateIdTransactor creates a new write-only instance of GenerateId, bound to a specific deployed contract.
func NewGenerateIdTransactor(address common.Address, transactor bind.ContractTransactor) (*GenerateIdTransactor, error) {
contract, err := bindGenerateId(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &GenerateIdTransactor{contract: contract}, nil
}
// NewGenerateIdFilterer creates a new log filterer instance of GenerateId, bound to a specific deployed contract.
func NewGenerateIdFilterer(address common.Address, filterer bind.ContractFilterer) (*GenerateIdFilterer, error) {
contract, err := bindGenerateId(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &GenerateIdFilterer{contract: contract}, nil
}
// bindGenerateId binds a generic wrapper to an already deployed contract.
func bindGenerateId(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(GenerateIdABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_GenerateId *GenerateIdRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interf
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
人工智能-项目实践-区块链-基于区块链(以太坊)的去中心化ID生成器 ID-Generator 一款基于区块链(以太坊)的ID生成器 An ID generator based on blockchain(Ethereum) 用法 按照conf/conf.yaml中的注释提示,修改conf/conf.yaml中的配置。 在urls.go中启动程序。 访问http://xxx.xxx.xxx.xxx:port/ids 获得Id的最大值。比如访问获得值为1000(取决于step的值),那么可用的Id范围为(1000-step+1) —— 1000,得出Id范围就是1 —— 1000。如果获得2000,那么同理你的可用Id范围为1001 —— 2000。Id生成的规律为step,2step,3step ..... n*step。
资源推荐
资源详情
资源评论
收起资源包目录
人工智能-项目实践-区块链-基于区块链(以太坊)的去中心化ID生成器.zip (23个子文件)
ID-Generator-master
utils
commonUtils.go 786B
fileUtils.go 1KB
logUtils.go 857B
redisUtil.go 1KB
ethUtils.go 6KB
.idea
thriftCompiler.xml 140B
vcs.xml 180B
workspace.xml 4KB
misc.xml 174B
modules.xml 276B
encodings.xml 135B
ID-Generator.iml 281B
Dockerfile-etherscan 250B
core
handler.go 1KB
urls.go 722B
logs
id_generate_log.log 0B
test
test.go 13B
conf
smartconrtact
generateId.sol 261B
abibinfiles
generateId_sol_GenerateId.bin 644B
generateId_sol_GenerateId.abi 485B
generateId.go 15KB
conf.yaml 1KB
start-etherparty.sh 82B
共 23 条
- 1
资源评论
博士僧小星
- 粉丝: 2214
- 资源: 5986
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- NOI 全国青少年信息学奥林匹克竞赛(官网)-2024.11.05.pdf
- 【Unity抢劫和犯罪题材的低多边形3D资源包】POLYGON Heist - Low Poly 3D Art
- 网络安全是一个广泛的领域,涉及的知识和技能非常多样.docx
- 用Python实现,PySide构建GUI界面的“井字棋”游戏 具备学习功能(源码)
- 系统测试报告模板 测试目的、测试依据、测试准备、测试内容、测试结果及分析、总结
- 雷柏2.4G无线鼠标键盘对码软件V3.1
- Python基础入门-待办事项列表.pdf
- 240301031刘炳炎咖啡网站导航.psd
- 数据集【YOLO目标检测】道路油污检测数据集 170 张,YOLO/VOC格式标注!
- 基于Robot FrameWork框架的自动化测试
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功