Transaction Details

Open on Dero Explorer
Internal ID:
3158
Transaction Hash:
ce70bcfa8192057ca4f6bd4896622a3c5af4ea6210d592b85d468703d1075a97
Block:
Timestamp:
2022-03-05 15:31:27 UTC (3.4 years ago)
Type:
sc
Ring Size:
2
Payloads:
1
Caller:
SC Data:
[{"name":"SC_ACTION","datatype":"U","value":"1"},{"name":"SC_CODE","datatype":"S","value":"/* Private Token Smart Contract Example in DVM-BASIC.  \n   DERO Smart Contracts Tokens privacy can be understood just like banks handle cash. Once cash is out from the bank, bank is not aware about it (who owns what value), until it is deposited back.\n   Smart contract only maintains supply and other necessary items to keep it working.\n   DERO Tokens can be tranfered to other wallets just like native DERO with Homomorphic Encryption and without involvement of issuing Smart Contracts.\n   Token issuing Smart Contract cannot hold/freeze/control their tokens once they are issued and sent to any wallet. \n   This token is Private. Use Function InitializePrivate() Uint64 to make any Smart Contract private.\n\n*/\n\n\n    // Issue tokens after depositing DERO (Convert DERO to TOKENX)\n    Function IssueTOKENX() Uint64 \n\t10  SEND_ASSET_TO_ADDRESS(SIGNER(), DEROVALUE(),SCID())   // Increment balance of user, without knowing original balance, this is done homomorphically\n\t20  RETURN 0\n\tEnd 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\t10  SEND_DERO_TO_ADDRESS(SIGNER(),ASSETVALUE(SCID()))   // Increment balance of user, without knowing original balance, this is done using Homomorphic Encryption.\n\t20  RETURN 0\n\tEnd Function\n\t\n    // This function is used to initialize parameters during install time\n    // InitializePrivate initializes a private SC\n\tFunction InitializePrivate() Uint64\n\t10  STORE(\"owner\", SIGNER())   // Store in DB  [\"owner\"] = address\n   30  SEND_ASSET_TO_ADDRESS(SIGNER(), "2600000", SCID())   // Gives initial encrypted balance of 1600000.\n\t40  RETURN 0 \n\tEnd Function \n\n\t\n\t// This function is used to change owner \n\t// owner is an string form of address \n\tFunction TransferOwnership(newowner String) Uint64 \n\t10  IF LOAD(\"owner\") == SIGNER() THEN GOTO 30 \n\t20  RETURN 1\n\t30  STORE(\"tmpowner\",ADDRESS_RAW(newowner))\n\t40  RETURN 0\n\tEnd Function\n\t\n\t// Until the new owner claims ownership, existing owner remains owner\n        Function ClaimOwnership() Uint64 \n\t10  IF LOAD(\"tmpowner\") == SIGNER() THEN GOTO 30 \n\t20  RETURN 1\n\t30  STORE(\"owner\",SIGNER()) // ownership claim successful\n\t40  RETURN 0\n\tEnd Function\n\t\n\t// if signer is owner, withdraw any requested funds\n\t// if everthing is okay, they will be showing in signers wallet\n   Function Withdraw( amount Uint64) Uint64 \n\t10  IF LOAD(\"owner\") == SIGNER() THEN GOTO 30 \n\t20  RETURN 1\n\t30  SEND_DERO_TO_ADDRESS(SIGNER(),amount)\n\t40  RETURN 0\n\tEnd Function\n\t\n\t// if signer is owner, provide him rights to update code anytime\n        // make sure update is always available to SC\n        Function UpdateCode( code String) Uint64 \n\t10  IF LOAD(\"owner\") == SIGNER() THEN GOTO 30 \n\t20  RETURN 1\n\t30  UPDATE_SC_CODE(code)\n\t40  RETURN 0\n\tEnd Function\n\t\n\t\n\n\n\n"}]

Payload

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

Receivers Ring (1)