tx · HG1Yy8idzVZHa24275FHggvmLx2KuqBTZ8iNkKwXEQSb

3Myo52cEARR1oQwd86fnGfjuv2F8S2f95so:  -0.01000000 Waves

2021.11.24 03:22 [1804395] smart account 3Myo52cEARR1oQwd86fnGfjuv2F8S2f95so > SELF 0.00000000 Waves

{ "type": 13, "id": "HG1Yy8idzVZHa24275FHggvmLx2KuqBTZ8iNkKwXEQSb", "fee": 1000000, "feeAssetId": null, "timestamp": 1637713403224, "version": 1, "sender": "3Myo52cEARR1oQwd86fnGfjuv2F8S2f95so", "senderPublicKey": "By7oLKrQGtE1ikS6HNoJzERQQDY3WNBJva2bqkaWTfX1", "proofs": [ "4RPi8chWvQPWyNMGvECjYad3gkqwcMjhJVCNsY6CHBrpqVmkh3QT6Q8SQiUuFsks5mMkpw9F9Fzwu75ZDBu5sZJY" ], "script": "base64:AAIFAAAAAAAAABIIAhIJCgcIAQEBAQEIEgMKAQEAAAAdAAAAAANTRVACAAAAAl9fAQAAAA9nZXRTdHJpbmdPckZhaWwAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPbWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAARa2V5RmFjdG9yeUFkZHJlc3MAAAAAAgAAABwlcyVzX19jb25maWdfX2ZhY3RvcnlBZGRyZXNzAAAAABhJZHhGYWN0b3J5Q2ZnU3Rha2luZ0RhcHAAAAAAAAAAAAEAAAAAGUlkeEZhY3RvcnlDZmdCb29zdGluZ0RhcHAAAAAAAAAAAAIAAAAAFElkeEZhY3RvcnlDZmdJZG9EYXBwAAAAAAAAAAADAAAAABVJZHhGYWN0b3J5Q2ZnVGVhbURhcHAAAAAAAAAAAAQAAAAAGUlkeEZhY3RvcnlDZmdFbWlzc2lvbkRhcHAAAAAAAAAAAAU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AAAA9mYWN0b3J5Q29udHJhY3QJAQAAABhyZWFkRmFjdG9yeUFkZHJlc3NPckZhaWwAAAAABAAAAApmYWN0b3J5Q2ZnCQEAAAAUcmVhZEZhY3RvcnlDZmdPckZhaWwAAAABBQAAAA9mYWN0b3J5Q29udHJhY3QEAAAAD3N0YWtpbmdDb250cmFjdAkBAAAAF2dldFN0YWtpbmdBZGRyZXNzT3JGYWlsAAAAAQUAAAAKZmFjdG9yeUNmZwQAAAARc3Rha2luZ0FkZHJlc3NTdHIJAAQlAAAAAQUAAAAPc3Rha2luZ0NvbnRyYWN0BAAAAAljYWxsZXJTdHIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkBAAAAAiE9AAAAAgUAAAAJY2FsbGVyU3RyBQAAABFzdGFraW5nQWRkcmVzc1N0cgkAAAIAAAABAgAAABJwZXJtaXNzaW9ucyBkZW5pZWQEAAAADHd4QXNzZXRJZFN0cgkAAZEAAAACCQAEtQAAAAIJAQAAAA9nZXRTdHJpbmdPckZhaWwAAAACBQAAAAR0aGlzCQEAAAAJa2V5Q29uZmlnAAAAAAUAAAADU0VQAAAAAAAAAAABBAAAAAl3eEFzc2V0SWQJAAJZAAAAAQUAAAAMd3hBc3NldElkU3RyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAD3N0YWtpbmdDb250cmFjdAUAAAAGYW1vdW50BQAAAAl3eEFzc2V0SWQFAAAAA25pbAAAAAAWGl38", "chainId": 84, "height": 1804395, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: bwrGFqhcWRveGf8urkrbDcNY2xwbih1NFcz4kUkURGM Next: FAXx9KSrLWXpudWDURKZbVCBVoHe1VJbnpmknCXPBBJD Diff:
OldNewDifferences
2323
2424 let IdxFactoryCfgSlippageDapp = 7
2525
26-func keyFactoryConfig () = "%s__factoryConfig"
26+func keyFactoryCfg () = "%s__factoryConfig"
2727
2828
2929 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
3030
3131
32+func keyFactoryLpList () = "%s__lpTokensList"
33+
34+
35+func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
36+
37+
38+func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
39+
40+
3241 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
42+
43+
44+func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
45+
46+
47+func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
48+
49+
50+func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
51+
52+
53+func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
54+
55+
56+func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
57+
58+
59+func keyConfig () = "%s__config"
3360
3461
3562 func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
5481
5582
5683 @Callable(i)
57-func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp) = if ((i.caller != this))
84+func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = if ((i.caller != this))
5885 then throw("permissions denied")
59- else [IntegerEntry(keyRatePerBlockMaxStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlockMax), IntegerEntry(keyRatePerBlockMaxCurrent(), ratePerBlockMax), IntegerEntry(keyRatePerBlockStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlock), IntegerEntry(keyRatePerBlockCurrent(), ratePerBlock), IntegerEntry(keyEmissionStartBlock(), emissionStartBlock), IntegerEntry(keyEmissionDurationInBlocks(), emissionDuration), IntegerEntry(keyEmissionEndBlock(), (emissionStartBlock + emissionDuration)), StringEntry(keyFactoryAddress(), factoryAddress)]
86+ else [IntegerEntry(keyRatePerBlockMaxStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlockMax), IntegerEntry(keyRatePerBlockMaxCurrent(), ratePerBlockMax), IntegerEntry(keyRatePerBlockStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlock), IntegerEntry(keyRatePerBlockCurrent(), ratePerBlock), IntegerEntry(keyEmissionStartBlock(), emissionStartBlock), IntegerEntry(keyEmissionDurationInBlocks(), emissionDuration), IntegerEntry(keyEmissionEndBlock(), (emissionStartBlock + emissionDuration)), StringEntry(keyFactoryAddress(), factoryAddress), StringEntry(keyConfig(), ("%s__" + wxAssetIdStr))]
87+
88+
89+
90+@Callable(i)
91+func emit (amount) = {
92+ let factoryContract = readFactoryAddressOrFail()
93+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
94+ let stakingContract = getStakingAddressOrFail(factoryCfg)
95+ let stakingAddressStr = toString(stakingContract)
96+ let callerStr = toString(i.caller)
97+ if ((callerStr != stakingAddressStr))
98+ then throw("permissions denied")
99+ else {
100+ let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1]
101+ let wxAssetId = fromBase58String(wxAssetIdStr)
102+[ScriptTransfer(stakingContract, amount, wxAssetId)]
103+ }
104+ }
60105
61106
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
77
88
99 func keyFactoryAddress () = "%s%s__config__factoryAddress"
1010
1111
1212 let IdxFactoryCfgStakingDapp = 1
1313
1414 let IdxFactoryCfgBoostingDapp = 2
1515
1616 let IdxFactoryCfgIdoDapp = 3
1717
1818 let IdxFactoryCfgTeamDapp = 4
1919
2020 let IdxFactoryCfgEmissionDapp = 5
2121
2222 let IdxFactoryCfgRestDapp = 6
2323
2424 let IdxFactoryCfgSlippageDapp = 7
2525
26-func keyFactoryConfig () = "%s__factoryConfig"
26+func keyFactoryCfg () = "%s__factoryConfig"
2727
2828
2929 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
3030
3131
32+func keyFactoryLpList () = "%s__lpTokensList"
33+
34+
35+func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
36+
37+
38+func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
39+
40+
3241 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
42+
43+
44+func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
45+
46+
47+func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
48+
49+
50+func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
51+
52+
53+func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
54+
55+
56+func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
57+
58+
59+func keyConfig () = "%s__config"
3360
3461
3562 func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
3663
3764
3865 func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP)
3966
4067
4168 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
4269
4370
4471 func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP)
4572
4673
4774 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
4875
4976
5077 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
5178
5279
5380 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
5481
5582
5683 @Callable(i)
57-func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp) = if ((i.caller != this))
84+func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = if ((i.caller != this))
5885 then throw("permissions denied")
59- else [IntegerEntry(keyRatePerBlockMaxStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlockMax), IntegerEntry(keyRatePerBlockMaxCurrent(), ratePerBlockMax), IntegerEntry(keyRatePerBlockStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlock), IntegerEntry(keyRatePerBlockCurrent(), ratePerBlock), IntegerEntry(keyEmissionStartBlock(), emissionStartBlock), IntegerEntry(keyEmissionDurationInBlocks(), emissionDuration), IntegerEntry(keyEmissionEndBlock(), (emissionStartBlock + emissionDuration)), StringEntry(keyFactoryAddress(), factoryAddress)]
86+ else [IntegerEntry(keyRatePerBlockMaxStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlockMax), IntegerEntry(keyRatePerBlockMaxCurrent(), ratePerBlockMax), IntegerEntry(keyRatePerBlockStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlock), IntegerEntry(keyRatePerBlockCurrent(), ratePerBlock), IntegerEntry(keyEmissionStartBlock(), emissionStartBlock), IntegerEntry(keyEmissionDurationInBlocks(), emissionDuration), IntegerEntry(keyEmissionEndBlock(), (emissionStartBlock + emissionDuration)), StringEntry(keyFactoryAddress(), factoryAddress), StringEntry(keyConfig(), ("%s__" + wxAssetIdStr))]
87+
88+
89+
90+@Callable(i)
91+func emit (amount) = {
92+ let factoryContract = readFactoryAddressOrFail()
93+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
94+ let stakingContract = getStakingAddressOrFail(factoryCfg)
95+ let stakingAddressStr = toString(stakingContract)
96+ let callerStr = toString(i.caller)
97+ if ((callerStr != stakingAddressStr))
98+ then throw("permissions denied")
99+ else {
100+ let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1]
101+ let wxAssetId = fromBase58String(wxAssetIdStr)
102+[ScriptTransfer(stakingContract, amount, wxAssetId)]
103+ }
104+ }
60105
61106

github/deemru/w8io/169f3d6 
31.94 ms