✏️
go-conflux-sdk
  • README
  • Quickstart
  • Getting Started
    • Run a Node locally
    • Interacting with a Node
    • Deploy and Interact with Smart Contracts
    • Subscription
  • Smart Contracts
    • Smart Contract Overview
    • Getting Started with Solidity
    • Compiling Solidity source code
    • Interacting with Smart Contracts
    • Application Binary Interface
    • Contracts Supported
  • Transactions
    • Conflux Transactions
    • Obtaining CFX
    • Gas & Storage Collateral
    • Account Manager
    • Transfer CFX
    • Transaction Nonce
    • Batch Call snd Send Transactions
  • Other
    • Call/BatchCall RPC Hook
    • Conflux Addreess
  • Conflux-ABIGEN
  • ChangeLog
  • References
Powered by GitBook
On this page
  • Gas
  • Storage Collateral

Was this helpful?

  1. Transactions

Gas & Storage Collateral

PreviousObtaining CFXNextAccount Manager

Last updated 3 years ago

Was this helpful?

Gas

When a transaction takes place in Conflux, a transaction cost must be paid to the client that executes the transaction on your behalf, committing the output of this transaction to the Conflux blockchain.

This cost is measured in gas, where gas is the number of instructions used to execute a transaction in the Conflux Virtual Machine. Please refer to the for detail.

What this means for you when working with Conflux clients is that there are two parameters that are used to dictate how much CFX you wish to spend in order for a transaction to complete:

Gas price

This is the amount you are prepared in conflux per unit of gas.

Gas limit

This is the total amount of gas you are happy to spend on the transaction execution. There is an upper limit of how large a single transaction can be in an Conflux block which restricts this value typically to less then 30,000,000.

These parameters taken together dictate the maximum amount of CFX you are willing to spend on transaction costs. i.e. you can spend no more then gas price * gas limit. The gas price can also affect how quickly a transaction takes place depending on what other transactions are available with a more profitable gas price for miners.

You may need to adjust these parameters to ensure that transactions take place in a timely manner.

Storage Collateral

In addition to paying gas, you also need to spend storage collateral according to the storage occupancy in the smart contract, see details from

Homestead documentation
developer site