SC Arguments: [Name:SC_ACTION Type:uint64 Value:'0' Name:SC_ID Type:hash Value:'9bca33fc8c64e357b00e19e3fb6aec51d3b3bf8bafddd8538afac4df4bab5bda' Name:code Type:string Value:'
// .-.
// (o o)
// | O \ boo!
// | \
// '~~~~'
// ?
// /\ ___
// (oo) |RIP|
// /||\ |___|
//////////////////////////////////////
// Ghost Exchange
// Use at your own risk
// For more info visit: ghost.trading
//////////////////////////////////////
Function Initialize() Uint64
10 STORE("owner", SIGNER())
20 STORE("feeTo", SIGNER())
30 STORE("nameHdr", "Ghost Exchange")
40 STORE("descrHdr", "Spooktacular trades await!")
50 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
Function UpdateRecord(key String, value String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE(key, value)
40 RETURN 0
End Function
Function SendAssetOwner(asset_address String, amount Uint64) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 SEND_ASSET_TO_ADDRESS(SIGNER(), amount, HEXDECODE(asset_address))
40 RETURN 0
End Function
Function SendDeroOwner(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' Name:entrypoint Type:string Value:'UpdateCode'] |