Transaction

76cf7c7a04ea53d4f5ccb394813f800f781519e8c8d70aefc64befd3899c179c
( - )
151,777
2021-11-14 03:22:07
1
581 B

3 Inputs

Total Input:
  • Q!6¢Zp2A<I¥›?õæflWxÅE g}Î ½àQ®M¦{"__cls":"class Token {\n constructor(to, supply, name) {\n this.coins = supply\n this._owners = [to]\n this.name = name\n }\n\n send(amount, to) {\n if (this.coins < amount) throw new Error()\n this.coins -= amount\n return new Token(to, amount, this.name)\n }\n}","__index":{"obj":0},"__func":"constructor","__args":["0236a219185a01060f7032413c49a59b3ff5e6666c570f78c5450b677dce20bde0",51,"vivek"]}u
    https://whatsonchain.com/tx/undefined
  • Q!6¢Zp2A<I¥›?õæflWxÅE g}Î ½àQ®M¸{"haveToken":0,"__cls":"class BuyLimitOrder {\n _id\n _rev\n _rootId\n haveToken\n wantTokenRootId\n _owner\n limitPrice\n priceForOrderBook\n\n constructor(haveToken, wantTokenRootId, priceRatio, publicKey) {\n this.limitPrice = 1.0 / priceRatio\n this.priceForOrderBook = priceRatio\n this.haveToken = haveToken\n this.wantTokenRootId = wantTokenRootId\n this._owner = publicKey\n }\n\n /**\n * Executes the Limit Order\n * @param wantToken token should match what is needed by Limit Order\n */\n execute(wantToken) {\n if (wantToken._rootId !== this.wantTokenRootId) {\n throw new Error(\n 'Incorrect Operation. Reason: Root of the token which is required by this Limit Order doesnot match'\n )\n }\n const numberOfWantCoins = parseFloat(wantToken.coins)\n const numberOfHaveCoins = parseFloat(this.haveToken.coins)\n\n let newHaveToken = null\n let newWantToken = null\n\n // if (numberOfWantCoins > numberOfHaveCoins * this.limitPrice) {\n // newHaveToken = this.haveToken.send(numberOfHaveCoins, wantToken._owners[0])\n // newWantToken = wantToken.send(numberOfHaveCoins * this.limitPrice, this._owner)\n // } else {\n // const amountToBeSendFromHaveToken =\n // numberOfWantCoins * (1.0 / this.limitPrice)\n // newHaveToken = this.haveToken.send(amountToBeSendFromHaveToken, wantToken._owners[0])\n // newWantToken = wantToken.send(numberOfWantCoins, this._owner)\n // }\n // return [newHaveToken, newWantToken]\n }\n}","__func":"constructor","__args":["__","32fc6e3811429de180c99e3dc4674eab70039308d545aa90cb54aaa9b68fedee:0",10,"0236a219185a01060f7032413c49a59b3ff5e6666c570f78c5450b677dce20bde0"]}u
    https://whatsonchain.com/tx/undefined

3 Outputs

Total Output:
  • Q!6¢Zp2A<I¥›?õæflWxÅE g}Î ½àQ®{"__index":{"0":0,"obj":1}}u
    https://whatsonchain.com/tx/76cf7c7a04ea53d4f5ccb394813f800f781519e8c8d70aefc64befd3899c179c
  • Q!6¢Zp2A<I¥›?õæflWxÅE g}Î ½àQ®${"__func":"execute","__args":["__"]}u
    https://whatsonchain.com/tx/76cf7c7a04ea53d4f5ccb394813f800f781519e8c8d70aefc64befd3899c179c