CityCoins
  • Introduction
  • About CityCoins
    • What are CityCoins?
    • How do I get started?
  • CityCoins Resources
    • General
    • MineCityCoins.com
  • Core Protocol
    • Registration and Activation
    • Mining CityCoins
    • Stacking CityCoins
    • Token Configuration
  • Developer Resources
    • General
    • API
    • Code Examples
      • Get Account Transactions
      • Activation
      • Mining
      • Mining Claims
      • Stacking
    • Contracts
    • Integrations
      • Supporting Stacks
      • Supporting CityCoins
      • Stacks Transactions
      • Additional Info
  • Contract Functions
    • Activation
    • Mining
    • Mining Claims
    • Stacking
    • Stacking Claims
    • Token
Powered by GitBook
On this page
  • Stacks.js Libraries
  • Post-Conditions
  • Fee Estimation

Was this helpful?

  1. Developer Resources
  2. Integrations

Stacks Transactions

Creating, monitoring, and interacting with Stacks blockchain transactions.

PreviousSupporting CityCoinsNextAdditional Info

Last updated 2 years ago

Was this helpful?

Stacks.js Libraries

These libraries include everything you need to work with the .

Post-Conditions

By defining post conditions, users can create transactions that include pre-defined guarantees about what might happen in that contract.

One such post condition could be "I will transfer exactly 100 of X token", where "X token" is referenced as a specific contract's fungible token. When wallets and applications implement the transfer method, they should always use post conditions to specify that the user will transfer exactly the amount of tokens that they specify in the amount argument of the transfer function. Only in very specific circumstances should such a post condition not be included.

"post_conditions": [
    {
      "type": "fungible",
      "condition_code": "sent_equal_to",
      "amount": "241996",
      "principal": {
        "type_id": "principal_contract",
        "contract_name": "miamicoin-core-v1",
        "address": "SP466FNC0P7JWTNM2R9T199QRZN1MYEDTAR0KP27"
      },
      "asset": {
        "contract_name": "miamicoin-token",
        "asset_name": "miamicoin",
        "contract_address": "SP466FNC0P7JWTNM2R9T199QRZN1MYEDTAR0KP27"
      }
    }
  ],

Fee Estimation

Depending on the number of transactions in the mempool, setting a competitive fee on a transaction can help ensure it's processed in a timely matter by Stacks miners.

Resources to view the Stacks mempool and more about Stacks transactions are below:

Examples of how to use post-conditions are outlined in the .

Fees are automatically calculated by the when integrated.

Stacks blockchain
Stacks.js Libraries
Stacks.js Documentation
micro-stacks Libraries
micro-stacks Documentation
Code Examples
Hiro Web Wallet
Haystack Mempool Explorer
Stacks data center: mempool
CityCoins: get network status script