.derupt-core-yyyymmdd

Users call their own .derupt-profile which then calls .derupt-core-yyyymmdd

The core maybe require or receive upgrades/updates from time to time, for that we follow a simple date based naming convention to track versions.

General:

  • .derupt-core-yyyymmdd contract is for handling public message & action logic.

  • .derupt-core-yyyymmdd contract receives calls from .derupt-profile contracts and proceeds to process them accordingly.

Warning:

  • users should deploy a .derupt-profilecontract in app before using core features.

  • users should call.derupt-profile

  • users should not call.derupt-core-yyyymmdd (nor logging contracts)

Functions Process Transactions Overview:

What happens in a process depends on the function the user is calling.

  • send-message: mine-citycoin is called during this process.

  • like-message: transfer-citycoin is called during this process.

  • dislike-message: stack-citycoin is called during this process.

  • favorable-reply-message: mine-citycoin & transfer-citycoin is called during this process.

  • unfavorable-reply-message: mine-citycoin & stack-citycoin is called during this process.

The five core functions and arguments in the .derupt-core-yyyymmdd contract:

send-message

Broadcast Send Message to the Stacks Blockchain

Data Flow of the Function: 1).derupt-profile 2).derupt-core-yyyymmdd 3).derupt-feed (&.derupt-miners)

Arguments:

  • content

    • required || string-utf8 || Max: 256 || Message Body

  • attachment-uri

    • optional || string-utf8 || Max: 256 || Message Attachment (example: 'bns://1679121920338.mp3')

  • thumbnail-uri

    • optional || string-utf8 || Max: 256 || Attachment Preview (example: 'bns://1679121920589.png')

  • reply-to

    • optional || string-utf8 || Max: 256 || Stacks Transaction ID

  • cityName

    • required || string-ascii || Max: 10 || Example: 'mia' or 'nyc'

  • alt-origin

    • required || string-utf8 || Max: 256 || Alternative Origin

  • extras

    • optional || tuple || Max: 256 (per) || 10 Additional Arguments

Responses:

  • Successful Stacks Transaction

  • Unsuccessful Stacks Transaction

like-message

Broadcast Like Message to Stacks Blockchain

Data Flow of the Function: 1) .derupt-profile 2) .derupt-core-yyyymmdd 3) .derupt-sentiment

Arguments:

  • author-principal

    • required || principal || principal || The Liked Message Author Principal

  • liked-txid

    • required || string-utf8 || Max: 256 || Stacks Transaction ID (of Liked Message)

  • contractId

    • required || trait_reference || trait_reference || CityCoin Contract Reference

Responses:

  • Successful Stacks Transaction

  • Unsuccessful Stacks Transaction

dislike-message

Broadcast Dislike Message to Stacks Blockchain

Data Flow of the Function: 1) .derupt-profile 2) .derupt-core-yyyymmdd 3) .derupt-sentiment (&.derupt-stackers)

Arguments:

  • author-principal

    • required || principal || principal || The Liked Message Author Principal

  • disliked-txid

    • required || string-utf8 || Max: 256 || Stacks Transaction ID (of Disliked Message)

  • cityName

    • required || string-ascii || Max: 10 || Example: 'mia' or 'nyc'

  • contractId

    • required || trait_reference || trait_reference || CityCoin Contract Reference

Responses:

  • Successful Stacks Transaction

  • Unsuccessful Stacks Transaction

favorable-reply-message

Broadcast Favorable Reply Message to Stacks Blockchain

Data Flow of the Function: 1) .derupt-profile 2) .derupt-core-yyyymmdd 3) .derupt-feed (&.derupt-sentiment &.derupt-miners)

Arguments:

  • content

    • required || string-utf8 || Max: 256 || Message Body

  • author-principal

    • required || principal || principal || The Liked Message Author Principal

  • attachment-uri

    • optional || string-utf8 || Max: 256 || Message Attachment (example: 'bns://1679121920338.mp3')

  • thumbnail-uri

    • optional || string-utf8 || Max: 256 || Attachment Preview (example: 'bns://1679121920589.png')

  • reply-to

    • optional || string-utf8 || Max: 256 || Stacks Transaction ID

  • liked-txid

    • required || string-utf8 || Max: 256 || Stacks Transaction ID (of Liked Message)

  • cityName

    • required || string-ascii || Max: 10 || Example: 'mia' or 'nyc'

  • alt-origin

    • required || string-utf8 || Max: 256 || Alternative Origin

  • contractId

    • required || trait_reference || trait_reference || CityCoin Contract Reference

  • extras

    • optional || tuple || Max: 256 (per) || 10 Additional Arguments

Responses:

  • Successful Stacks Transaction

  • Unsuccessful Stacks Transaction

unfavorable-reply-message

Broadcast Unfavorable Reply Message to Stacks Blockchain

Data Flow of the Function: 1) .derupt-profile 2) .derupt-core-yyyymmdd 3) .derupt-feed (&.derupt-sentiment &.derupt-miners &.derupt-stackers)

Arguments:

  • content

    • required || string-utf8 || Max: 256 || Message Body

  • author-principal

    • required || principal || principal || The Liked Message Author Principal

  • attachment-uri

    • optional || string-utf8 || Max: 256 || Message Attachment

  • thumbnail-uri

    • optional || string-utf8 || Max: 256 || Attachment Preview

  • reply-to

    • optional || string-utf8 || Max: 256 || Stacks Transaction ID

  • disliked-txid

    • required || string-utf8 || Max: 256 || Stacks Transaction ID (of Disliked Message)

  • cityName

    • required || string-ascii || Max: 10 || Example: 'mia' or 'nyc'

  • contractId

    • required || trait_reference || trait_reference || CityCoin Contract Reference

  • alt-origin

    • required || string-utf8 || Max: 256 || Alternative Origin

  • extras

    • optional || tuple || Max: 256 (per) || 10 Additional Arguments

Responses:

  • Successful Stacks Transaction

  • Unsuccessful Stacks Transaction

Last updated