惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
N
News and Events Feed by Topic
Security Archives - TechRepublic
Security Archives - TechRepublic
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
H
Heimdal Security Blog
PCI Perspectives
PCI Perspectives
A
About on SuperTechFans
Forbes - Security
Forbes - Security
博客园 - 三生石上(FineUI控件)
博客园_首页
Vercel News
Vercel News
H
Hacker News: Front Page
WordPress大学
WordPress大学
Hacker News: Ask HN
Hacker News: Ask HN
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
News | PayPal Newsroom
T
Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
SecWiki News
SecWiki News
D
Docker
G
Google Developers Blog
L
LINUX DO - 最新话题
O
OpenAI News
S
Schneier on Security
AI
AI
T
The Exploit Database - CXSecurity.com
S
Security Affairs
I
Intezer
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Latest
Security Latest
博客园 - 司徒正美
Know Your Adversary
Know Your Adversary
爱范儿
爱范儿
T
Troy Hunt's Blog
L
LINUX DO - 热门话题

高金的博客

人机协作逆向:用 AI + Frida 打通微信 4.1.8 macOS 数据库密钥提取 情绪价值与求真:如何平衡与应对? friend_tech 第一笔交易只能买 1 个key? friend_tech 套利到底有多卷 无公网ip,无服务器实现内网穿透 植物挖矿 浏览器环境检测 加密、编码相关知识汇总 使用tensorflow识别验证码 POW与反爬虫 appium 安卓无法点击搜索框解决办法 知乎直播弹幕抓取与解析 知乎直播套利分析 1000刀+的羊毛在等你 如何创建一个完全匿名的EOS、ETH账号 如何通过技术手段证明"我"没有去过武汉 XUNTA 季度报告 玩游戏不如CX,JUSTGAME邀请分析(内附元数据) 程序员找对象聚合平台-xunta.today EOS 1.8 bidname的漏洞分析
如何在conflux上部署合约
Gao JIn · 2019-12-03 · via 高金的博客

编译合约

https://remix.ethereum.org/ 上面编写好合约

编译好了就可以拿到ABI 以及 Bytecode了.(后面用)

创建conflux 地址

有好几种方式,因为conflux地址是与eth兼容的,所以你可以直接使用你的eth地址

当然也可以使用官方的js,或者在线钱包

  1. 在线钱包

打开https://wallet.confluxscan.io/wallet就可以创建了

本地js创建(推荐,因为后面部署合约也需要用到

先下载github repo并初始化

1
2
3
git clone https://github.com/jin10086/confluxBuildContract.git
cd confluxBuildContract
npm install //初始化环境

创建钱包

直接执行 node createAccount.js 就创建好了

1
2
3
(base) ➜  confluxBuildContract git:(master) ✗ node createAccount.js
pub_key: 0xa17b63007bd491822306b3b8c793311e7a21e8de
priv_key: 0x0ac9e33baa5cc302785a7fa1ef8912ff34b492ad0d52c7d518fe80975191bbaa

领取测试代币

因为新地址是没有代币的,所以需要先领取

直接浏览器打开 https://wallet.confluxscan.io/faucet/dev/ask?address=你的pub_key

就可以领取了

部署合约

  1. deployContract.js里面的pub_key priv_key改成刚才生成的公钥以及私钥
  2. deployContract.js里面的abi bytecode改成在remix生成的
  3. 执行 node deployContract.js 就可以部署合约了

部署返回结果如下

1
2
(base) ➜  confluxBuildContract git:(master) ✗ node deployContract.js       
contract deployed. address: 0x26f9269a3d09c5d7ca7066445fc30ca91b9aa3bc

可以在http://www.confluxscan.io/ 上查看刚刚部署成功的合约


本文作者:高金
本文地址https://igaojin.me/2019/12/03/如何在conflux上部署合约/
版权声明:转载请注明出处!