fractional-ownership
SP3WW7HZBWTXRQ14134RMJ7SH1Q83CVD9PVW5SSPWSource Code
;; Fractional Ownership
(define-map ownership-shares { property-id: uint, owner: principal } uint)
(define-public (buy-shares (property-id uint) (shares uint))
(begin
(map-set ownership-shares { property-id: property-id, owner: tx-sender }
(+ (default-to u0 (map-get? ownership-shares { property-id: property-id, owner: tx-sender })) shares))
(ok shares)
)
)
Functions (1)
| Function | Access | Args |
|---|---|---|
| buy-shares | public | property-id: uint, shares: uint |