tx · 2WQN1RMUApm6AC9riECpLtoALXkD1DWV6b4VMJGtK9wr 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ: -0.01400000 Waves 2023.01.15 16:19 [2406113] smart account 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ > SELF 0.00000000 Waves
{ "type": 13, "id": "2WQN1RMUApm6AC9riECpLtoALXkD1DWV6b4VMJGtK9wr", "fee": 1400000, "feeAssetId": null, "timestamp": 1673788802324, "version": 2, "chainId": 84, "sender": "3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ", "senderPublicKey": "6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez", "proofs": [ "2LgV3Ui7K1bvjhA7FSW7wnVPNHSUo76vyHx8mERGoxg6Z5R7dibtyEkPzeEWiU5aQYZtGAS5fAy1yNEteqeHYZzd" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAtwbGFjZW9wdGlvbgAAAAEAAAALT3B0aW9uRW50cnkEAAAADWNhbGxlcmFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAScmVhZF9vcmFjbGVfc3RhdHVzCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAA1vcmFjbGVfc3RhdHVzBAAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOMW1fY29udHJhY3RfaWQEAAAACmdldGJ0Y2RhdGEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAHMW1fYnRjXwkAAaQAAAABBQAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAQAAAAGc3dhcExpCQAEtQAAAAIFAAAACmdldGJ0Y2RhdGECAAAAAV8EAAAABXByaWNlCQABkQAAAAIFAAAABnN3Y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N3YXBMaQAAAAAAAAAAAQQAAAALYmxvY2toZWlnaHQJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAACBAAAAANkaXYJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAADCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAABXByaWNlCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAR0aW1lCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAtibG9ja2hlaWdodAkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAADZGl2CQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk8V8O3", "height": 2406113, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ckjvhmu3PQFYC1hHnL1u6wt5DLWZWbHrayYQj74sT3DJ Next: 9FrwfG5W7b79oF2wa7ELxnQQ1HD2JKCW9VVCPTdajCEx Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let calleraddress = toBase58String(i.caller.bytes) | |
9 | 9 | let read_oracle_status = getStringValue(this, "oracle_status") | |
10 | 10 | let read_OptionCounterID = getIntegerValue(this, "1m_contract_id") | |
11 | - | let getbtcdata = getStringValue(this, "1m_ | |
11 | + | let getbtcdata = getStringValue(this, ("1m_btc_" + toString(read_OptionCounterID))) | |
12 | 12 | let swapLi = split(getbtcdata, "_") | |
13 | 13 | let price = swapLi[0] | |
14 | 14 | if ((read_oracle_status == "Close")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func placeoption (OptionEntry) = { | |
8 | 8 | let calleraddress = toBase58String(i.caller.bytes) | |
9 | 9 | let read_oracle_status = getStringValue(this, "oracle_status") | |
10 | 10 | let read_OptionCounterID = getIntegerValue(this, "1m_contract_id") | |
11 | - | let getbtcdata = getStringValue(this, "1m_ | |
11 | + | let getbtcdata = getStringValue(this, ("1m_btc_" + toString(read_OptionCounterID))) | |
12 | 12 | let swapLi = split(getbtcdata, "_") | |
13 | 13 | let price = swapLi[0] | |
14 | 14 | if ((read_oracle_status == "Close")) | |
15 | 15 | then throw("Oracle is closed.Wait Until Oracle is Turned On.") | |
16 | 16 | else if ((OptionEntry == "Call")) | |
17 | 17 | then [StringEntry(calleraddress, "Call"), StringEntry((calleraddress + "_price"), price)] | |
18 | 18 | else if ((OptionEntry == "Put")) | |
19 | 19 | then [StringEntry(calleraddress, "Put"), StringEntry((calleraddress + "_price"), price)] | |
20 | 20 | else throw("You can Place only Either ['Call'] or ['Put']") | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | 26 | func calldata (Counter) = { | |
27 | 27 | let getbtcdata = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(Counter))) | |
28 | 28 | let swapLi = split(getbtcdata, "_") | |
29 | 29 | let price = swapLi[0] | |
30 | 30 | let time = swapLi[1] | |
31 | 31 | let blockheight = swapLi[2] | |
32 | 32 | let div = swapLi[3] | |
33 | 33 | [StringEntry("price", swapLi[0]), StringEntry("time", swapLi[1]), StringEntry("blockheight", swapLi[2]), StringEntry("div", swapLi[3])] | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Verifier(tx) | |
38 | 38 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
39 | 39 |
github/deemru/w8io/169f3d6 34.82 ms ◑