Super.init() caller

From RunWiki
Revision as of 07:47, 1 February 2026 by Zhell (talk | contribs) (Created page with "<div><br></div><div><div><div>Redefining init() with a call to super.init() inside causes issues:</div><div>      - "minting = false, sending = true" (should be...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Redefining init() with a call to super.init() inside causes issues:
      - "minting = false, sending = true" (should be the opposite)
      - 'caller' variable which should be the class TokenA,
         but becomes instead: Object <Object <Object <Object <Complex prototype>>>> {
                location: 'error://Undeployed',
                origin: 'error://Undeployed',
                nonce: 0,
                owner: 'mo61dRQheTcBMf1d7UEv91ybaDqXUyKUwd',
                satoshis: undefined
            }
      Note that despite these issues, it works nontheless, since it detects as 'sending' instead of 'minting',
      which manages to still pass the check and mint the token.
Full Code you can test (just comment the init() entirely in TokenA) to see the difference in logs while running it: