[英]Why does the deployment of smart contracts on the private Ethereum blockchain need to consume gas fee, while the invocation does not?
Why does the deployment of smart contracts on the private Ethereum chain need to consume gasoline, while the invocation does not?为什么在私有以太坊链上部署智能合约需要消耗gas,而调用不需要?
When you're deploying a contract, you're sending a transaction , effectively storing the contract bytecode in the network.当你部署一个合约时,你正在发送一个交易,有效地将合约字节码存储在网络中。 All transactions cost gas fees as a reward for the miner/validator who executes it and publishes it to the network.
所有交易都需要支付 gas 费用,作为对执行交易并将其发布到网络的矿工/验证者的奖励。
When you're invoking a contract function, you can do it two ways:当您调用合约 function 时,您可以通过两种方式进行:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.