tx · DZx1yXMKb7B21spvAePJhQKqcqursf8YmcYZRDMR2DUR

3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e:  -0.00200000 Waves

2024.10.05 00:00 [3312628] smart account 3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e > SELF 0.00000000 Waves

{ "type": 13, "id": "DZx1yXMKb7B21spvAePJhQKqcqursf8YmcYZRDMR2DUR", "fee": 200000, "feeAssetId": null, "timestamp": 1728075623224, "version": 1, "sender": "3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e", "senderPublicKey": "3ezR5yaSmZAzqGt8iqRkYESRWpH1uaTKZ9ZffHD3C2Wc", "proofs": [ "5ijpfpGRh3TSPFL1cm8YbnwGyBWeMY8BMPmzNVXoUipJoKw6M5soUb6tW1tniUMwGkTKZQDGo3bfFDGctQPyDqsQ" ], "script": "base64:BgIQCAISAwoBCBIHCgUICBIBAQQAEENvbmZpZ0FkZHJlc3NLZXkCDWNvbmZpZ0FkZHJlc3MADk5vZGVBZGRyZXNzS2V5Agtub2RlQWRkcmVzcwANQ29uZmlnQWRkcmVzcwkBEUBleHRyTmF0aXZlKDEwNjIpAQkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwUQQ29uZmlnQWRkcmVzc0tleQALTm9kZUFkZHJlc3MJARFAZXh0ck5hdGl2ZSgxMDYyKQEJARFAZXh0ck5hdGl2ZSgxMDUzKQIFDUNvbmZpZ0FkZHJlc3MFDk5vZGVBZGRyZXNzS2V5AgFpAQVzZXR1cAENY29uZmlnQWRkcmVzcwMJAQIhPQIIBQFpBmNhbGxlcgUEdGhpcwkAAgECDUFjY2VzcyBkZW5pZWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhdQYXltZW50cyBhcmUgcHJvaGliaXRlZAMJAAACCQCmCAEFDWNvbmZpZ0FkZHJlc3MFBHVuaXQJAAIBCQCsAgICF0ludmFsaWQgY29uZmlnQWRkcmVzczogBQ1jb25maWdBZGRyZXNzCQDMCAIJAQtTdHJpbmdFbnRyeQIFEENvbmZpZ0FkZHJlc3NLZXkFDWNvbmZpZ0FkZHJlc3MFA25pbAFpAQxicmlkZ2VMMlRvTDEFCWNoYWluTmFtZQlibG9ja0hhc2gGcHJvb2ZzDXdpdGhkcmF3SW5kZXgGYW1vdW50AwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQINQWNjZXNzIGRlbmllZAMJAQIhPQIJAJADAQgFAWkIcGF5bWVudHMAAAkAAgECF1BheW1lbnRzIGFyZSBwcm9oaWJpdGVkBBJ1bml0c0NoYWluQ29udHJhY3QJARFAZXh0ck5hdGl2ZSgxMDYyKQEJARFAZXh0ck5hdGl2ZSgxMDUzKQIFDUNvbmZpZ0FkZHJlc3MJAKwCAgITdW5pdHNDaGFpbkNvbnRyYWN0XwUJY2hhaW5OYW1lBAp1bml0c0Fzc2V0CQDZBAEJARFAZXh0ck5hdGl2ZSgxMDUzKQIFEnVuaXRzQ2hhaW5Db250cmFjdAIHdG9rZW5JZAQId2l0aGRyYXcJAPwHBAUSdW5pdHNDaGFpbkNvbnRyYWN0Agh3aXRoZHJhdwkAzAgCBQlibG9ja0hhc2gJAMwIAgUGcHJvb2ZzCQDMCAIFDXdpdGhkcmF3SW5kZXgJAMwIAgUGYW1vdW50BQNuaWwFA25pbAMJAAACBQh3aXRoZHJhdwUId2l0aGRyYXcJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwULTm9kZUFkZHJlc3MFBmFtb3VudAUKdW5pdHNBc3NldAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAGkiGeQ=", "chainId": 84, "height": 3312628, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let ConfigAddressKey = "configAddress"
5+
6+let NodeAddressKey = "nodeAddress"
7+
8+let ConfigAddress = addressFromStringValue(getStringValue(this, ConfigAddressKey))
9+
10+let NodeAddress = addressFromStringValue(getStringValue(ConfigAddress, NodeAddressKey))
11+
12+@Callable(i)
13+func setup (configAddress) = if ((i.caller != this))
14+ then throw("Access denied")
15+ else if ((size(i.payments) != 0))
16+ then throw("Payments are prohibited")
17+ else if ((addressFromString(configAddress) == unit))
18+ then throw(("Invalid configAddress: " + configAddress))
19+ else [StringEntry(ConfigAddressKey, configAddress)]
20+
21+
22+
23+@Callable(i)
24+func bridgeL2ToL1 (chainName,blockHash,proofs,withdrawIndex,amount) = if ((i.caller != this))
25+ then throw("Access denied")
26+ else if ((size(i.payments) != 0))
27+ then throw("Payments are prohibited")
28+ else {
29+ let unitsChainContract = addressFromStringValue(getStringValue(ConfigAddress, ("unitsChainContract_" + chainName)))
30+ let unitsAsset = fromBase58String(getStringValue(unitsChainContract, "tokenId"))
31+ let withdraw = invoke(unitsChainContract, "withdraw", [blockHash, proofs, withdrawIndex, amount], nil)
32+ if ((withdraw == withdraw))
33+ then [ScriptTransfer(NodeAddress, amount, unitsAsset)]
34+ else throw("Strict value is not equal to itself.")
35+ }
36+
37+

github/deemru/w8io/026f985 
15.98 ms