This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm i @cityofzion/neon-js@next for N3 | |
const Neon = require('@cityofzion/neon-js') | |
const { wallet } = Neon | |
const account = new wallet.Account(); | |
console.log(account.address); | |
console.log(account.WIF); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from neo3.network.payloads.transaction import Transaction | |
from neo3.core import cryptography | |
import binascii | |
import base64 | |
import json | |
import sys | |
MAINNET=860833102 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useful to disassemble an invocation script - won't work to | |
# disassemble an entire NEF because it will stop at the first RET | |
from neo3 import contracts, vm | |
import base64 | |
class Disassembler(contracts.ApplicationEngine): | |
def pre_execute_instruction(self) -> None: | |
ins = self.current_context.current_instruction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# enumaccounts.py - hal0x2328 | |
# Read neo-cli LevelDB database and dump all accounts to JSON | |
import plyvel | |
import io | |
import binascii | |
import sys | |
import struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
combineprivkeys.py - by hal0x2328 | |
This tool combines two private keys into a new private key, as part of | |
the "split-key" scheme used to generate vanity addresses without sharing | |
the private key with a third party generating the vanity address for you. | |
The party generating the vanity address only needs your public key. With it, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Neo.SmartContract.Framework; | |
using Neo.SmartContract.Framework.Services.Neo; | |
using Neo.SmartContract.Framework.Services.System; | |
// simple supply chain tracking contract example | |
namespace Neo.SmartContract | |
{ | |
public struct TrackedItem | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from neocore.IO.BinaryReader import BinaryReader | |
from neo.IO.MemoryStream import StreamManager | |
from neo.Core.TX.InvocationTransaction import InvocationTransaction | |
from neo.Core.TX.Transaction import Transaction | |
import binascii | |
import json | |
import io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from neocore.Cryptography.Crypto import Crypto | |
from neocore.UInt160 import UInt160 | |
from neo.VM.OpCode import * | |
import binascii | |
import json | |
import sys | |
import io | |
tokens = {} | |
with open('tokens.json') as t: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc invoke 0xe1d955a7a6c2c2af58eb2ea0abf28f3a2a9ee568 migrate [b'\x01\x1f\xc5\x6b\x6a\x00\x52\x7a\xc4\x6a\x51\x52\x7a\xc4\x68\x | |
16\x4e\x65\x6f\x2e\x53\x74\x6f\x72\x61\x67\x65\x2e\x47\x65\x74\x43\x6f\x6e\x74\x65\x78\x74\x61\x6a\x52\x52\x7a\xc4\x6a\x00\xc3\x03\ | |
x61\x64\x64\x87\x64\x6e\x00\x06\x61\x64\x64\x69\x6e\x67\x68\x0f\x4e\x65\x6f\x2e\x52\x75\x6e\x74\x69\x6d\x65\x2e\x4c\x6f\x67\x6a\x52 | |
\xc3\x6a\x51\xc3\x00\xc3\x7c\x68\x0f\x4e\x65\x6f\x2e\x53\x74\x6f\x72\x61\x67\x65\x2e\x47\x65\x74\x61\x6a\x53\x52\x7a\xc4\x6a\x53\xc | |
3\x6a\x51\xc3\x51\xc3\x93\x6a\x54\x52\x7a\xc4\x6a\x52\xc3\x6a\x51\xc3\x00\xc3\x6a\x54\xc3\x52\x72\x68\x0f\x4e\x65\x6f\x2e\x53\x74\x | |
6f\x72\x61\x67\x65\x2e\x50\x75\x74\x61\x6a\x54\xc3\x6c\x75\x66\x61\x6a\x00\xc3\x06\x72\x65\x6d\x6f\x76\x65\x87\x64\x54\x00\x6a\x52\ | |
xc3\x6a\x51\xc3\x00\xc3\x7c\x68\x0f\x4e\x65\x6f\x2e\x53\x74\x6f\x72\x61\x67\x65\x2e\x47\x65\x74\x61\x6a\x53\x52\x7a\xc4\x6a\x52\xc3 | |
\x6a\x51\xc3\x00\xc3\x6a\x53\xc3\x6a\x51\xc3\x51\xc3\x94\x52\x72\x68\x0f\x4e\x65\x6f\x2e\x53\x74\x6f\x72\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM microsoft/dotnet:runtime | |
RUN apt-get update \ | |
&& apt-get install -y libleveldb-dev sqlite3 libsqlite3-dev libunwind8-dev unzip jq \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN latest_tag=`curl -s https://api.github.com/repos/neo-project/neo-cli/releases/latest | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/'` \ | |
&& curl -vLO https://github.com/neo-project/neo-cli/releases/download/$latest_tag/neo-cli-linux-x64.zip && curl -vLO https://github.com/neo-project/neo-plugins/releases/download/$latest_tag/ApplicationLogs.zip && curl -vLO https://github.com/neo-project/neo-plugins/releases/download/$latest_tag/ImportBlocks.zip | |
RUN unzip neo-cli-linux-x64.zip && rm neo-cli-linux-x64.zip |
NewerOlder