@version 1 # Automate the refunding after the given timestamp actions triggered_by: datetime, at: 1700094360 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 >= 1700094360 ] 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)) == 0x70A519F603F52247BAD58AF930AF74582A57697D2639B157C09603C71F889A92, address: ( valid? = false abi_data = Evm.abi_encode("status()") tx = [to: "0x9f45d0bafe4b67d74fb747fdbb86a20c96cb238e", 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: 0x00008D5D4054C44E2D545884BD557D7E1CEA9B3669EB223C11CDADD6D99A1334F9F8, 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
360AFCA40B5B7B0ABA94B4C4866004039F90CFC8AC38F2188654D0DAC68F4FE4E7B48F28BFD95E931D23012B708246759426A972A62DBFB9C275387D
Authorized keys
- 00017877BCF4122095926A49489009649603AB129822A19EF9D573B8FD714911ED7F
Contract recipients (0)
Inputs (0)
Contract inputs (0)
Unspent outputs (2)
-
From 0000277C...8DE0At 2023-11-15 22:26:52 UTCAmount 0.29741723 UCO
-
From 00000FF6...2DA5At 2023-11-15 22:26:48 UTCAmount 0.04975 0000288B...B827
Previous public key
00011E49D9AC998A0D15A674FBDABDC401985A65D330D1EC1B57B425F95477912AEF
Previous signature
BEE3C304EB07800615686DED516E4181C3D94BA7D84E415DD43141F72E48BABFB004C4AD238F85D0446522E640E5638BE415896B5D51B31D3E4C216279F68A0F
Origin signature
3045022100838D484294019B7EEBB7EA6F11727BAE9BE7FFC5A7737AD8F90ECEE65A5CC16E0220190641B10852985EF2EB7D607EC6942E417821232E5B18076DBBA9B936573EC5
Proof of work
010204AA023E1E039788AD4B8F713C8871CA39A177414A99A0788993AD725B1FBB7AD5E4CAC86151A9E03451DCACB1EFC100B1E450FCEDAF5E5005F3A4C503D1D29712
Proof of integrity
004E22FE93316E8358C99421D01C91D93313DF8C01C4D002DD57EC4D9FA47AAD06
Coordinator signature
8DAC3F88EBD60DE96B4262251152928126423CA754BA02FB3BB8B74A092CD047D80FB8EF2A087317A64725A7813F2F76150E1FF35931CDD5C717AD505E415508
Validator #1 public key
0001B0A94804BF8ECC9897075C6207FF63EF4D339F57A0349888E6B77CD47DB53EF3
Validator #1 signature
0FA2D2B684CADC8EC9869F51D015DEEEA24AD5998A097A2C59A434F78ECE1234F54B0D65E155053188A089F30245DE6CCBCFBA62496945667D2918E790A7FD0F
Validator #2 public key
00011B58ED42235461734EAF253BD97A80B92899ABCC3BE680D44B6825DD2A88A947
Validator #2 signature
0DF9B0AFFE705783A422AF04E00D4016A0F6BFE8AF1F71E23509A17ECA5B5E19453DB021054775A159D18C79695808A9204CA3CE3918C33BB79FF7E896746E01