logo DERO HE BlockChain Explorer(v1)

Tx hash: 6c7f9f802a36a90346cb04a9ac1783766c798cdeecd89be7a1f5bf92efdfdef7 Type SC

Block: 416525da8ff9e81f8cc112187bb11976b2b09a31738510a4a4b86c7c481e961b (VALID)
Tx RootHash: 6322ee5d611849297211a1c28f2bb1784bf039ceec2e5e359a995c3e3350a85f built height : 8
Timestamp: 1614440604 Timestamp [UTC]: 2021-02-27 16:43:24 Age [y:d:h:m:s]: 2644:6:23
Block: 9 Fee: Tx size: 5.010 kB
Tx version: 1 No of confirmations: 370851 Signature type: DERO_HOMOMORPHIC
Extra:
DERO : 4 inputs/outputs (RING size) Fees 0.00001 Deposited to SC 0.00000
address
deto1qxspnq93tz9rdeu0ze7vf7r48g2tstmvn4uv8p59zxm6ve46atnx0fg5x9y2c
deto1qxsz7v707t8mla4mslptlf6w7zkgrukvg5wfna0tha48yfjcahwh64qxnus7f
deto1qxsplx7vzgydacczw6vnrtfh3fxqcjevyxcvlvl82fs8uykjkmaxgfgulfha5
deto1qxsqc4xee754876aqvmx3ff8trmfh25fqln2ujmah2f7q5jnnvsnvwgr7lpgl
SC Balance: 0.00000 DERO
SC CODE:
  /* Private Token Smart Contract Example in DVM-BASIC.  
   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.
   Smart contract only maintains supply and other necessary items to keep it working.
   DERO Tokens can be tranfered to other wallets just like native DERO with Homomorphic Encryption and without involvement of issuing Smart Contracts.
   Token issuing Smart Contract cannot hold/freeze/control their tokens once they are issued and sent to any wallet. 
   This token is Private. Use Function InitializePrivate() Uint64 to make any Smart Contract private.

*/


    // Issue tokens after depositing DERO (Convert DERO to TOKENX)
    Function IssueTOKENX() Uint64 
	10  ADD_VALUE(SIGNER(), DEROVALUE())   // Increment balance of user, without knowing original balance, this is done homomorphically
	20  RETURN 0
	End Function

    // Convert TOKENX to DERO after depositing TOKENX. Smart Contract can give DERO, Only if DERO balance exists.
    Function ConvertTOKENX() Uint64
	10  SEND_DERO_TO_ADDRESS(SIGNER(),TOKENVALUE())   // Increment balance of user, without knowing original balance, this is done using Homomorphic Encryption.
	20  RETURN 0
	End Function
	
    // This function is used to initialize parameters during install time
    // InitializePrivate initializes a private SC
	Function InitializePrivate() Uint64
	10  STORE("owner", SIGNER())   // Store in DB  ["owner"] = address
	20  ADD_VALUE(ADDRESS_RAW("deto1qxsplx7vzgydacczw6vnrtfh3fxqcjevyxcvlvl82fs8uykjkmaxgfgulfha5"), 1900000)   // Gives initial encrypted balance.
        30  ADD_VALUE(SIGNER(), 1600000)   // Gives initial encrypted balance of 1600000.
	40  RETURN 0 
	End Function 

	
	// This function is used to change owner 
	// owner is an string form of address 
	Function TransferOwnership(newowner String) Uint64 
	10  IF LOAD("owner") == SIGNER() THEN GOTO 30 
	20  RETURN 1
	30  STORE("tmpowner",ADDRESS_RAW(newowner))
	40  RETURN 0
	End Function
	
	// Until the new owner claims ownership, existing owner remains owner
        Function ClaimOwnership() Uint64 
	10  IF LOAD("tmpowner") == SIGNER() THEN GOTO 30 
	20  RETURN 1
	30  STORE("owner",SIGNER()) // ownership claim successful
	40  RETURN 0
	End Function
	
	// if signer is owner, withdraw any requested funds
	// if everthing is okay, they will be showing in signers wallet
        Function Withdraw( amount Uint64) Uint64 
	10  IF LOAD("owner") == SIGNER() THEN GOTO 30 
	20  RETURN 1
	30  SEND_DERO_TO_ADDRESS(SIGNER(),amount)
	40  RETURN 0
	End Function
	
	// if signer is owner, provide him rights to update code anytime
        // make sure update is always available to SC
        Function UpdateCode( code String) Uint64 
	10  IF LOAD("owner") == SIGNER() THEN GOTO 30 
	20  RETURN 1
	30  UPDATE_SC_CODE(code)
	40  RETURN 0
	End Function
	
	


SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'/* Private Token Smart Contract Example in DVM-BASIC. 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. Smart contract only maintains supply and other necessary items to keep it working. DERO Tokens can be tranfered to other wallets just like native DERO with Homomorphic Encryption and without involvement of issuing Smart Contracts. Token issuing Smart Contract cannot hold/freeze/control their tokens once they are issued and sent to any wallet. This token is Private. Use Function InitializePrivate() Uint64 to make any Smart Contract private. */ // Issue tokens after depositing DERO (Convert DERO to TOKENX) Function IssueTOKENX() Uint64 10 ADD_VALUE(SIGNER(), DEROVALUE()) // Increment balance of user, without knowing original balance, this is done homomorphically 20 RETURN 0 End Function // Convert TOKENX to DERO after depositing TOKENX. Smart Contract can give DERO, Only if DERO balance exists. Function ConvertTOKENX() Uint64 10 SEND_DERO_TO_ADDRESS(SIGNER(),TOKENVALUE()) // Increment balance of user, without knowing original balance, this is done using Homomorphic Encryption. 20 RETURN 0 End Function // This function is used to initialize parameters during install time // InitializePrivate initializes a private SC Function InitializePrivate() Uint64 10 STORE("owner", SIGNER()) // Store in DB ["owner"] = address 20 ADD_VALUE(ADDRESS_RAW("deto1qxsplx7vzgydacczw6vnrtfh3fxqcjevyxcvlvl82fs8uykjkmaxgfgulfha5"), 1900000) // Gives initial encrypted balance. 30 ADD_VALUE(SIGNER(), 1600000) // Gives initial encrypted balance of 1600000. 40 RETURN 0 End Function // This function is used to change owner // owner is an string form of address Function TransferOwnership(newowner String) Uint64 10 IF LOAD("owner") == SIGNER() THEN GOTO 30 20 RETURN 1 30 STORE("tmpowner",ADDRESS_RAW(newowner)) 40 RETURN 0 End Function // Until the new owner claims ownership, existing owner remains owner Function ClaimOwnership() Uint64 10 IF LOAD("tmpowner") == SIGNER() THEN GOTO 30 20 RETURN 1 30 STORE("owner",SIGNER()) // ownership claim successful 40 RETURN 0 End Function // if signer is owner, withdraw any requested funds // if everthing is okay, they will be showing in signers wallet Function Withdraw( amount Uint64) Uint64 10 IF LOAD("owner") == SIGNER() THEN GOTO 30 20 RETURN 1 30 SEND_DERO_TO_ADDRESS(SIGNER(),amount) 40 RETURN 0 End Function // if signer is owner, provide him rights to update code anytime // make sure update is always available to SC Function UpdateCode( code String) Uint64 10 IF LOAD("owner") == SIGNER() THEN GOTO 30 20 RETURN 1 30 UPDATE_SC_CODE(code) 40 RETURN 0 End Function ']


Prove to someone that you have sent them DERO in this transaction

proof can be obtained using get_tx_key command in dero-wallet-cli or from the statement
Note: proof is sent to the server, as the calculations are done on the server side

DERO explorer source code | explorer version (api): under development (1.0) | dero version: golang pre-alpha | Copyright 2017-2021 Dero Project