Skip to content

Instantly share code, notes, and snippets.

View yathin017's full-sized avatar

Yathin Prakash K yathin017

View GitHub Profile
@yathin017
yathin017 / MTP.js
Last active April 7, 2023 06:30
Implementation of Mobile Theft Prevention Smart Contract in JavaScript and Solidity
const Web3 = require('web3');
const web3 = new Web3('http://localhost:8545'); // your Blockchain client endpoint
const contractAddress = '0x123456789...'; // your contract address
const abi = [/* Smart Contract ABI */]; // your contract ABI
const contract = new web3.eth.Contract(abi, contractAddress);
const isIMEIexist = {};
const isPhoneNumberexist = {};
@yathin017
yathin017 / example_test.py
Last active November 23, 2022 13:57
Exercise - Bitcoin Protocol Development. Getting node 1 to mine another block, send it to node 2, and check that node 2 received it.
# Notes:
# self.disconnect_nodes(1, 2)
# self.generate(self.nodes[1], sync_fun=lambda: None, nblocks=1)
# self.connect_nodes(1, 2)
#!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""An example functional test