Transaction Details
Open on Dero ExplorerInternal ID:
868548
Transaction Hash:
b7f520c253f196fa5535ba62a62c3c08c15699264fa347513d4441ea94263ff1
Block:
Timestamp:
2022-03-22 23:39:53 UTC (3.6 years ago)
Type:
sc
Ring Size:
2
Payloads:
1
Caller:
redmond
(+2 more)
(851686)
SC Data:
[{"name":"SC_ACTION","datatype":"U","value":"1"},{"name":"SC_CODE","datatype":"S","value":" // Issue tokens after depositing DERO (Convert DERO to TOKENX)\n\n Function IssueTOKENX() Uint64\n\n 10 SEND_ASSET_TO_ADDRESS(SIGNER(), DEROVALUE(),SCID()) // Increment balance of user, without knowing original balance, this is done homomorphically\n\n 20 RETURN 0\n\n End Function\n\n\n // Convert TOKENX to DERO after depositing TOKENX. Smart Contract can give DERO, Only if DERO balance exists.\n\n Function ConvertTOKENX() Uint64\n\n 10 SEND_DERO_TO_ADDRESS(SIGNER(),ASSETVALUE(SCID())) // Increment balance of user, without knowing original balance, this is done using Homomorphic Encryption.\n\n 20 RETURN 0\n\n End Function\n\n\n // This function is used to initialize parameters during install time\n\n // InitializePrivate initializes a private SC\n\n Function InitializePrivate() Uint64\n\n 10 STORE(\"owner\", SIGNER()) // Store in DB [\"owner\"] = address\n\n30 SEND_ASSET_TO_ADDRESS(SIGNER(), "400000000000", SCID()) // Gives initial encrypted balance of 1600000.\n\n 40 RETURN 0\n\n End Function\n\n\n\n // This function is used to change owner\n\n // owner is an string form of address\n\n Function TransferOwnership(newowner String) Uint64\n\n 10 IF LOAD(\"owner\") == SIGNER() THEN GOTO 30\n\n 20 RETURN 1\n\n 30 STORE(\"tmpowner\",ADDRESS_RAW(newowner))\n\n 40 RETURN 0\n\n End Function\n\n\n // Until the new owner claims ownership, existing owner remains owner\n\n Function ClaimOwnership() Uint64\n\n 10 IF LOAD(\"tmpowner\") == SIGNER() THEN GOTO 30\n\n 20 RETURN 1\n\n 30 STORE(\"owner\",SIGNER()) // ownership claim successful\n\n 40 RETURN 0\n\n End Function\n\n\n // if signer is owner, withdraw any requested funds\n\n // if everthing is okay, they will be showing in signers wallet\n\nFunction Withdraw( amount Uint64) Uint64\n\n 10 IF LOAD(\"owner\") == SIGNER() THEN GOTO 30\n\n 20 RETURN 1\n\n 30 SEND_DERO_TO_ADDRESS(SIGNER(),amount)\n\n 40 RETURN 0\n\n End Function\n\n\n // if signer is owner, provide him rights to update code anytime\n\n // make sure update is always available to SC\n\n Function UpdateCode( code String) Uint64\n\n 10 IF LOAD(\"owner\") == SIGNER() THEN GOTO 30\n\n 20 RETURN 1\n\n 30 UPDATE_SC_CODE(code)\n\n 40 RETURN 0\n\n End Function"}]
Payload
Token (SCID):
DERO
Deposited:
none
Fees:
0.03556 DERO