Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

c3fb034a1a3d1f8148a7b97a32eeb8e01a70df509d672ab515680d18dbd2a2fb
Timestamp (utc)
2021-02-17 21:25:10
Fee Paid
0.00003489 BSV
(
0.00463396 BSV
-
0.00459907 BSV
)
Fee Rate
510.1 sat/KB
Version
1
Confirmations
316,032
Size Stats
6,839 B

3 Outputs

Total Output:
0.00459907 BSV
  • jrun cryptofightsM³{"in":0,"ref":["f2fdcb8e1e7465496418745bc700c18ccb63349cb4d9af9037cb8e680b40d0f4_o1","e68059b9fa0ab585eba3c56aa74c19f6995ab0a58949cbe38c8e196d0aa42e5c_o1","a34d00702f70ed911602954d859feb8d66d40e5cf4b01eb30f375becb3d40af3_o1","6939b560abd6d2031fc50417abea833a30c09080b5bd0766a19ea1489430a852_o1","be7daf36641ba33aad8f42e02adbbcb48fb88cc0c6ac6b56f4c85369dcd2dfa1_o1","507b9cffbeb94c2386e054f3d63617f7b091e0bdb1619a99c3cd04e309be45f3_o1","b61ceaab3690af8868f1b305d30b9ea37688681de59732610963091f7b8277da_o1","b2ddb06a8acf4f6e7f594d812982ef6a924390d6e898a83140aa58606b1d2d05_o1","09bd143029afaade742ebe5b7a809e44d3dbd0282294a3106a9a227fa1ba8a65_o1","589e107231b17445bc648ace9e1a852d201409a3ed42280c3f5ff4033c1a28ac_o1"],"out":["839e6b963f0f580127de71b3c1fe2c3fa6e6e7ad48f9c20d52ff90030fcb7d6e"],"del":[],"cre":["n2Bd4cWhEQK1aVjb1R7EBGV9mrw3etvSdC"],"exec":[{"op":"DEPLOY","data":["class Battle extends KronoJig {\n init(validator, rules, players, id, timestamp) {\n this.validator = validator;\n this.id = this.random = id;\n this.timestamp = timestamp;\n this.rules = rules;\n\n this.battlePlayers = players.map(player => rules.joinBattle(validator, player));\n this.battlegroundTier = rules.tier;\n this.dice = new Dice(id);\n this.state = BattleUtils.buildBattleState(this.battlePlayers, this.dice);\n this.turnCount = 0;\n\n this.satoshis = 546;\n\n this.stateHash = Sha256.hashToHex(JSON.stringify(this.state));\n this.status = Constants.Status.Open;\n this.stateHistory = [];\n this.actor = players[this.state.playerToAct].pubkey;\n this.stage = 'created';\n }\n\n begin(timeout) {\n if (this.stage !== 'created') throw new Error('Invalid Stage');\n this.timeout = timeout;\n delete this.stage;\n }\n\n resolve(random, timestamp, timeout, actionIndex, clientTimestamp, sig) {\n console.log('Resolve', this.location);\n if (this.status !== Constants.Status.Open) throw new Error('Invalid Status');\n if (!BattleUtils.validateRandom(random, this.random)) throw new Error('Invalid Random');\n this.random = random;\n\n this.stateHistory[this.turnCount] = this.getState();\n const state = KronoClass.deepClone(this.state);\n state.actionLogs = [];\n this.dice = new Dice(random);\n if (timestamp < this.timeout) {\n if (actionIndex === -1) {\n this.state = BattleUtils.skipTurn(this, state, this.dice, timestamp);\n } else {\n const attacker = this.battlePlayers[this.state.playerToAct];\n const skill = attacker.skills[actionIndex];\n if (!skill) throw new Error(`${attacker.fighter.displayName} used an invalid Skill ID: ${actionIndex}`);\n this.state = skill.run(this, state, this.dice, timestamp);\n }\n } else {\n this.state = BattleUtils.skipTurn(this, state, this.dice, timestamp);\n }\n\n this.status = this.state.status;\n this.timestamp = timestamp;\n this.timeout = timeout;\n this._endTurn();\n }\n\n forfeit(message, timestamp) {\n if (this.status !== Constants.Status.Open) throw new Error('Invalid Status');\n const playerIndex = this.battlePlayers.findIndex(p => p.pubkey === message.from);\n const victorIndex = this.battlePlayers.findIndex(p => p.pubkey !== message.from);\n this.stateHistory[this.turnCount] = this.getState();\n\n const state = KronoClass.deepClone(this.state);\n state.victor = {\n pubkey: this.battlePlayers[victorIndex].pubkey,\n owner: this.battlePlayers[victorIndex].owner,\n fighter: this.battlePlayers[victorIndex].fighter,\n };\n state.actionLogs = [{\n playerIndex: playerIndex,\n actionLogMessage: `<gradient=!player${playerIndex}-color><b>${this.battlePlayers[playerIndex].fighter.displayName.toUpperCase()}</b> <gradient=!log-color> Forfeited`\n }];\n state.playerToAct = victorIndex;\n this.state = state;\n\n this.status = state.status = Constants.Status.Forfeit;\n this.timestamp = timestamp;\n this._endTurn();\n }\n\n _endTurn() {\n if (this.status !== Constants.Status.Open) {\n this.victor = {...this.battlePlayers[this.state.playerToAct]};\n this._finalize();\n }\n this.turnCount++;\n this.stateHash = Sha256.hashToHex(JSON.stringify(this.state));\n this.actor = this.battlePlayers[this.state.playerToAct].pubkey;\n }\n\n _finalize() {\n // if(![Constants.Status.Complete, Constants.Status.Forfeit].includes(this.status)) throw new Error('Invalid Status');\n const victor = this.victor;\n this.xp = Battle.LevelXPReward[victor.fighter.level];\n if(this.rules.fee) {\n console.log('Reward:', this.rules.reward);\n let coins = this.battlePlayers.map(p => p.coin);\n const coin = coins.pop();\n coin.combine(...coins);\n console.log('Coin Amount:', coin.amount);\n coin.send(victor.coinLock, this.rules.reward);\n }\n\n if (!victor.tags.includes('bot')) {\n this.rewards = this.rules.issueRewards(this.dice, this.battlegroundTier, victor.owner);\n }\n this.battlePlayers.forEach(player => new BattleToken(player.owner));\n this.owner = victor.owner;\n // this.status = Constants.Status.Finalized;\n }\n\n getState() {\n const state = {\n ...this.state,\n location: this.location,\n actor: this.actor,\n battleId: this.id,\n random: this.random,\n stateHash: this.stateHash,\n timestamp: this.timestamp,\n turnCount: this.turnCount,\n timeout: this.timeout,\n battleStatus: this.status\n };\n return state;\n }\n\n toObject(skipKeys = []) {\n return super.toObject([...skipKeys, 'tokens']);\n }\n}",{"LevelXPReward":[0,100,200,300,600,1200,2400,0,435,556,713,913,1170,1498,1919,2458,3148,4032,5164,6614,8472],"MaxRounds":100,"deps":{"Action":{"$jig":0},"BattleToken":{"$jig":1},"BattleUtils":{"$jig":2},"Constants":{"$jig":3},"Dice":{"$jig":4},"KronoClass":{"$jig":5},"KronoCoin":{"$jig":6},"KronoItem":{"$jig":7},"KronoJig":{"$jig":8},"Sha256":{"$jig":9}},"hash":"59f98338fdb4f6c6613ac25d8bbe670323238ebd63ec2cc78324b04365e812f7"}]}]}
    https://whatsonchain.com/tx/c3fb034a1a3d1f8148a7b97a32eeb8e01a70df509d672ab515680d18dbd2a2fb