SUI+Move快速上手
Sui Move,一切以对象为核心。 官方文档: https://docs.sui.io/build 开发文档: https://examples.sui.io/1. 安装sui cli命令行工具$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui sui-node 2. 初始化测试环境,创建本地测试地址$ sui client $ sui client addresses 可以看到,sui的地址长度与以太坊相同,都是20个字节,与Aptos不同。3. 安装sui浏览器插件钱包在插件钱包页面上申请测试币。 https://chrome.google.com/webstore/detail/sui-wallet/opcgpfmipidbgpenhmajoajpbobppdilrequest devnet sui token在sui浏览器中查看钱包地址信息: https://explorer.devnet.sui.io/addresses/0xdd36d012f...
Hardhat部署和验证合约指南
1. 初始化新建一个新的目录,在新目录中执行:$ yarn add -D hardhat $ yarn hardhat init 按照提示,初始化语言选择JavaScript,并下载全部默认npm包。 将目录中的contracts目录清空,将自己的合约代码拷贝到contracts目录中。 (contracts内自带一个示例合约,可以结合它来看示例部署脚本和测试脚本)2. 编译部署在配置文件hardhat.config.js中,配置合约solidity版本和rpc信息,其中apiKey是用作浏览器验证时使用,如果不需要验证,可不用配置。accounts是一个数组,其中存放私钥数组。 如下所示:require("@nomicfoundation/hardhat-toolbox"); /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: { version: "0.4.26", settings: { optimizer: { enabled: true, runs: 2...
Aptos+Move->快速上手指南
1. 概述APTOS公链可视为Meta(原Facebook)Libra(后更名Diem)计划搁浅后的续篇。 今年1月底,Diem被Meta出售,一些核心成员出走,组建团队基于Diem的开源代码进行Aptos公链的开发。 其号称在理想状态下,每秒可处理16万笔交易。 链节点使用Rust语言开发。 链上智能合约的开发语言是Move,是 Diem 项目 专门为区块链开发的一种安全可靠的智能合约编程语言,其语法与Rust语言类似。2. 常用链接官网:https://aptoslabs.com/devnet浏览器:https://explorer.devnet.aptos.dev/ (浏览器搜索功能不好使,可以直接使用URL:https://explorer.devnet.aptos.dev/account/0x3e8bc3b97d4710c3cf1e89890756f7872ead687dbd4d9d4f9118b885bf81c5da )TypeScript SDK: https://www.npmjs.com/package/aptosMOVE语言教程:https://diem.g...
Web3 developer
SUI+Move快速上手
Sui Move,一切以对象为核心。 官方文档: https://docs.sui.io/build 开发文档: https://examples.sui.io/1. 安装sui cli命令行工具$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui sui-node 2. 初始化测试环境,创建本地测试地址$ sui client $ sui client addresses 可以看到,sui的地址长度与以太坊相同,都是20个字节,与Aptos不同。3. 安装sui浏览器插件钱包在插件钱包页面上申请测试币。 https://chrome.google.com/webstore/detail/sui-wallet/opcgpfmipidbgpenhmajoajpbobppdilrequest devnet sui token在sui浏览器中查看钱包地址信息: https://explorer.devnet.sui.io/addresses/0xdd36d012f...
Hardhat部署和验证合约指南
1. 初始化新建一个新的目录,在新目录中执行:$ yarn add -D hardhat $ yarn hardhat init 按照提示,初始化语言选择JavaScript,并下载全部默认npm包。 将目录中的contracts目录清空,将自己的合约代码拷贝到contracts目录中。 (contracts内自带一个示例合约,可以结合它来看示例部署脚本和测试脚本)2. 编译部署在配置文件hardhat.config.js中,配置合约solidity版本和rpc信息,其中apiKey是用作浏览器验证时使用,如果不需要验证,可不用配置。accounts是一个数组,其中存放私钥数组。 如下所示:require("@nomicfoundation/hardhat-toolbox"); /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: { version: "0.4.26", settings: { optimizer: { enabled: true, runs: 2...
Aptos+Move->快速上手指南
1. 概述APTOS公链可视为Meta(原Facebook)Libra(后更名Diem)计划搁浅后的续篇。 今年1月底,Diem被Meta出售,一些核心成员出走,组建团队基于Diem的开源代码进行Aptos公链的开发。 其号称在理想状态下,每秒可处理16万笔交易。 链节点使用Rust语言开发。 链上智能合约的开发语言是Move,是 Diem 项目 专门为区块链开发的一种安全可靠的智能合约编程语言,其语法与Rust语言类似。2. 常用链接官网:https://aptoslabs.com/devnet浏览器:https://explorer.devnet.aptos.dev/ (浏览器搜索功能不好使,可以直接使用URL:https://explorer.devnet.aptos.dev/account/0x3e8bc3b97d4710c3cf1e89890756f7872ead687dbd4d9d4f9118b885bf81c5da )TypeScript SDK: https://www.npmjs.com/package/aptosMOVE语言教程:https://diem.g...
Web3 developer

Subscribe to lolieatapple

Subscribe to lolieatapple
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
In this step-by-step tutorial, we will help you deploy Avax on Tencent Cloud.
Go to the Console page, Select the Cloud Virtual Machine in the below.
Note: If you have not created an Tencent Cloud account, create one first. For more information, see sign up with Tencent Cloud.

Select a good region of instance. (Not in China).

Click the Buy Now button.

In the Basic configurations step, configure parameters and click Next.

Select an Ubuntu 20.04 64bit Image for OS.


As the official hardware requirement, you’d better select CPU 8core, RAM 16GB, disk: 1TB.
In the Networking step, configure the public IP address and bandwidth settings, as shown in the following figure. And we should open the 9651 port in firewall for avax node.
Click create & security group.


Add a 9651 port rule for avalanche node.

Click Ok Button. and then click Add rule button.

Add an inbound rule for 9651 port as below: TCP:9651

Remove other ports except 22, 80, 443, and 9651 port.

Back to the creation page, select the Existing security group and select the group we created right now.

click create a new one.

Click New in Pop up window.

Input a custom name for pair key, and click OK to download the .pem file to localhost.

After create key pair, back to the instance creation page and select it.

In the Preview step, read and select the I have read and agree to Tencent Cloud Terms of Service. Then, click Enable.

Get public IP address of instance.

Use the following command to login into cloud server.
chmod 400 /PathTo/YourPemFile.pem
ssh -i /PathTo/YourPemFile.pem ubuntu@YourInstanceIPAddress

If you want to download a pre-built binary instead of building it yourself, go to our releases page, and select the release you want (probably the latest one.)
https://github.com/ava-labs/avalanchego/releases
Under Assets, select the appropriate file.
For Ubuntu on Tencent cloud :
Download: avalanchego-linux-amd64-<VERSION>.tar.gz

you can right click the item and copy the URL for download it in your server.
use the following command to download and unzip it.
wget https://github.com/ava-labs/avalanchego/releases/download/v1.9.5/avalanchego-linux-amd64-v1.9.5.tar.gz
tar -xzf ./avalanchego-linux-amd64-v1.9.5.tar.gz
The resulting folder, avalanchego-v1.9.1, contains the binaries.

If you are using the pre-built binaries on Linux:
./avalanchego-v1.9.1/avalanchego By default (without specifying any parameters), this node will connect to the Mainnet which may take much longer time to finish bootstrapping. See this for connecting to Fuji Testnet.
Make sure your 9651 port is open to public

When the node starts, it has to bootstrap (catch up with the rest of the network). You will see logs about bootstrapping. When a given chain is done bootstrapping, it prints logs like this:
[09-09|17:01:45.295] INFO <C Chain> snowman/transitive.go:392 consensus starting {"lastAcceptedBlock": "2qaFwDJtmCCbMKP4jRpJwH8EFws82Q2yC1HhWgAiy3tGrpGFeb"}
[09-09|17:01:46.199] INFO <P Chain> snowman/transitive.go:392 consensus starting {"lastAcceptedBlock": "2ofmPJuWZbdroCPEMv6aHGvZ45oa8SBp2reEm9gNxvFjnfSGFP"}
[09-09|17:01:51.628] INFO <X Chain> avalanche/transitive.go:334 consensus starting {"lenFrontier": 1}
This will take time to initialize, make sure the eta time is getting smaller.

To check if a given chain is done bootstrapping, in another terminal window call info.isBootstrapped by copying and pasting the following command:
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"info.isBootstrapped",
"params": {
"chain":"X"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
If this returns true, the chain is bootstrapped; otherwise, it returns false. If you make other API calls to a chain that is not done bootstrapping, it will return API call rejected because chain is not done bootstrapping. If you are still experiencing issues please contact us on Discord.
Your node is running and connected now. If you want to use your node as a validator on the main net, check out this tutorial to find out how to add your node as a validator using the web wallet.
You can use Ctrl + C to kill the node.
To be able to make API calls to your node from other machines, when starting up the node include argument --http-host= (e.g. ./build/avalanchego --http-host=)
To connect to the Fuji Testnet instead of the Mainnet, use argument --network-id=fuji. You can get funds on the Testnet from the faucet.
./avalanchego-v1.9.1/avalanchego --network-id=fuji
If you want to run your avax node in the background, let it not close after you close the terminal. You can use one of the follow ways as you wish:
run node with nohup command;
run node with pm2;
run node in a screen tools;
nohup and screen are delivered with ubuntu, and pm2 needs to be installed by yourself.
In this step-by-step tutorial, we will help you deploy Avax on Tencent Cloud.
Go to the Console page, Select the Cloud Virtual Machine in the below.
Note: If you have not created an Tencent Cloud account, create one first. For more information, see sign up with Tencent Cloud.

Select a good region of instance. (Not in China).

Click the Buy Now button.

In the Basic configurations step, configure parameters and click Next.

Select an Ubuntu 20.04 64bit Image for OS.


As the official hardware requirement, you’d better select CPU 8core, RAM 16GB, disk: 1TB.
In the Networking step, configure the public IP address and bandwidth settings, as shown in the following figure. And we should open the 9651 port in firewall for avax node.
Click create & security group.


Add a 9651 port rule for avalanche node.

Click Ok Button. and then click Add rule button.

Add an inbound rule for 9651 port as below: TCP:9651

Remove other ports except 22, 80, 443, and 9651 port.

Back to the creation page, select the Existing security group and select the group we created right now.

click create a new one.

Click New in Pop up window.

Input a custom name for pair key, and click OK to download the .pem file to localhost.

After create key pair, back to the instance creation page and select it.

In the Preview step, read and select the I have read and agree to Tencent Cloud Terms of Service. Then, click Enable.

Get public IP address of instance.

Use the following command to login into cloud server.
chmod 400 /PathTo/YourPemFile.pem
ssh -i /PathTo/YourPemFile.pem ubuntu@YourInstanceIPAddress

If you want to download a pre-built binary instead of building it yourself, go to our releases page, and select the release you want (probably the latest one.)
https://github.com/ava-labs/avalanchego/releases
Under Assets, select the appropriate file.
For Ubuntu on Tencent cloud :
Download: avalanchego-linux-amd64-<VERSION>.tar.gz

you can right click the item and copy the URL for download it in your server.
use the following command to download and unzip it.
wget https://github.com/ava-labs/avalanchego/releases/download/v1.9.5/avalanchego-linux-amd64-v1.9.5.tar.gz
tar -xzf ./avalanchego-linux-amd64-v1.9.5.tar.gz
The resulting folder, avalanchego-v1.9.1, contains the binaries.

If you are using the pre-built binaries on Linux:
./avalanchego-v1.9.1/avalanchego By default (without specifying any parameters), this node will connect to the Mainnet which may take much longer time to finish bootstrapping. See this for connecting to Fuji Testnet.
Make sure your 9651 port is open to public

When the node starts, it has to bootstrap (catch up with the rest of the network). You will see logs about bootstrapping. When a given chain is done bootstrapping, it prints logs like this:
[09-09|17:01:45.295] INFO <C Chain> snowman/transitive.go:392 consensus starting {"lastAcceptedBlock": "2qaFwDJtmCCbMKP4jRpJwH8EFws82Q2yC1HhWgAiy3tGrpGFeb"}
[09-09|17:01:46.199] INFO <P Chain> snowman/transitive.go:392 consensus starting {"lastAcceptedBlock": "2ofmPJuWZbdroCPEMv6aHGvZ45oa8SBp2reEm9gNxvFjnfSGFP"}
[09-09|17:01:51.628] INFO <X Chain> avalanche/transitive.go:334 consensus starting {"lenFrontier": 1}
This will take time to initialize, make sure the eta time is getting smaller.

To check if a given chain is done bootstrapping, in another terminal window call info.isBootstrapped by copying and pasting the following command:
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"info.isBootstrapped",
"params": {
"chain":"X"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
If this returns true, the chain is bootstrapped; otherwise, it returns false. If you make other API calls to a chain that is not done bootstrapping, it will return API call rejected because chain is not done bootstrapping. If you are still experiencing issues please contact us on Discord.
Your node is running and connected now. If you want to use your node as a validator on the main net, check out this tutorial to find out how to add your node as a validator using the web wallet.
You can use Ctrl + C to kill the node.
To be able to make API calls to your node from other machines, when starting up the node include argument --http-host= (e.g. ./build/avalanchego --http-host=)
To connect to the Fuji Testnet instead of the Mainnet, use argument --network-id=fuji. You can get funds on the Testnet from the faucet.
./avalanchego-v1.9.1/avalanchego --network-id=fuji
If you want to run your avax node in the background, let it not close after you close the terminal. You can use one of the follow ways as you wish:
run node with nohup command;
run node with pm2;
run node in a screen tools;
nohup and screen are delivered with ubuntu, and pm2 needs to be installed by yourself.
No activity yet