From 9d1e200f97b5fdbf42d8da691f0efcf82c58e95b Mon Sep 17 00:00:00 2001 From: Brice Dobry Date: Mon, 13 Feb 2023 11:50:03 -0500 Subject: [PATCH] feat: add events for ft/nft registrations ``` (print { event: "register-contract", asset-type: "nft", l1-contract: (contract-of nft-contract), l2-contract: l2-contract }) ``` --- core-contracts/contracts/subnet.clar | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core-contracts/contracts/subnet.clar b/core-contracts/contracts/subnet.clar index 6713bc71b..971fcdd77 100644 --- a/core-contracts/contracts/subnet.clar +++ b/core-contracts/contracts/subnet.clar @@ -62,6 +62,13 @@ (asserts! (map-insert allowed-contracts (contract-of ft-contract) l2-contract) (err ERR_ASSET_ALREADY_ALLOWED)) + (print { + event: "register-contract", + asset-type: "ft", + l1-contract: (contract-of ft-contract), + l2-contract: l2-contract + }) + (ok true) ) ) @@ -76,6 +83,13 @@ (asserts! (map-insert allowed-contracts (contract-of nft-contract) l2-contract) (err ERR_ASSET_ALREADY_ALLOWED)) + (print { + event: "register-contract", + asset-type: "nft", + l1-contract: (contract-of nft-contract), + l2-contract: l2-contract + }) + (ok true) ) )