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