From 182ecaae2ac323f7c9851f3818ebd68f81d87117 Mon Sep 17 00:00:00 2001 From: git Date: Fri, 5 Mar 2021 17:10:15 +0100 Subject: [PATCH] README.md --- README.md | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f3154b --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# `(FS)Informatics-Coin ($Inf) on NEO2 blockchain` + +Previously FSInf-Coin. Monkeying around with neo2 smart contracts. + +[Informatics-Coin ($Inf) website](https://infcoin.jvales.net/) + +DOGE war gestern. BUY INF! FOMO! ALL-IN! + + +## dev-testing (neopy) +Shell: + ++ sudo docker run --rm -d --name neo-privatenet -v /home/someone/gitstuff/neo-infcoin/:/neo-python/sc -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet ++ sudo docker exec -it neo-privatenet /bin/bash ++ neopy + + wallet open neo-privnet.wallet + + wallet import wif ... + + wallet send c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg 100000000 + + wallet send 602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7 AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg 10000 + + wallet rebuild + + config sc-events on + + sc debugstorage reset + + sc build\_run sc/InfCoin.py True True False 0710 07 name [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 02 decimals [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 07 symbol [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 01 owner\_mint ["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg", 100000] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 02 totalSupply [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 02 balanceOf ["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 01 owner\_burn [50000] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 02 totalSupply [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 10 owner\_dump [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 07 owner\_migrate\_contract ["0101010", "0710", "01", 3, "Inf-Coin NEO2Testnet", "v2", "Someone", "someone@fsinf.at", "Informatics token v2"] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + sc build\_run sc/InfCoin.py True True False 0710 07 owner\_destroy\_contract [] --owners=["AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg"] + + + +## deploy (neo-go) +Shell: + ++ ./compile.py ++ tmux: + + ./neo-go node -t + + ./neo-go contract deploy -i /home/someone/gitstuff/neo-infcoin/InfCoin.avm -c /home/someone/gitstuff/neo-infcoin/InfCoin.yml -e "http://127.0.0.1:20332/" -w wallet.json -a AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg + + curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"getapplicationlog", "params":["TXHASH"]}' | jq + + ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"invokefunction", "params":["f26c60f640091e2fa8cd15b30bb5f51cd4d2048b", "name", [] ]}' ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"invokefunction", "params":["f26c60f640091e2fa8cd15b30bb5f51cd4d2048b", "symbol", [] ]}' ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"invokefunction", "params":["f26c60f640091e2fa8cd15b30bb5f51cd4d2048b", "totalSupply", [] ]}' ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"invokefunction", "params":["f26c60f640091e2fa8cd15b30bb5f51cd4d2048b", "balanceOf", [{ "type": "Hash160", "value": "0x5e82eb14cc95e5e5957ad37f822f490679377b78" }] ]}' + + + +### Owner-Manage +Shell: + +``./neo-go contract invokefunction -e http://127.0.0.1:20332/ -w wallet.json -a AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg f26c60f640091e2fa8cd15b30bb5f51cd4d2048b owner_dump ""`` + ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"getapplicationlog", "params":["TXHASH"]}' | jq + +``./neo-go contract invokefunction -e "http://127.0.0.1:20332/" -w wallet.json -g 1 -s 1000 -a AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg f26c60f640091e2fa8cd15b30bb5f51cd4d2048b owner_migrate_contract bytes:012ac56b6a00527ac46a51527ac4140e4228f96868079daad2a5a83e93abbe5caf221d6a52527ac414496e666f726d617469637320746f6b656e2076326a53527ac403496e666a54527ac4526a55527ac468164e656f2e52756e74696d652e47657454726967676572616a56527ac46a56c3010087643b006a52c368184e656f2e52756e74696d652e436865636b5769746e657373616315000c556e617574686f72697a6564e00101120461516c7566616a56c301108764e2036a00c3046e616d65876409006a53c36c7566616a00c308646563696d616c73876409006a55c36c7566616a00c30673796d626f6c876409006a54c36c7566616a00c30b746f74616c537570706c798764240068164e656f2e53746f726167652e476574436f6e7465787461e00101f10b6c7566616a00c30962616c616e63654f66876452006a51c3c0518763210018496e636f727265637420617267756d656e7420636f756e74e0010157036168164e656f2e53746f726167652e476574436f6e74657874616a51c300c37ce00102470b6c7566616a00c3087472616e7366657287649d006a51c3c0538763210018496e636f727265637420617267756d656e7420636f756e74e00101f7026168164e656f2e53746f726167652e476574436f6e74657874616a51c300c36a51c351c36a51c352c3682b53797374656d2e457865637574696f6e456e67696e652e47657443616c6c696e6753637269707448617368615479517956727551727553795279557275527275e001058f086c7566616a00c30a6f776e65725f6d696e74876458006a51c3c0528763210018496e636f727265637420617267756d656e7420636f756e74e001014a026168164e656f2e53746f726167652e476574436f6e74657874616a51c300c36a51c351c35272e00103ba066c7566616a00c30a6f776e65725f6275726e876452006a51c3c0518763210018496e636f727265637420617267756d656e7420636f756e74e00101e2016168164e656f2e53746f726167652e476574436f6e74657874616a51c300c37ce00102a0046c7566616a00c3166f776e65725f6d6967726174655f636f6e74726163748764d9006a51c3c0598763210018496e636f727265637420617267756d656e7420636f756e74e0010174016168164e656f2e53746f726167652e476574436f6e74657874616a51c300c36a51c351c36a51c352c36a51c353c36a51c354c36a51c355c36a51c356c36a51c357c36a51c358c3682b53797374656d2e457865637574696f6e456e67696e652e47657443616c6c696e6753637269707448617368615a7951795c7275517275597952795b7275527275587953795a72755372755779547959727554727556795579587275557275e0010b36026c7566616a00c3166f776e65725f64657374726f795f636f6e7472616374876451006a52c368184e656f2e52756e74696d652e436865636b5769746e657373616315000c556e617574686f72697a6564e0010173006168144e656f2e436f6e74726163742e44657374726f79616c7566616a00c30a6f776e65725f64756d708764240068164e656f2e53746f726167652e476574436f6e7465787461e00101bb006c75666100631a0011556e6b6e6f776e206f7065726174696f6ee00101080061006c756655c56b6a00527ac46a00c3056572726f7252c168124e656f2e52756e74696d652e4e6f746966796a00c3f0006c756659c56b6a00527ac46a51527ac46a00c3681a4e656f2e426c6f636b636861696e2e476574436f6e7472616374616416006a00c36a51c387640700516c756661006c7566616a00c368184e656f2e52756e74696d652e436865636b5769746e657373616c75665ac56b6a00527ac4140e4228f96868079daad2a5a83e93abbe5caf221d6a51527ac46a51c368184e656f2e52756e74696d652e436865636b5769746e657373616315000c556e617574686f72697a6564e001011aff6100c176c96a52527ac46a00c3007c68104e656f2e53746f726167652e46696e64616a53527ac461616a53c368114e656f2e4974657261746f722e4e65787461643c006a52c36a53c368104e656f2e4974657261746f722e4b6579616a53c368124e656f2e4974657261746f722e56616c75656152c176c9c862afff6161616a52c36c75660115c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46a56527ac46a57527ac46a58527ac46a59527ac46a5a527ac4140e4228f96868079daad2a5a83e93abbe5caf221d6a5b527ac46a5bc368184e656f2e52756e74696d652e436865636b5769746e657373616315000c556e617574686f72697a6564e001010dfe616a00c36a5ac37c680f4e656f2e53746f726167652e476574616a5c527ac46a5cc300a0646a004c5043616e6e6f74206d696772617465207965742e20506c65617365207472616e7366657220616c6c206e656f2f67617320616e6420746f6b656e732066726f6d20636f6e74726163742061646472657373680f4e656f2e52756e74696d652e4c6f67006c7566616a51c36a52c36a53c36a54c36a55c36a56c36a57c36a58c36a59c3587951795a727551727557795279597275527275567953795872755372755579547957727554727568144e656f2e436f6e74726163742e4d69677261746561516c75660113c56b6a00527ac46a51527ac4140e4228f96868079daad2a5a83e93abbe5caf221d6a52527ac46a52c368184e656f2e52756e74696d652e436865636b5769746e657373616315000c556e617574686f72697a6564e00101c5fc616a51c300a06317000e496e76616c696420616d6f756e74e00101a8fc616a00c36a52c37c680f4e656f2e53746f726167652e476574616a53527ac46a53c36a51c3a2631b0012496e73756666696369656e742066756e6473e0010167fc616a53c36a51c3876447001352656d6f76696e6720616c6c2066756e647321680f4e656f2e52756e74696d652e4c6f676a00c36a52c37c68124e656f2e53746f726167652e44656c65746561622d00616a53c36a51c3946a54527ac46a00c36a52c36a54c35272680f4e656f2e53746f726167652e50757461616a00c30b746f74616c537570706c797c680f4e656f2e53746f726167652e476574616a55527ac46a55c36a51c3946a56527ac46a00c30b746f74616c537570706c796a56c35272680f4e656f2e53746f726167652e507574616a52c3006a51c35272087472616e7366657254c168124e656f2e52756e74696d652e4e6f74696679516c75660111c56b6a00527ac46a51527ac46a52527ac4140e4228f96868079daad2a5a83e93abbe5caf221d6a53527ac46a53c368184e656f2e52756e74696d652e436865636b5769746e657373616315000c556e617574686f72697a6564e0010108fb616a51c3c0011487631b0012496e76616c696420746f2061646472657373e00101e5fa616a52c300a06317000e496e76616c696420616d6f756e74e00101c8fa616a00c36a51c37c680f4e656f2e53746f726167652e476574616a54527ac46a54c36a52c3936a55527ac46a00c36a51c36a55c35272680f4e656f2e53746f726167652e507574616a00c30b746f74616c537570706c797c680f4e656f2e53746f726167652e476574616a56527ac46a56c36a52c3936a57527ac46a00c30b746f74616c537570706c796a57c35272680f4e656f2e53746f726167652e50757461006a51c36a52c35272087472616e7366657254c168124e656f2e52756e74696d652e4e6f74696679516c7566011ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a53c300a06317000e496e76616c696420616d6f756e74e00101c2f9616a51c3c0011487631d0014496e76616c69642066726f6d2061646472657373e001019df9616a52c3c0011487631b0012496e76616c696420746f2061646472657373e001017af9616a51c36a54c37ce001029cf9631e00155472616e7366657220756e617574686f72697a6564e001014ff9616a51c36a52c387642900105472616e7366657220746f2073656c66680f4e656f2e52756e74696d652e4c6f67516c7566616a00c36a51c37c680f4e656f2e53746f726167652e476574616a55527ac46a55c36a53c3a2631b0012496e73756666696369656e742066756e6473e00101ddf8616a55c36a53c3876447001352656d6f76696e6720616c6c2066756e647321680f4e656f2e52756e74696d652e4c6f676a00c36a51c37c68124e656f2e53746f726167652e44656c65746561622d00616a55c36a53c3946a56527ac46a00c36a51c36a56c35272680f4e656f2e53746f726167652e50757461616a00c36a52c37c680f4e656f2e53746f726167652e476574616a57527ac46a57c36a53c3936a58527ac46a00c36a52c36a58c35272680f4e656f2e53746f726167652e507574616a51c36a52c36a53c35272087472616e7366657254c168124e656f2e52756e74696d652e4e6f74696679516c756656c56b6a00527ac46a51527ac46a51c3c00114876318000f496e76616c69642061646472657373e00101c2f7616a00c36a51c37c680f4e656f2e53746f726167652e476574616c756655c56b6a00527ac46a00c30b746f74616c537570706c797c680f4e656f2e53746f726167652e476574616a51527ac46a51c36c75665ec56b6a00527ac46a51527ac46a51c36a00c3946a52527ac46a52c3c56a53527ac4006a54527ac46a00c36a55527ac461616a00c36a51c39f6433006a54c36a55c3936a56527ac46a56c36a53c36a54c37bc46a54c351936a54527ac46a55c36a54c3936a00527ac462c8ff6161616a53c36c7566 bytes:0710 bytes:05 int:3 "Inf-Coin NEO2Testnet" "v2" "Someone" "someone@fsinf.at" "Informatics token v2"`` + ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"getapplicationlog", "params":["TXHASH"]}' | jq + +``./neo-go contract invokefunction -e "http://127.0.0.1:20332/" -w wallet.json -a AH5GN4jcor8eVkqx7vjdDRNouqtiBckUrg f26c60f640091e2fa8cd15b30bb5f51cd4d2048b owner_destroy_contract`` + ++ curl -H "Content-Type: application/json" 'http://127.0.0.1:20332/' -d '{"jsonrpc":"2.0", "id":1, "method":"getapplicationlog", "params":["TXHASH"]}' | jq + + +``` +neoline = new NEOLine.Init(); +neoline.getAccount().then(account => console.log(account)) + +neoline.invoke({ + scriptHash: 'f26c60f640091e2fa8cd15b30bb5f51cd4d2048b', + operation: 'owner_burn', + args: [{ + type: 'Integer', + value: 124000 + } + ], + network: 'TestNet', + broadcastOverride: false, + txHashAttributes: [ + { + type: 'Boolean', + value: true, + txAttrUsage: 'Hash1' + } + ] +}) +.then(result => { + console.log('Invoke transaction success!'); + console.log('Transaction ID: ' + result.txid); + console.log('RPC node URL: ' + result.nodeURL); +}) +``` -- 2.43.0