.derupt-core-trait
Each core trait plays a vital role in facilitating interactions between users.
Core Traits
gift-message
: to send Gifts providing the necessary token inputs.send-message
: to send a Message that supports optional arguments.like-message
: to express appreciation for a Message by Liking it.dislike-message
: to express disapproval for a Message by Disliking it.favorable-reply-message
: to send a favorable Reply, supports optional arguments.unfavorable-reply-message
: to send a unfavorable Reply, supports optional arguments.
Work in Progress
;; title: derupt-core-trait
;; version: 1.3.1
;; summary: Derupt Core Trait Contract
(use-trait sip-009-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-009-trait-nft-standard.sip-009-trait)
(use-trait sip-010-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-010-trait-ft-standard.sip-010-trait)
(use-trait sip-013-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-013-trait-sft-standard.sip-013-trait)
(use-trait derupt-ext-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.derupt-ext-trait.derupt-ext)
(use-trait cryptocash-token-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.cryptocash-token-trait.cryptocash-token)
(use-trait cryptocash-core-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.cryptocash-core-trait.cryptocash-core)
(define-trait derupt-core-trait
(
(gift-message
(
principal
principal bool
<sip-010-trait>
uint
(optional (buff 34))
(optional <derupt-ext-trait>)
(optional (list 10
{
stringutf8: (optional (string-utf8 256)),
stringascii: (optional (string-ascii 256)),
uint: (optional uint),
int: (optional int),
principal: (optional principal),
bool: (optional bool),
buff: (optional (buff 34)),
proxy: (optional (buff 2048)),
cryptocash-token-contract: (optional <cryptocash-token-trait>),
cryptocash-core-contract: (optional <cryptocash-core-trait>),
sip-009-contract: (optional <sip-009-trait>),
sip-010-contract: (optional <sip-010-trait>),
sip-013-contract: (optional <sip-013-trait>)
}
))
) (response bool uint)
)
(send-message
(
(string-utf8 256)
(optional (string-utf8 256))
(optional (string-utf8 256))
(optional (string-utf8 256))
(list 200 uint)
(string-utf8 256)
(optional <derupt-ext-trait>)
(optional (list 10
{
stringutf8: (optional (string-utf8 256)),
stringascii: (optional (string-ascii 256)),
uint: (optional uint),
int: (optional int),
principal: (optional principal),
bool: (optional bool),
buff: (optional (buff 34)),
proxy: (optional (buff 2048)),
cryptocash-token-contract: (optional <cryptocash-token-trait>),
cryptocash-core-contract: (optional <cryptocash-core-trait>),
sip-009-contract: (optional <sip-009-trait>),
sip-010-contract: (optional <sip-010-trait>),
sip-013-contract: (optional <sip-013-trait>)
}
))
bool
bool
uint
uint
(optional principal)
(optional principal)
<cryptocash-core-trait>
) (response bool uint)
)
(like-message
(
principal
(string-utf8 256)
<cryptocash-token-trait>
uint
bool
bool
uint
uint
(optional principal)
(optional principal)
(optional <derupt-ext-trait>)
(optional (list 10
{
stringutf8: (optional (string-utf8 256)),
stringascii: (optional (string-ascii 256)),
uint: (optional uint),
int: (optional int),
principal: (optional principal),
bool: (optional bool),
buff: (optional (buff 34)),
proxy: (optional (buff 2048)),
cryptocash-token-contract: (optional <cryptocash-token-trait>),
cryptocash-core-contract: (optional <cryptocash-core-trait>),
sip-009-contract: (optional <sip-009-trait>),
sip-010-contract: (optional <sip-010-trait>),
sip-013-contract: (optional <sip-013-trait>)
}
))
) (response bool uint)
)
(dislike-message
(
principal
(string-utf8 256)
<cryptocash-token-trait>
<cryptocash-core-trait>
uint
uint
bool
bool
uint
uint
(optional principal)
(optional principal)
(optional <derupt-ext-trait>)
(optional (list 10
{
stringutf8: (optional (string-utf8 256)),
stringascii: (optional (string-ascii 256)),
uint: (optional uint),
int: (optional int),
principal: (optional principal),
bool: (optional bool),
buff: (optional (buff 34)),
proxy: (optional (buff 2048)),
cryptocash-token-contract: (optional <cryptocash-token-trait>),
cryptocash-core-contract: (optional <cryptocash-core-trait>),
sip-009-contract: (optional <sip-009-trait>),
sip-010-contract: (optional <sip-010-trait>),
sip-013-contract: (optional <sip-013-trait>)
}
))
) (response bool uint)
)
(favorable-reply-message
(
(string-utf8 256)
principal
(optional (string-utf8 256))
(optional (string-utf8 256))
(string-utf8 256)
(string-utf8 256)
(list 200 uint)
(string-utf8 256)
(optional <derupt-ext-trait>)
(optional (list 10
{
stringutf8: (optional (string-utf8 256)),
stringascii: (optional (string-ascii 256)),
uint: (optional uint),
int: (optional int),
principal: (optional principal),
bool: (optional bool),
buff: (optional (buff 34)),
proxy: (optional (buff 2048)),
cryptocash-token-contract: (optional <cryptocash-token-trait>),
cryptocash-core-contract: (optional <cryptocash-core-trait>),
sip-009-contract: (optional <sip-009-trait>),
sip-010-contract: (optional <sip-010-trait>),
sip-013-contract: (optional <sip-013-trait>)
}
))
<cryptocash-token-trait>
<cryptocash-core-trait>
uint
bool
bool
uint
uint
uint
uint
(optional principal)
(optional principal)
) (response bool uint)
)
(unfavorable-reply-message
(
(string-utf8 256)
principal
(optional (string-utf8 256))
(optional (string-utf8 256))
(string-utf8 256)
(string-utf8 256)
(list 200 uint)
(string-utf8 256)
(optional <derupt-ext-trait>)
(optional (list 10
{
stringutf8: (optional (string-utf8 256)),
stringascii: (optional (string-ascii 256)),
uint: (optional uint),
int: (optional int),
principal: (optional principal),
bool: (optional bool),
buff: (optional (buff 34)),
proxy: (optional (buff 2048)),
cryptocash-token-contract: (optional <cryptocash-token-trait>),
cryptocash-core-contract: (optional <cryptocash-core-trait>),
sip-009-contract: (optional <sip-009-trait>),
sip-010-contract: (optional <sip-010-trait>),
sip-013-contract: (optional <sip-013-trait>)
}
))
<cryptocash-token-trait>
<cryptocash-core-trait>
uint
uint
bool
bool
uint
uint
uint
uint
(optional principal)
(optional principal)
) (response bool uint)
)
)
)
Last updated