@version 1 # Automate the refunding after the given timestamp actions triggered_by: datetime, at: 1700045220 do Contract.set_type "transfer" # Burn the non withdrawed tokens Contract.add_token_transfer to: 0x00000000000000000000000000000000000000000000000000000000000000000000, amount: 0.04975, token_address: 0x0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827 Contract.set_code "" end condition triggered_by: transaction, on: refund(), as: [ timestamp: timestamp >= 1700045220 ] actions triggered_by: transaction, on: refund() do Contract.set_type "transfer" # Burn the non withdrawed tokens Contract.add_token_transfer to: 0x00000000000000000000000000000000000000000000000000000000000000000000, amount: 0.04975, token_address: 0x0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827 Contract.set_code "" end condition triggered_by: transaction, on: reveal_secret(secret), as: [ content: Crypto.hash(String.to_hex(secret)) == 0xD9AB93E3801A8B59DFDE95B4FAA2CF64F30E4D07817D8AF8FA138978DCC691EA, address: ( valid? = false abi_data = Evm.abi_encode("status()") tx = [to: "0x99a00ecd7bf57cd08c81284fbbaa324c7189a717", data: "0x#{abi_data}"] request = [jsonrpc: "2.0", id: "1", method: "eth_call", params: [tx, "latest"]] headers = ["Content-Type": "application/json"] body = Json.to_string(request) res = Http.request("https://data-seed-prebsc-1-s2.bnbchain.org:8545", "POST", headers, body) if res.status == 200 && Json.is_valid?(res.body) do response = Json.parse(res.body) result = Map.get(response, "result") if result != nil do decoded_abi = Evm.abi_decode("(uint)", result) # Withdrawn status is 1 valid? = List.at(decoded_abi, 0) == 1 end end valid? ) ] actions triggered_by: transaction, on: reveal_secret(secret) do Contract.set_type "transfer" Contract.add_token_transfer to: 0x0000F74EE60CE89C9227127F41A4DCD1946F11721BF74D07C812591D48611D3601F7, amount: 0.04960075, token_address: 0x0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827 Contract.add_token_transfer to: 0x0000749d250560bf06c079832e0e9a24509b1e440a45c33bd9448b41b6a056fc6201, amount: 1.4925e-4, token_address: 0x0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827 Contract.set_code "" end
Content (0 B)
State (0 B)
-
Secret shared with 1 key
Encoded secret
A8D1176E63C1101C59288BE4C234C5AD6A0822C407C2363EA6ED55A192C7A9E2DEFDED426EC6075E83BFEE78F6825D1F8DF02CA8C278F3A11308FD63
Authorized keys
- 00017877BCF4122095926A49489009649603AB129822A19EF9D573B8FD714911ED7F
Contract recipients (0)
Inputs (0)
Contract inputs (0)
Unspent outputs (2)
-
From 00000048...84A1At 2023-11-15 08:47:54 UTCAmount 0.30540381 UCO
-
From 00005A4A...A7D4At 2023-11-15 08:47:50 UTCAmount 0.04975 0000288B...B827
Previous public key
0001720F76FFDFF3B499E64B4A5AD60BF99389E52D065DD78E501B8C73CD3A3C52D8
Previous signature
2B1A051F2EA789AB4105F3003639165535D036F62590670760AD3B8E9F90794E7B2F3B692F5B006DE586804C569B405A74079A2FFF55F1E29924221BBB573F0D
Origin signature
3044022050EAEEAE206B71EBC6AE7C64EA5F4FFFB50FEF6910DE853C211CCBB6B3E09F6102205290922C6EF15B88C24A9EFF778514B7F0D5FB7C898BD6E1ECE22015DC9312FF
Proof of work
01020451684966573439C38DA99334546FBBDE4A6D96A50B4A4ECBB6572CDBED023F079607407E254421D1779525D11C60D55684F0B403B93B95823554E29D1E2CDB16
Proof of integrity
0032A57B4A37017DDF2BA7EDC1AEBD587F9D27086283C93E5A9F69F3FFA1889254
Coordinator signature
C6E16F229EA4775E42A4098ABAAFBC2546E42BB2A4FC992940E523E3D3007CB7896C9221372A731F2F131D3DC971760F147C3879F04F65843D2FFFC4E7F68807
Validator #1 public key
0001B0A94804BF8ECC9897075C6207FF63EF4D339F57A0349888E6B77CD47DB53EF3
Validator #1 signature
D8F72E6F630235E93C2279BCAEF2C26783963219DA1F3BFCDD6328BACF46AF1D1956B7D8A30BDAD5DCC7726A5F920CB41768CE6AD3E02DE6AD54F1A38197370B
Validator #2 public key
00011B58ED42235461734EAF253BD97A80B92899ABCC3BE680D44B6825DD2A88A947
Validator #2 signature
07F89F19E3D52070DFC12B79AD69DE37E43A4CC3F0814BC5341466802137DBF164E0EC909E1E3080370C22EF657EA1758D15E4B7D73275F55D11240914E78E0C