SC Arguments: [Name:SC_ACTION Type:uint64 Value:'0' Name:SC_ID Type:hash Value:'80503c37b0e8ff2d8c92af7810c324a3b22f885df4ad195772266ceaaf662ae4' Name:code Type:string Value:' // // // INITIALIZE Function Initialize() Uint64 10 STORE("owner", SIGNER()) 40 RETURN 0 End Function // TRANSFER OWNERSHIP 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 // FINALIZE TRANSFER Function ClaimOwnership() Uint64 10 IF LOAD("tmpowner") == SIGNER() THEN GOTO 30 20 RETURN 1 30 STORE("owner",SIGNER()) 40 RETURN 0 End Function // TEST Function Test() Uint64 10 RETURN 0 End Function // UPDATE CODE 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'] |