SPACE VM DEPLOY::{"v":0.1,"spaceid":"bfvm","type":"btc20","token_name":"bfvm","mint_supply":2873000,"supply":21000000,"balances":{"bc1pvh5yw89zjw5y2epdc2dkmfanyjtu2u7dqdg29asql2gnmtddlfdsrfxngn":5000,"bc1peae7aw7y9jsg2janzcmg2esmrmwrmcsgv4kcg72dnsut0mfas34qhjygd9":"45999.00001","bc1psqn7sw7hyazqt4fc6tf034jmjx9vpnf0fgvg2vxgvq3fha0ze8aq04g2xw":3000,"bc1pg59y7h54aaw0dayd6xzkpk7smuef8vjezq3x6k6unzmhd4f07zgq8vn8tj":3000,"bc1pw6xwtetegm39ekgml2v97xqjc9jedy2fplmgrxknp44qn45c6mfqr3pd27":2000,"bc1pwujkjgc9m4xgadymvlvzlsj37vwfvy7aa5kwxel4ep4cvfd53qlqgpcx0z":3000,"bc1pdkm4zgxh5c5nrtqzh978cg6vqneeftv9kctpc6fy9z8752wvcqws6juc2c":2000,"bc1phe3ahsfk3tpjjlxp5qwt5wtqysk36j23xzfwds7tgn6362wvx9hqhl7xr2":3000,"bc1p5czrstutg7p29un5w5976mr8wxjymykze7mgak60tkweaz99h2ks5txehk":1000.99999,"bc1pmc4jg2fa82q005vntagt3zw0l3xz9m59tetwlz7utxf0l6rgkujqt4k2ct":"38999.891000","bc1pkeyngxjp8mwtq4pc2pc7xklk42vkuyha37k78esz520n80yaphdqt4pldk":50000,"bc1pm50xtr33km6qz8tr5cdm5c2alvy6ph8fajf9jvhlh9tfqaxc4gzqf88uz9":49000,"bc1phk6fekg30vdvlegtwjcueneavtemn9u2p34sve3u7nuz0evtlkssngvpfl":50000,"bc1pr6kppv20u2l2u4fhtz4732qjl4830xe887g5eh0hjh4crf8xasaq2usgzv":49000,"bc1pnkgh9qyv7q9ec3zv5e8mh9rtswtz5m72869589eqk2p5zrwgukvqdpq3vj":44000,"bc1pqpjx4xlwjnd4we95r30pc7sgu46pnzkz0cyev4qesgz3zwlzclvspg6cpj":50000,"bc1puk4mxfn2z38pw25yyanx7hfeqx8h9hdupchme8he5xtmm29uq8hq4mj9hl":50000,"bc1p2kcz4ksqvavhau9992c0hdee332yzqzty4jr7wkne2shv6ma3d9qvuzsx6":50000,"bc1pzefrqlnkw5z99rsdylujsww45s8dsw8jhy2e7rzff0sk0etx8las3s6qqs":11000.11,"bc1pldgacnzmu3kv3mnez6zzc85t8w9uqwvr4wq8neg34hre6t942cuqjrzs25":50000,"bc1px9zycsgdr65hqltzg7fjk7u4hmax5t9mjw7zcp674j9gm9qq4rhst72lu0":43000,"bc1pq2seycsqavjguyfgh5wksaz3yfrvhjw5kz5c2rtl2cg9q38vn39qf7q99m":50000,"bc1pmfg86wwv6wj59mgzu2swh6nh7606xpkcamhm3k2esgp8fkkcujssfgka6r":45000,"bc1pv27ee6tupysfzq6e9e3xs8u8z9rztkueklmv6cew89y9hhaq9m6snuetg9":19000,"bc1pfpu6nkh48nhwy73cqfwkj7eljnw3nsa7txx0xj7ua3vppcrvqgsq85mgd6":50000,"bc1pzcmnhj7jdwkptyr93hep37h995qjlg32af5w6pzhekepkm5nxuxq4ryaaq":6000,"bc1p6lz5qz8gd2t7m6eqpmcuythcfjztvy79am4fmptm5r6rsy4rtn8qeny6vn":2100000},"utxos":{}} function pub_mint(){ if(mint_supply < supply){ const to = Transaction.outputs[1].address const max_mint = 50000 const balance = balances[to] if(typeof balance === 'undefined'){ balance = 1000 }else{ balance = balance + 1000 } if(balance <= max_mint) { balances[to] = balance mint_supply = mint_supply + 1000 const hash = Transaction.txid + 'i' + 1 let curr_utxo = {} if(typeof utxos[to] !== 'undefined'){ curr_utxo = utxos[to] } curr_utxo[hash] = 1000 utxos[to] = curr_utxo } } } function pub_reutxo(){ const from = Transaction.inputs[0].address if(typeof balances[from] !== 'undefined'){ if(BN.isGreaterThanOrEqualTo(balances[from], 0)){ if(typeof utxos[from] === 'undefined'){ const hash = Transaction.txid + 'i' + 1 let curr_utxo = {} const total = balances[from] curr_utxo[hash] = total utxos[from] = curr_utxo } } } } function pub_transfer(num, FUI, TUI){ if(typeof num === 'number'){ if(BN.decimal(num) === true){ if(num > 0) { const from = Transaction.inputs[0].address let to = Transaction.outputs[TUI].address let avb = 0 let inputs = Transaction.inputs let i = 0 let from_utxo = {} while(i < inputs.length){ let id = inputs[i].prevTxId + 'i' + inputs[i].outputIndex if(typeof utxos[from] !== 'undefined'){ from_utxo = utxos[from] if(typeof utxos[from][id] !== 'undefined'){ avb = BN.plus(avb, utxos[from][id]) delete from_utxo[id] } } i = i + 1 } if(typeof balances[from] !== 'undefined'){ if(BN.isGreaterThanOrEqualTo(balances[from], num)){ if(BN.isGreaterThanOrEqualTo(avb, num)){ balances[from] = BN.minus(balances[from], num) if(typeof balances[to] !== 'undefined'){ balances[to] = BN.plus(balances[to], num) }else{ balances[to] = num } // return self let curr_utxo = {} if(typeof utxos[to] !== 'undefined'){ curr_utxo = utxos[to] } curr_utxo[Transaction.txid + 'i' + TUI] = num if(avb != num){ from_utxo[Transaction.txid + 'i' + FUI] = BN.minus(avb, num) } utxos[to] = curr_utxo utxos[from] = from_utxo } } } } } } }