From 4900c3d0a5fccc84a42f8811bd767198f7438cf2 Mon Sep 17 00:00:00 2001
From: Levike34 <89289513+Levike34@users.noreply.github.com>
Date: Fri, 26 Jan 2024 14:13:29 +0900
Subject: [PATCH 1/2] Emit event on install

Emit a Transfer event on install_contract() to register token's existence
---
 cep18/src/main.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cep18/src/main.rs b/cep18/src/main.rs
index 6ddcca9..bf2cddd 100644
--- a/cep18/src/main.rs
+++ b/cep18/src/main.rs
@@ -308,6 +308,11 @@ pub extern "C" fn init() {
             );
         }
     }
+    events::record_event_dictionary(Event::Transfer(Transfer {
+        sender: caller.into(),
+        recipient: caller.into(),
+        amount: initial_supply,
+    }))
 }
 
 /// Admin EntryPoint to manipulate the security access granted to users.

From e762da92ee4c13b4994e10f8e07eedebea0129eb Mon Sep 17 00:00:00 2001
From: Levike34 <89289513+Levike34@users.noreply.github.com>
Date: Mon, 29 Jan 2024 10:04:16 +0900
Subject: [PATCH 2/2] Change to Mint event on install_contract

---
 cep18/src/main.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cep18/src/main.rs b/cep18/src/main.rs
index bf2cddd..ac273d3 100644
--- a/cep18/src/main.rs
+++ b/cep18/src/main.rs
@@ -308,8 +308,7 @@ pub extern "C" fn init() {
             );
         }
     }
-    events::record_event_dictionary(Event::Transfer(Transfer {
-        sender: caller.into(),
+    events::record_event_dictionary(Event::Mint(Mint {
         recipient: caller.into(),
         amount: initial_supply,
     }))