Transaction Details

Open on Dero Explorer
Internal ID:
1592
Transaction Hash:
c253dfd43bd545f327079596f7e44d88eacfc660132943fee348db219125cbba
Block:
Timestamp:
2022-02-28 17:00:07 UTC (3.6 years ago)
Type:
sc
Ring Size:
2
Payloads:
1
Caller:
Ez3kiel (+2 more) (111)
SC Data:
[{"name":"SC_ACTION","datatype":"U","value":"1"},{"name":"SC_CODE","datatype":"S","value":"/*\r\nBlack Diamond Token\r\nOnly 1000 black diamonds in the world. \r\nSuper Rare Anonymous Token powered by DERO platform.\r\nBy Ez3kiel\r\n*/\r\n\r\nFunction Initialize() Uint64\r\n10  STORE(\"owner\", SIGNER())\r\n20  STORE(\"original_supply\", 100000000)\r\n30  STORE(\"remaining_supply\", 100000000)\r\n30  SEND_ASSET_TO_ADDRESS(SIGNER(), "100000", SCID()) // A black diamond for memory\r\nEnd Function\r\n\r\nFunction IssueBlackDiamondToken() Uint64 \r\n10  IF LOAD(\"remaining_supply\") != 0 THEN GOTO 30\r\n20  RETURN 1\r\n30  dim bd_claimed, new_supply as Uint64\r\n40  LET bd_claimed = DEROVALUE() / 100\r\n50  LET new_supply = LOAD(\"remaining_supply\") - bd_claimed\r\n60  IF new_supply \u003c 0 THEN GOTO 20\r\n70  SEND_ASSET_TO_ADDRESS(SIGNER(), bd_claimed, SCID())\r\n80  STORE(\"remaining_supply\", new_supply)\r\n90  RETURN 0\r\nEnd Function\r\n\r\n// UTILITY FUNCTIONS\r\n\r\n// This function is used to change owner \r\n// owner is an string form of address \r\nFunction TransferOwnership(newowner String) Uint64 \r\n10  IF LOAD(\"owner\") == SIGNER() THEN GOTO 30 \r\n20  RETURN 1\r\n30  STORE(\"tmpowner\", ADDRESS_RAW(newowner))\r\n40  RETURN 0\r\nEnd Function\r\n\r\n// Until the new owner claims ownership, existing owner remains owner\r\nFunction ClaimOwnership() Uint64 \r\n10  IF LOAD(\"tmpowner\") == SIGNER() THEN GOTO 30 \r\n20  RETURN 1\r\n30  STORE(\"owner\", SIGNER()) // ownership claim successful\r\n40  RETURN 0\r\nEnd Function\r\n\r\n// if signer is owner, withdraw any requested funds\r\n// if everthing is okay, they will be showing in signers wallet\r\nFunction Withdraw(amount Uint64) Uint64 \r\n10  IF LOAD(\"owner\") == SIGNER() THEN GOTO 30 \r\n20  RETURN 1\r\n30  SEND_DERO_TO_ADDRESS(SIGNER(), amount)\r\n40  RETURN 0\r\nEnd Function\r\n\r\n// if signer is owner, provide him rights to update code anytime\r\n// make sure update is always available to SC\r\nFunction UpdateCode(code String) Uint64 \r\n10  IF LOAD(\"owner\") == SIGNER() THEN GOTO 30 \r\n20  RETURN 1\r\n30  UPDATE_SC_CODE(code)\r\n40  RETURN 0\r\nEnd Function\r\n\t"}]

Payload

Token (SCID):
DERO
Deposited:
none
Fees:
0.03042 DERO