SC CODE: /*dDream Tables dReams Token (Contract v2)
Replacing original contract "dbfa9257e8cdaeacd35797402fd44e180c4c31c085989294c542c990706973d7"
♣♣♣♣♣♣
*/
Function InitializePrivate() Uint64
10 IF SIGNER() == address_raw("dero1qy8jhspnvu8n5tuy0470ja0pnsz5jwjyhgfvqj93jaaxllx2ep3fsqgz0kggh") THEN GOTO 30
20 RETURN 1
30 STORE("owner", SIGNER())
40 SEND_ASSET_TO_ADDRESS(SIGNER(), 1500000000, SCID()) /// Initial Balance for Baccarat table
50 STORE("supplyCount:", 1500000000) /// dReams in circulation
60 RETURN 0
End Function
Function IssueDreams() Uint64 /// 1m Max Supply
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 IF LOAD("supplyCount:") < 100000000000 THEN GOTO 50
40 RETURN 1
50 SEND_ASSET_TO_ADDRESS(SIGNER(), DEROVALUE()*333, SCID())
60 STORE("supplyCount:", LOAD("supplyCount:")+DEROVALUE()*333)
70 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 /// Update SC
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:'/*dDream Tables dReams Token (Contract v2)
Replacing original contract "dbfa9257e8cdaeacd35797402fd44e180c4c31c085989294c542c990706973d7"
♣♣♣♣♣♣
*/
Function InitializePrivate() Uint64
10 IF SIGNER() == address_raw("dero1qy8jhspnvu8n5tuy0470ja0pnsz5jwjyhgfvqj93jaaxllx2ep3fsqgz0kggh") THEN GOTO 30
20 RETURN 1
30 STORE("owner", SIGNER())
40 SEND_ASSET_TO_ADDRESS(SIGNER(), 1500000000, SCID()) /// Initial Balance for Baccarat table
50 STORE("supplyCount:", 1500000000) /// dReams in circulation
60 RETURN 0
End Function
Function IssueDreams() Uint64 /// 1m Max Supply
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 IF LOAD("supplyCount:") < 100000000000 THEN GOTO 50
40 RETURN 1
50 SEND_ASSET_TO_ADDRESS(SIGNER(), DEROVALUE()*333, SCID())
60 STORE("supplyCount:", LOAD("supplyCount:")+DEROVALUE()*333)
70 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 /// Update SC
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 UPDATE_SC_CODE(code)
40 RETURN 0
End Function'] |