Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

23802255df5eb528f85cd7d2086f2416c93ce0fb1a3c06a2bd56e1f8a87e46f2
Timestamp (utc)
2022-02-23 01:45:34
Fee Paid
0.00006384 BSV
(
19.91256731 BSV
-
19.912503469999997 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
248,926
Size Stats
12,766 B

10 Outputs

Total Output:
19.912503469999997 BSV
  • jrunLoUM`/{"in":1,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1","63e0e1268d8ab021d1c578afb8eaa0828ccbba431ffffd9309d04b78ebeb6e56_o1"],"out":["7f540d80516a1c1c0fbe0631edd9ca980991c4279b1622f617070df04e7d1702","066bfe489e43578b805626407f22d016284c71c8dd5bddacce3e7bb2bb61de8d","0b39916fe0e31efd1f1b884331c9b65520bd9ad29ca2a339cacd7a53802cc33b","eeffd97d35aa5df50fe91c1c7709b03d7f211b4fa9efdca1b59a56e9a8ca66b6","03ffb3b269588d6a0caae64b23b2687d1fb0a51a99e30ccccf955cf2fc9cbeaa","e65d34fe8aa8ccdbb9b20e861cdb310b338aaf6ec5578d55ddf362eb807e21ec","66ceabbcf1864f096968cab63b1ba4daf13c95a144e98745daf79ca302a8209c","2b983b2c726882fff8ca33c55119aaac179481947ae5bc37ac7ebb5a0eb76f14"],"del":[],"cre":["mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1"],"exec":[{"op":"DEPLOY","data":["class CardJig extends Jig {\n init(owner, cardId) {\n expect(caller).toBe(CardJigCode);\n this.owner = owner;\n this.cardId = cardId;\n }\n static print(owner, cardId) {\n // only code owner can call this\n return new CardJigCode(owner, cardId);\n }\n}",{"deps":{"CardJigCode":{"$jig":4},"Jig":{"$jig":1},"expect":{"$jig":2}},"metadata":{"emoji":"🃏"}},"function groupBy(arr, selector) {\n let grouped = {};\n for (const item of arr) {\n const val = selector(item);\n grouped[val] = grouped[val] || [];\n grouped[val].push(item);\n }\n return grouped;\n}",{"deps":{}},"function isValidCardId(cardId) {\n return /^[A-Z]{3}[0-9A-Z]{0,3}\\/\\d+$/.test(cardId);\n}",{"deps":{}},"class GameCardStateJig extends Jig {\n init(owner, initialDefinitionSig, initialZone) {\n this.owner = owner;\n this.defSig = initialDefinitionSig;\n this.zone = initialZone;\n this.controllingPlayerId = owner;\n this.turnEnteredPlay = null;\n }\n _validateZoneDefSig(zone, defSig) {\n if (LVL1_ZONES.includes(zone) && !isValidCardId(defSig)) {\n throw new Error(`Card defSig not level one for public zone ${zone}. ${defSig}`);\n }\n if (LVL2_ZONES.includes(zone) && !defSig.startsWith(\"2\")) {\n throw new Error(`Card defSig not level two for zone ${zone}. ${defSig}`);\n }\n if (LVL3_ZONES.includes(zone) && !defSig.startsWith(\"3\")) {\n throw new Error(`Card defSig not level three for zone ${zone}. ${defSig}`);\n }\n }\n setZone(zone, defSig) {\n if (zone === GZone.Stack) {\n throw new Error(\"Call addStack to add to stack\");\n }\n if (zone === GZone.Battlefield) {\n throw new Error(\"Call addToBattlefield\");\n }\n this.zone = zone;\n if (defSig) {\n this.defSig = defSig;\n }\n this._validateZoneDefSig(zone, this.defSig);\n this.turnEnteredPlay = null;\n }\n addToBattlefield(game, args = {}) {\n this.turnEnteredPlay = game.state.currentTurn;\n this.isTapped = args.tapped;\n this.zone = GZone.Battlefield;\n this.attrs = {};\n if (args.initialAttrs) {\n const grouped = Object.fromEntries(Object.entries(groupBy(args.initialAttrs, x => x.mod)).map(([mod, attrs]) => [\n mod,\n attrs.reduce((prev, next) => prev + next.count || 1, 0)\n ]));\n this.attrs = grouped;\n }\n if (args.defSig) {\n this.defSig = args.defSig;\n }\n this._validateZoneDefSig(this.zone, this.defSig);\n }\n addToStack(defSig) {\n this._validateZoneDefSig(GZone.Stack, defSig);\n this.zone = GZone.Stack;\n this.defSig = defSig;\n }\n setDefSig(sig) {\n this._validateZoneDefSig(this.zone, sig);\n this.defSig = sig;\n }\n setTapped(isTapped) {\n this.isTapped = isTapped;\n }\n addAttributes(attrs) {\n for (const attr of attrs) {\n const exist = this.attrs[attr.mod];\n if (exist && attr.count) {\n this.attrs[attr.mod] = exist + attr.count;\n }\n else if (!exist) {\n this.attrs[attr.mod] = attr.count;\n }\n }\n }\n removeAttributes(attrsToRemove) {\n if (attrsToRemove) {\n for (const attr of attrsToRemove) {\n if (attr.mod in this.attrs) {\n if (attr.count) {\n // if they pass a number, reduce it by that number\n this.attrs[attr.mod] -= attr.count;\n if (this.attrs[attr.mod] <= 0) {\n delete this.attrs[attr.mod];\n }\n }\n else {\n delete this.attrs[attr.mod];\n }\n }\n }\n }\n else {\n this.attrs = {};\n }\n }\n resetWithSig(sig, zone, currentTurn, isTapped) {\n if (zone === GZone.Stack) {\n throw new Error(\"Call addStack to add to stack\");\n }\n if (zone === GZone.Battlefield) {\n this.turnEnteredPlay = currentTurn;\n }\n else {\n this.turnEnteredPlay = null;\n }\n this._validateZoneDefSig(zone, sig);\n this.defSig = sig;\n this.zone = zone;\n this.isTapped = isTapped;\n this.controllingPlayerId = this.owner;\n }\n}",{"deps":{"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"Jig":{"$dup":["1","deps","Jig"]},"LVL1_ZONES":["Battlefield","Stack","Discard","Trash"],"LVL2_ZONES":["Hand","Sideboard"],"LVL3_ZONES":["Deck"],"groupBy":{"$jig":5},"isValidCardId":{"$jig":6}},"metadata":{"emoji":"🎴"}},"class GameDeckJig extends Jig {\n init(owner, locationSigs, cardHashes) {\n expect(locationSigs).toBeObject();\n expect(cardHashes).toBeArray();\n this.owner = owner;\n this.locationSigs = locationSigs;\n this.cardHashes = cardHashes;\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"expect":{"$dup":["1","deps","expect"]}},"metadata":{"emoji":"🎴"}},"class PlayerJig extends Jig {\n init(owner, playerName) {\n this.owner = owner;\n this.playerName = playerName;\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]}},"metadata":{"emoji":"👨‍💻️"}},"class GamePlayerJig extends Jig {\n init(player, startingLife, deck) {\n expect(deck).toBeInstanceOf(GameDeckJig);\n function isRealPlayer(obj) {\n return obj && \"owner\" in obj;\n }\n if (isRealPlayer(player)) {\n this.owner = player.owner;\n this.playerName = player.playerName;\n }\n else {\n this.owner = player.address;\n this.playerName = \"Computer\";\n this.isAI = true;\n this.aiPrivKeyEncr = player.privKeyEncrypted;\n }\n this.maxPermTreasuresPlayedPerTurn = 1;\n this.permTreasuresPlayedThisTurn = 0;\n this.life = startingLife;\n this.maxHandSize = 5;\n this._prevMaxHandSize = 5;\n this.isDead = false;\n this.floatingMana = {\n Yellow: 0,\n Purple: 0,\n Red: 0,\n Blue: 0,\n Green: 0,\n Colorless: 0\n };\n // init(owner: string, initialDefinitionSig: string, initialZone: Zone)\n this.cardStates = deck.locationSigs.deck\n .map(x => new GameCardStateJig(this.owner, x, GZone.Deck))\n .concat(deck.locationSigs.sideboard.map(x => new GameCardStateJig(this.owner, x, GZone.Sideboard)));\n this.startingDeck = deck;\n }\n resetTreasuresPlayed() {\n this.permTreasuresPlayedThisTurn = 0;\n }\n setMaxHandSize(size) {\n this._prevMaxHandSize = this.maxHandSize;\n this.maxHandSize = size;\n }\n revertMaxHandSize(size) {\n this.maxHandSize = this._prevMaxHandSize;\n }\n setMana(floating) {\n this.floatingMana = floating;\n }\n addMana(color, amount) {\n this.floatingMana[color] += amount;\n }\n incrPermTreasuresPlayed() {\n this.permTreasuresPlayedThisTurn++;\n }\n incrLife(amount) {\n this.life += amount;\n }\n setMaxPermTreasures(value) {\n this.maxPermTreasuresPlayedPerTurn = value;\n }\n setDeckCards(newDeck) {\n // remove old deck cards and concat new ones\n this.cardStates = this.cardStates.filter(x => x.zone !== GZone.Deck).concat(newDeck);\n }\n}",{"deps":{"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"GameCardStateJig":{"$jig":7},"GameDeckJig":{"$jig":8},"Jig":{"$dup":["1","deps","Jig"]},"PlayerJig":{"$jig":9},"expect":{"$dup":["1","deps","expect"]}},"metadata":{"emoji":"🧙"}}]},{"op":"UPGRADE","data":[{"$jig":0},"class GameJig extends Jig {\n init(owner, gameId, players) {\n this.owner = owner;\n for (const p of players) {\n expect(p).toBeInstanceOf(GamePlayerJig);\n }\n this.players = players;\n this.turnOrder = players.map(x => x.owner);\n this.gameId = gameId;\n this.activeEffects = [];\n this.stackNonceIndex = 0;\n }\n pushCardStack(ability) {\n ability.nonce = ++this.stackNonceIndex;\n this.state.stack.push(ability);\n }\n popCardStack() {\n const rtn = this.state.stack.pop();\n return rtn;\n }\n setGameState(state) {\n this.state = state;\n }\n addEffects(effects) {\n this.activeEffects.push(...effects);\n }\n removeEffect(ownerPlayerId, effectKey) {\n const index = this.activeEffects.findIndex(x => x.effectKey === effectKey && x.ownerPlayerId === ownerPlayerId);\n if (~index) {\n this.activeEffects.splice(index, 1);\n return true;\n }\n else {\n return false;\n }\n }\n onTurnEnd() {\n this.declaredAttacks = null;\n const prev = this.state;\n const lastTurnPlayer = prev.turnQueue.shift();\n this.state = {\n ...prev,\n currentTurn: prev.currentTurn + 1,\n turnQueue: lastTurnPlayer.isUnorthodoxTurn\n ? // player had an additional turn, ignore queue shift\n prev.turnQueue.slice()\n : [...prev.turnQueue, lastTurnPlayer],\n currentPhase: UpkeepPhase\n };\n }\n declareAttackers(attackers) {\n this.declaredAttacks = attackers;\n }\n declareBlockers(attacker, blocker) {\n const attack = this.declaredAttacks.find(x => x.attacker === attacker);\n if (!attack) {\n return false;\n }\n attack.blockers || (attack.blockers = []);\n if (!attack.blockers.includes(blocker)) {\n attack.blockers.push(blocker);\n return true;\n }\n return false;\n }\n removeBlockers(attacker, blocker) {\n const attack = this.declaredAttacks.find(x => x.attacker === attacker);\n if (!attack) {\n return false;\n }\n const index = attack.blockers.indexOf(blocker);\n if (~index) {\n attack.blockers.splice(index, 1);\n return true;\n }\n return false;\n }\n}",{"deps":{"CardJig":{"$jig":4},"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"GameCardStateJig":{"$jig":7},"GameDeckJig":{"$jig":8},"GamePlayerJig":{"$jig":10},"Group":{"$jig":3},"Jig":{"$jig":1},"PlayerJig":{"$jig":9},"UpkeepPhase":"Upkeep","expect":{"$jig":2}},"metadata":{"emoji":"🕹️"}}]}]}
    https://whatsonchain.com/tx/23802255df5eb528f85cd7d2086f2416c93ce0fb1a3c06a2bd56e1f8a87e46f2
Total Output:
19.912503469999997 BSV