Raptor3um / raptoreum

MIT License
317 stars 134 forks source link

Assets #6 Create asset transaction class to extends from a transaction abstract or interface class! #245

Closed Bigpiggy01 closed 7 months ago

Bigpiggy01 commented 1 year ago

Extend current Transaction class to incorporate the elements introduced in Assets 1-5 issues, created transaction abstract to form new base for transactions and :

Asset Registration/Minting Process:

To streamline asset creation/minting as well as updating asset metadata information we need to separate asset registration and update vs minting and transferring assets. This way we can have longer name chars limit while space to hold asset name and its information remain fixed in a minting and transferring. Asset registration and update process will be similar to protx registration and update as the asset metadata will be store in the ledger exactly the same way smartnode list is currently store on ledger

Transaction types:

  1. new_asset: this transaction type is used when a new asset name is registered

  2. update_asset: this transaction type is used when an existing asset is updating

  3. Transaction extraPayload: transaction extra payload which will be used to store asset metadata

  4. new_asset extraPayload structure:

  5. Name: 1-128 chars [a-zA-Z0-9] and space

  6. updatable: bool - if true this asset meta can be modified using assetTx update process. Otherwise these asset meta can’t be updated

  7. Is_unique: true if this is asset can be unique identify per token

  8. Decimal point: has to be 0 if is_unique is true.

  9. referenceHash: hash of the underlying physical or digital assets, IPFS hash can be used here.

Distribution:

  1. Type: unit8 - possible types are manual, coinbase, address, and schedule

  2. targetAddress: address to be issued to when asset issue transaction is created.if type is address then whenever a transaction occurred to this address then distribution occurred. If type is scheduled this is the address where assets will be issued per schedule.

  3. issueFrequency: uint8 - mint specific amount of token every x blocks.

  4. Amount: CAmount - amount to distribute each time if type is not manual.

  5. ownerAddress: wallet address that this asset is owned by. Only key holder of this address will be able to mint new tokens

  6. collateralAddress: wallet address where collateral for minting asset fee will be in if type is not manual

Burns: similar to distribution but send asset to a burn address or future lock it forever

Requirements:

Bigpiggy01 commented 7 months ago

Live on testnet now!