SC Arguments: [Name:SC_ACTION Type:uint64 Value:'0' Name:SC_ID Type:hash Value:'e145b5b7c70d1f8e8c12267bfebfcb7b9fd42ab7592f9c3568a5d10711cbd196' Name:code Type:string Value:'Function IssueDUSD(amount Uint64) Uint64
10 SEND_ASSET_TO_ADDRESS(SIGNER(),amount,SCID())
15 STORE("total_issued",LOAD("total_issued")+amount)
17 STORE("circulating_supply",LOAD("circulating_supply")+amount)
20 RETURN 0
End Function
Function InitializePrivate() Uint64
10 IF SIGNER() == address_raw("dero1qy2jy9yjj50w2vgdefhssn738qdu8fdt58nnmm8lt7kx6msaey0n2qqtwluyy") THEN GOTO 30
20 RETURN 0 // exit
30 STORE("owner", SIGNER()) // Store in DB ["owner"] = address
35 STORE("total_issued",200000000)
40 STORE("circulating_supply",200000000)
50 SEND_ASSET_TO_ADDRESS(SIGNER(), 200000000, SCID())
60 RETURN 0
End Function
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
Function ClaimOwnership() Uint64
10 IF LOAD("tmpowner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("owner",SIGNER())
40 RETURN 0
End Function
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
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' Name:entrypoint Type:string Value:'UpdateCode'] |