Basic constructor macro for transaction-bond structures.
(make-transaction-bond [:validator <validator>] [:stake <stake>])
This is the usual way to construct transaction-bond structures. It simply conses together a structure with the specified fields.
This macro generates a new transaction-bond structure from scratch. See also change-transaction-bond, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-transaction-bond (&rest args) (std::make-aggregate 'transaction-bond args '((:validator) (:stake)) 'make-transaction-bond nil))
Function:
(defun transaction-bond (validator stake) (declare (xargs :guard (and (addressp validator) (posp stake)))) (declare (xargs :guard t)) (let ((__function__ 'transaction-bond)) (declare (ignorable __function__)) (b* ((validator (mbe :logic (address-fix validator) :exec validator)) (stake (mbe :logic (pos-fix stake) :exec stake))) (cons :bond (list validator stake)))))