tx · 2ksdtFhQQjHZYSs5BE7czUftTf94LAshu9mbxnqP21fZ

3MyfNP96hxGP1BwNsWHuTNHuTiBiEWdm7mH:  -0.01400000 Waves

2019.09.25 12:59 [691713] smart account 3MyfNP96hxGP1BwNsWHuTNHuTiBiEWdm7mH > SELF 0.00000000 Waves

{ "type": 13, "id": "2ksdtFhQQjHZYSs5BE7czUftTf94LAshu9mbxnqP21fZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1569405600293, "version": 1, "sender": "3MyfNP96hxGP1BwNsWHuTNHuTiBiEWdm7mH", "senderPublicKey": "F1CXEKCB4kBs5PVuinmoNQeUTUzLb7dbimeBfUpM2iTV", "proofs": [ "5kn5U68wyFKVZn9WQ9v7s1Jcd2nyryqSQEU39Wgf2k2iB9VcMSVRCQQFEZwdxdL9SrV9qhJFy8CgYsVF3NWDWGWw" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAApjb250ZXh0T2JqAQAAAAxvcmFjbGVVcGRhdGUAAAABAAAADWFkZHJlc3NTdHJpbmcEAAAAB2FkZHJlc3MJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAANYWRkcmVzc1N0cmluZwQAAAAMYW1vdW50VG9rZW5BBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MCAAAADGFtb3VudFRva2VuQQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFzBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAABdQUAAAAHJG1hdGNoMAkAAAIAAAABAgAAABphbW91bnRUb2tlbkEgaXNuJ3QgZGVmaWVuZAkBAAAABXRocm93AAAAAAQAAAAMYW1vdW50VG9rZW5CBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MCAAAADGFtb3VudFRva2VuQgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAA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QIAAAAJd2l0aGRyYXduCQAAAAAAAAIFAAAADGFtb3VudFRva2VuQgIAAAAJd2l0aGRyYXduBwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANYWRkcmVzc1N0cmluZwcFAAAAA25pbAkAAAIAAAABAgAAAA1vcmFjbGUgcmVqZWN0AAAAAJcbRrA=", "chainId": 84, "height": 691713, "spentComplexity": 0 } View: original | compacted Prev: GsqBTyMgPBMJ6dEvXVhirBKcjDW5mB5LvqRMK3aCA4U9 Next: none Diff:
OldNewDifferences
100100 }
101101
102102
103+
104+@Callable(contextObj)
105+func oracleDelete (addressString) = {
106+ let address = addressFromStringValue(addressString)
107+ let amountTokenA = match getString(address, "amountTokenA") {
108+ case s: String =>
109+ s
110+ case u: Unit =>
111+ throw("amountTokenA isn't defiend")
112+ case _ =>
113+ throw()
114+ }
115+ let amountTokenB = match getString(address, "amountTokenB") {
116+ case s: String =>
117+ s
118+ case u: Unit =>
119+ throw("amountTokenB isn't defiend")
120+ case _ =>
121+ throw()
122+ }
123+ if (if ((amountTokenA == "withdrawn"))
124+ then (amountTokenB == "withdrawn")
125+ else false)
126+ then WriteSet([DataEntry(addressString, false)])
127+ else throw("oracle reject")
128+ }
129+
130+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(contextObj)
77 func oracleUpdate (addressString) = {
88 let address = addressFromStringValue(addressString)
99 let amountTokenA = match getInteger(address, "amountTokenA") {
1010 case s: Int =>
1111 true
1212 case u: Unit =>
1313 throw("amountTokenA isn't defiend")
1414 case _ =>
1515 throw()
1616 }
1717 let amountTokenB = match getInteger(address, "amountTokenB") {
1818 case s: Int =>
1919 true
2020 case u: Unit =>
2121 throw("amountTokenB isn't defiend")
2222 case _ =>
2323 throw()
2424 }
2525 let assetIdTokenA = match getString(address, "assetIdTokenA") {
2626 case s: String =>
2727 true
2828 case u: Unit =>
2929 throw("assetIdTokenA isn't defiend")
3030 case _ =>
3131 throw()
3232 }
3333 let assetIdTokenB = match getString(address, "assetIdTokenB") {
3434 case s: String =>
3535 true
3636 case u: Unit =>
3737 throw("assetIdTokenB isn't defiend")
3838 case _ =>
3939 throw()
4040 }
4141 let comission = match getInteger(address, "comission") {
4242 case s: Int =>
4343 true
4444 case u: Unit =>
4545 throw("comission isn't defiend")
4646 case _ =>
4747 throw()
4848 }
4949 let exchangecount = match getInteger(address, "exchange_count") {
5050 case s: Int =>
5151 true
5252 case u: Unit =>
5353 throw("exchange_count isn't defiend")
5454 case _ =>
5555 throw()
5656 }
5757 let fundA = match getBoolean(address, "fundA") {
5858 case s: Boolean =>
5959 true
6060 case u: Unit =>
6161 throw("fundA isn't defiend")
6262 case _ =>
6363 throw()
6464 }
6565 let fundB = match getBoolean(address, "fundB") {
6666 case s: Boolean =>
6767 true
6868 case u: Unit =>
6969 throw("fundB isn't defiend")
7070 case _ =>
7171 throw()
7272 }
7373 let owner = match getString(address, "owner") {
7474 case s: String =>
7575 true
7676 case u: Unit =>
7777 throw("owner isn't defiend")
7878 case _ =>
7979 throw()
8080 }
8181 if (if (if (if (if (if (if (if (if (amountTokenA)
8282 then amountTokenB
8383 else false)
8484 then assetIdTokenA
8585 else false)
8686 then assetIdTokenB
8787 else false)
8888 then comission
8989 else false)
9090 then exchangecount
9191 else false)
9292 then fundA
9393 else false)
9494 then fundB
9595 else false)
9696 then owner
9797 else false)
9898 then WriteSet([DataEntry(addressString, true)])
9999 else throw("oracle reject")
100100 }
101101
102102
103+
104+@Callable(contextObj)
105+func oracleDelete (addressString) = {
106+ let address = addressFromStringValue(addressString)
107+ let amountTokenA = match getString(address, "amountTokenA") {
108+ case s: String =>
109+ s
110+ case u: Unit =>
111+ throw("amountTokenA isn't defiend")
112+ case _ =>
113+ throw()
114+ }
115+ let amountTokenB = match getString(address, "amountTokenB") {
116+ case s: String =>
117+ s
118+ case u: Unit =>
119+ throw("amountTokenB isn't defiend")
120+ case _ =>
121+ throw()
122+ }
123+ if (if ((amountTokenA == "withdrawn"))
124+ then (amountTokenB == "withdrawn")
125+ else false)
126+ then WriteSet([DataEntry(addressString, false)])
127+ else throw("oracle reject")
128+ }
129+
130+

github/deemru/w8io/026f985 
28.08 ms