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