tx · 97jvZ2KG5rthzD4w6oKonTTm75CFscADpgyvmK72as3f

3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b:  -0.01400000 Waves

2019.08.20 00:30 [638590] smart account 3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b > SELF 0.00000000 Waves

{ "type": 13, "id": "97jvZ2KG5rthzD4w6oKonTTm75CFscADpgyvmK72as3f", "fee": 1400000, "feeAssetId": null, "timestamp": 1566250203744, "version": 1, "sender": "3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b", "senderPublicKey": "848RkjzRcJfyWuhGbq8NUFoLMpeDW8NbKu36H3SouHzF", "proofs": [ "5UC9FSPS1hXpyceLmE5PeBK28XZ7QAMGvwvg977hXB4SQQXVeScjB8T5AgY3rdXYaAiygnHCinfTTDX7banzTmFg" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAp3YXZlc1Rva2VuBQAAAAR1bml0AQAAAAlwYXltZW50T2YAAAABAAAAA2tleQkAASwAAAACAgAAAAtwYXltZW50X29mXwUAAAADa2V5AQAAAAhzdGF0dXNPZgAAAAEAAAADa2V5CQABLAAAAAICAAAACnN0YXR1c19vZl8FAAAAA2tleQAAAAAFb3duZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTg86BxmqbXn0VCYdClvCRxLh2SvKgdo1wBAAAAEGlzUGF5bWVudFBlbmRpbmcAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQEAAAAIc3RhdHVzT2YAAAABBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAkAAAAAAAACBQAAAAFzAgAAAAdwZW5kaW5nBwAAAAQAAAABaQEAAAAQc2V0V2FpdFRvUGF5bWVudAAAAAIAAAADa2V5AAAAB3BheW1lbnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA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: YzUa1XsTrv1uTjeBJa3SCHfA394pEuhvJPrkfybqyfQ Diff:
OldNewDifferences
5050
5151
5252 @Callable(i)
53-func transfer (addressStr,payment) = match i.payment {
53+func transfer (addressStr) = match i.payment {
5454 case a: AttachedPayment =>
5555 if ((a.assetId == wavesToken))
5656 then match addressFromString(addressStr) {
5757 case address: Address =>
58- TransferSet([ScriptTransfer(address, payment, wavesToken)])
58+ TransferSet([ScriptTransfer(address, a.amount, wavesToken)])
5959 case _ =>
6060 throw("invalin address")
6161 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let wavesToken = unit
55
66 func paymentOf (key) = ("payment_of_" + key)
77
88
99 func statusOf (key) = ("status_of_" + key)
1010
1111
1212 let owner = Address(base58'3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b')
1313
1414 func isPaymentPending (key) = match getString(this, statusOf(key)) {
1515 case s: String =>
1616 (s == "pending")
1717 case _ =>
1818 false
1919 }
2020
2121
2222 @Callable(i)
2323 func setWaitToPayment (key,payment) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
2424
2525
2626
2727 @Callable(i)
2828 func pay (key) = if (isPaymentPending(key))
2929 then match i.payment {
3030 case a: AttachedPayment =>
3131 if ((a.assetId == wavesToken))
3232 then {
3333 let datas = WriteSet([DataEntry(statusOf(key), "paid")])
3434 let payment = extract(getInteger(this, paymentOf(key)))
3535 ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
3636 }
3737 else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
3838 case _ =>
3939 throw("payment in assetTokens must be attached")
4040 }
4141 else throw("Order already has been payed or rejected")
4242
4343
4444
4545 @Callable(i)
4646 func reject (key) = if (isPaymentPending(key))
4747 then WriteSet([DataEntry(statusOf(key), "rejected")])
4848 else throw("Order already has been payed or rejected")
4949
5050
5151
5252 @Callable(i)
53-func transfer (addressStr,payment) = match i.payment {
53+func transfer (addressStr) = match i.payment {
5454 case a: AttachedPayment =>
5555 if ((a.assetId == wavesToken))
5656 then match addressFromString(addressStr) {
5757 case address: Address =>
58- TransferSet([ScriptTransfer(address, payment, wavesToken)])
58+ TransferSet([ScriptTransfer(address, a.amount, wavesToken)])
5959 case _ =>
6060 throw("invalin address")
6161 }
6262 else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
6363 case _ =>
6464 throw("payment in assetTokens must be attached")
6565 }
6666
6767

github/deemru/w8io/026f985 
27.00 ms