github项目地址
git clone https://github.com/generEOS/eostoolkit.git
package.json
"eosjs": "^15.0.1"
npm install
npm start
Attach Identity
修改eostoolkit\src\scatter-client.jsx,修改host,port,chainId为我们测试网络对应的参数
eostoolkit\src\scatter-client.jsx
host,port,chainId
const httpNetwork = { blockchain:'eos', host:'192.168.1.112', // ( or null if endorsed chainId ) port:8888, // ( or null if defaulting to 80 ) chainId:"cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f", // Or null to fetch automatically ( takes longer ) }
修改 network为httpNetwork
network
httpNetwork
connectIdentity() { this.state.scatter.getIdentity({accounts:[{chainId:httpNetwork.chainId, blockchain:httpNetwork.blockchain}]}).then(() => { console.log('Attach Identity'); console.log(this.state.scatter.identity); this.setState({identity: window.scatter.identity}); }).catch(error => { console.error(error); console.error(chainId:httpNetwork.chainId); }); }
Select Identity
Accept
此处只举查看账号信息的例子,其余的自行测试 在Lookup Accounts输入Enter Account Name 查询账户 dapp.exec1 点击Search
Lookup Accounts
Enter Account Name
Search
I wrote it down
Start Basic Setup
要想Scatter对一个EOS网络支持的网站,能够进行转账等操作权限,需要进行以下配置
cleos get info
Key Pairs
New
Import
Use Selected Account
Scatter 在测试网络中与Dapp交互使用
首先将Scatter 项目源代码clone到本地
git clone https://github.com/EOSEssentials/Scatter
首先安装好nodejs环境,在此目录执行 npm install安装项目依赖,依赖安装完成后,执行npm run build即可编译出build目录,里面的文件与目录下scatter.zip(此为当前源代码之前编译完成的)文件功能相同。
npm run build
Chrome 浏览器地址栏打开chrome://extensions/,点击打开LOAD UNPACKED,选择scatter.zip解压目录,或者编译生成的build目录。即可完成扩展的安装
chrome://extensions/
LOAD UNPACKED
打开Chrome Store地址:(Go to Chrome Store) 点击添加至CHROME,允许安装即可自动完成
相关推荐: Scatter的使用及添加测试网络相关设置 Scatter 在测试网络中与Dapp交互使用
cd eos_source_dir/build sudo make install