如何在 Everscale 区块链中部署智能合约并进行转账
How to deploy a smartcontract and make a transfer from it in Everscale blockchain
我找到了这个 quickstart 关于如何在本地进行操作的指南。但是没有关于如何将智能合约部署到开发网或主网的信息。
所以我更改了端点:
const client = new TonClient({
network: {
endpoints: ["https://net.ton.dev"]
}
})
根据评论,我删除了useGiver
:
// Request contract deployment funds form a local TON OS SE giver
// not suitable for other networks.
// Deploy `hello` contract.
await helloAcc.deploy(/*{ useGiver: true }*/);
并收到此错误消息:
Account does not exist. You need to transfer funds to this account first to have a positive balance and then deploy its code
如何为我的账户注资,有没有类似airdrop
的自动方法?
您需要先计算出目标链上的合约地址,然后将其打赏至1 EVER,部署成功。
所需的gas量取决于合约代码,但永远不能超过1。
现在 net.ton.dev 中没有自动捐赠者。但是你可以从这里获取rubins:faucet.extraton.io你也可以自己在这个测试网络中创建自动给予者。
我们添加了一些关于如何在开发者网络中部署和配置您自己的提供者的指南。请检查它们:
使用 everdev 工具与 devnet 一起工作 - https://github.com/tonlabs/everdev/blob/main/docs/work_with_devnet.md
在 AppKit 中配置 giver - https://tonlabs.gitbook.io/appkit-js/guides/custom_giver
我找到了这个 quickstart 关于如何在本地进行操作的指南。但是没有关于如何将智能合约部署到开发网或主网的信息。
所以我更改了端点:
const client = new TonClient({
network: {
endpoints: ["https://net.ton.dev"]
}
})
根据评论,我删除了useGiver
:
// Request contract deployment funds form a local TON OS SE giver
// not suitable for other networks.
// Deploy `hello` contract.
await helloAcc.deploy(/*{ useGiver: true }*/);
并收到此错误消息:
Account does not exist. You need to transfer funds to this account first to have a positive balance and then deploy its code
如何为我的账户注资,有没有类似airdrop
的自动方法?
您需要先计算出目标链上的合约地址,然后将其打赏至1 EVER,部署成功。
所需的gas量取决于合约代码,但永远不能超过1。
现在 net.ton.dev 中没有自动捐赠者。但是你可以从这里获取rubins:faucet.extraton.io你也可以自己在这个测试网络中创建自动给予者。
我们添加了一些关于如何在开发者网络中部署和配置您自己的提供者的指南。请检查它们:
使用 everdev 工具与 devnet 一起工作 - https://github.com/tonlabs/everdev/blob/main/docs/work_with_devnet.md
在 AppKit 中配置 giver - https://tonlabs.gitbook.io/appkit-js/guides/custom_giver