Skip to content

Instantly share code, notes, and snippets.

@kprimice
kprimice / multiplePSTContract.ts
Last active July 18, 2021 02:48
This contract includes: PST (default token), multiple NFTs handling, NFT profit sharing (royalties), multiple editions NFTs (no.), third party approval, batch transfers, multiple contract owners (two levels) and foreignInvoke
declare function ContractAssert(cond: any, e: string): asserts cond;
declare function ContractError(e: string): void;
import { SmartWeaveGlobal } from "smartweave/lib/smartweave-global";
declare const SmartWeave: SmartWeaveGlobal;
const PST = "PTY"
const UNITY = 1e12
const ERR_404TOKENID = "No token found: Invalid tokenId"
const ERR_NOTOKENID = "No tokenId specified"
const ERR_NOQTY = "No qty specified"

Keybase proof

I hereby claim:

  • I am kprimice on github.
  • I am kprimice (https://keybase.io/kprimice) on keybase.
  • I have a public key ASAHTNjZdyIS2UUqAV3bVzwofcH4TQJo1KKgLw-nprBZ8Ao

To claim this, I am signing this object: