Author Topic: Arbitrary set of operations in a transaction?  (Read 1565 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Thanks xeroc. So just to make sure I got it right:
  • A transaction contains a set of operations. 
  • The operations are taken from a set of predefined types (details in the source file you pointed to).
  • The specific collection of operations per transaction is user-defined. That is, I can 'bundle' an arbitrary set of operations into a single transaction. 

True?

Thanks again.
Almost .. there exists a transaction size limit (which is a parameter that can be voted up by shareholders if required)

Offline rociy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Thanks xeroc. So just to make sure I got it right:
  • A transaction contains a set of operations. 
  • The operations are taken from a set of predefined types (details in the source file you pointed to).
  • The specific collection of operations per transaction is user-defined. That is, I can 'bundle' an arbitrary set of operations into a single transaction. 

True?

Thanks again.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Hi,

I apologize in advance for the potentially ignorant question: I'm trying to figure out what's the right way to model / implement a certain financial transaction in using BitShares. For that, I may want to wrap up a few operations into a transaction. Can I do that, or can I only use the set of transactions that are currently defined in the code (e.g., register_account, create_asset, etc.)?

For example: let's assume my use-case requires a transaction of two 'withdraw' operations and one 'short_sell': would that be possible?

Thanks,
    Roy
Welcome Roy,

In contrast to Bitcoin where you have "script", the operation types you can use in BitShares are predefined. You can find the set of implemented operations here:
https://github.com/cryptonomex/graphene/blob/master/libraries/chain/include/graphene/chain/protocol/operations.hpp#L26-L66

Also note that you can of course "bundle" several operations into a single transaction. And, furthermore, if you need a certain feature you may still create a proposal and have it implemented if shareholders approve.

Offline rociy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Hi,

I apologize in advance for the potentially ignorant question: I'm trying to figure out what's the right way to model / implement a certain financial transaction in using BitShares. For that, I may want to wrap up a few operations into a transaction. Can I do that, or can I only use the set of transactions that are currently defined in the code (e.g., register_account, create_asset, etc.)?

For example: let's assume my use-case requires a transaction of two 'withdraw' operations and one 'short_sell': would that be possible?

Thanks,
    Roy