Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

b77ae8e801bdc8aec90e28db88cbb9928357e02507af14d13c93c088e9205eb0
Timestamp (utc)
2021-06-06 19:19:04
Fee Paid
0.00001807 BSV
(
0.00096979 BSV
-
0.00095172 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
297,714
Size Stats
3,612 B

5 Outputs

Total Output:
0.00095172 BSV
  • jrunMà {"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["1507da18e51ee662c15ca668adc881420f2a1796b7926c14d3408e7743745ad7","68ee39f9d9be6a02d0db27f0d47fb83ad091505aea7f8aeaced7fb06b3d5c4e0","39987398b39e56a16c8728d75b5c65f8dec0ce53d4df982d78c1a1ea82040a4e"],"del":[],"cre":["mjorz61ku4Y9yGD2ryzX1w2NYTRbcarQ5E","mjorz61ku4Y9yGD2ryzX1w2NYTRbcarQ5E","mjorz61ku4Y9yGD2ryzX1w2NYTRbcarQ5E"],"exec":[{"op":"DEPLOY","data":["class Factory extends Jig {\n\n init(ownerPubkey, priceSatoshis) {\n this.owner = ownerPubkey\n this.priceSatoshis = priceSatoshis\n }\n\n setPriceSatoshis(priceSatoshis){\n this.priceSatoshis = priceSatoshis\n }\n\n produce(purchase) {\n expect(purchase.owner).toEqual(this.owner)\n expect(purchase.satoshis).toBeGreaterThanOrEqualTo(this.priceSatoshis + Factory.txCost)\n }\n\n deposit(satoshis) {\n expect(satoshis).toBeGreaterThan(0)\n\n this.satoshis = this.satoshis + satoshis\n }\n\n withdraw(satoshis){\n expect(this.satoshis).toBeGreaterThanOrEqualTo(satoshis)\n\n this.satoshis = this.satoshis - satoshis\n }\n}",{"deps":{"Jig":{"$jig":0},"expect":{"$jig":1}},"txCost":600},"class GameFactory extends Factory {\n\n init(ownerPubkey, priceSatoshis) {\n super.init(ownerPubkey, priceSatoshis)\n this.numberGames = 0\n }\n\n produce(purchase, mines) {\n super.produce(purchase)\n\n const playerEntryFee = this.priceSatoshis\n const mineEntryFee = parseInt(playerEntryFee / mines.length)\n const totalEntryFee = playerEntryFee + (mineEntryFee * mines.length)\n const gameFee = parseInt(totalEntryFee * GameFactory.gameFee)\n const reward = totalEntryFee - gameFee\n\n const mineIds = []\n\n for (let mine of mines) {\n mineIds.push(mine.id)\n mine.withdraw(mineEntryFee)\n }\n\n this.numberGames = this.numberGames + 1\n\n const game = new Game(this.numberGames, purchase.buyer, mineIds, reward)\n\n this.satoshis = this.satoshis + purchase.satoshis\n\n purchase.destroy()\n\n return game\n }\n\n}",{"deps":{"Factory":{"$jig":2},"Game":{"$jig":4},"expect":{"$dup":["1","deps","expect"]}},"gameFee":0.1},"class Game extends Jig {\n\n init(id, player, mineIds, reward){\n this.id = id\n this.player = player\n this.mineIds = mineIds\n this.satoshis = reward\n this.result = null\n }\n\n win(mines){\n expect(this.result).toBe(null)\n\n for(let mine of mines){\n mine.incrementLost()\n }\n\n this.result = 'won'\n this.owner = this.player\n }\n\n lose(mines){\n expect(this.result).toBe(null)\n\n const satoshis = parseInt(this.satoshis/mines.length)\n\n for(let mine of mines){\n mine.incrementWon()\n mine.deposit(satoshis)\n }\n\n this.result = 'won'\n this.satoshi = 0\n this.destroy()\n }\n\n withdraw(){\n expect(this.owner).toEqual(this.player)\n\n this.satoshis = 0\n this.destroy()\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"expect":{"$dup":["1","deps","expect"]}}}]}]}
    https://whatsonchain.com/tx/b77ae8e801bdc8aec90e28db88cbb9928357e02507af14d13c93c088e9205eb0