Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

4ab42e943cdcab7a94a320efd5f528040b10ceb6e2b19ecb006d1d4e14312c0a
Timestamp (utc)
2021-06-07 03:34:34
Fee Paid
0.00001830 BSV
(
0.01000000 BSV
-
0.00998170 BSV
)
Fee Rate
500.4 sat/KB
Version
1
Confirmations
296,001
Size Stats
3,657 B

5 Outputs

Total Output:
0.00998170 BSV
  • jrunM {"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["1507da18e51ee662c15ca668adc881420f2a1796b7926c14d3408e7743745ad7","839583a27585b4abdfeda1325e4544d707d6a3f9f2bd8db8cccc1fea093f022d","5080d58429b2761c0fc5a04c33c41a751cb1e927005a12a96d65400255eae896"],"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 mineLocations = []\n\n for (let mine of mines) {\n mineLocations.push(mine.location)\n mine.withdraw(mineEntryFee)\n }\n\n this.numberGames = this.numberGames + 1\n\n const game = new Game(this.numberGames, purchase.buyer, mineLocations, 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, mineLocations, reward){\n this.id = id\n this.player = player\n this.mineLocations = mineLocations\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.incrementLosses()\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.incrementWins()\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/4ab42e943cdcab7a94a320efd5f528040b10ceb6e2b19ecb006d1d4e14312c0a