Skip to content

Instantly share code, notes, and snippets.

Avatar

Luke Schoen ltfschoen

View GitHub Profile
@ltfschoen
ltfschoen / rotki.md
Created Aug 27, 2020
Rotki release steps to verify checksum
View rotki.md

The following are steps taken to verify the checksum of the Rotki installer on macOS:

  • Downloaded the file (i.e. rotki-darwin-v1.6.2.dmg.sha512) that contains the published SHA512 hash of binaries that we'll use as checksum to verify the integrity of the binary
  • View the checksum in the file with cat rotki-darwin-v1.6.2.dmg.sha512
    • Example output was:
f1be8965f206fb0ae5f745575c0e4da12a302e237188bb5cd41d73a19705965fc409da72508253f8908626ccbfb43990bf0e801f3cfa0ff9e29000c7d177a074  rotki-darwin-v1.6.2.dmg
View acala.md
View dash-core-macos.md

download latest dashcore-0.15.0.0-osx.dmg and SHA256SUMS.asc from https://github.com/dashpay/dash/releases

verify checksums match

cat SHA256SUMS.asc
shasum -a 256 dashcore-0.15.0.0-osx.dmg

installed to:

@ltfschoen
ltfschoen / litecoin-core-macos.md
Last active Jun 30, 2020
litecoin-core-macos
View litecoin-core-macos.md
@ltfschoen
ltfschoen / update-lockdrop-like-test-and-use-mxctoken-and-weenus.md
Last active Jun 22, 2020
update-lockdrop-like-test-and-use-mxctoken-and-weenus
View update-lockdrop-like-test-and-use-mxctoken-and-weenus.md

modified Lockdrop.sol with the changes shown in this commit https://github.com/DataHighway-DHX/mining/commit/18c59a2c646633d1687fcba7adc637e7931f8572 so that the Lock contract that it generates is deployed first, and then we deposit or withdraw from it only after providing approval from the ERC20 token by running its approve function (like what Test.sol did) instead of constructing the contract and performing a deposit before it was possible to grant it permission. so i deployed Lockdrop.sol to 0x5d030d3f45362f6ccc1f3c29c8cdeb617602d814 i deployed MXCToken (that imports StandardToken) on Rinkeby here: 0x6d8fc9e069f8fbab67a0a93d9cb19d3d16e21ccc (the same code that MXC used to deploy it to mainnet) then loaded MXCToken using AtAddress 0x6d8fc9e069f8fbab67a0a93d9cb19d3d16e21ccc Ran the "lock" function in Lockdrop.sol with arguments: `"0x1f7ace08af5c49a5d69fbb98fb9339a729b27161","3","100","0x46765939697a514462737a7a46556b437a65643435547039785062754b4e516e4d563150676b385959444b43573476","0x6d8fc9e069f8fbab67a0

View debug-weenus
i deployed a duplicate of Weenus from my account 0x1f... to 0x2d2c5fdfcc44fb2c9cdaebc468d6cb23a809d5cd
then (using a separate Remix window since different .sol files use different solc versions)
i compiled and deployed Test.sol passing my Weenus contract address as param `0x2d2c5fdfcc44fb2c9cdaebc468d6cb23a809d5cd`
it was deployed to 0x6ccadfd4e2233656e77b41d6c55bc8deb9753497
then loaded WeenusToken using `AtAddress` 0x2d2c5fdfcc44fb2c9cdaebc468d6cb23a809d5cd
and clicked `approve` using argument "0x6ccadfd4e2233656e77b41d6c55bc8deb9753497, 100", and it's mined successfully
and clicked `balanceOf` using argument of my address "0x1f7ace08af5c49a5d69fbb98fb9339a729b27161" and it showed i had 1000 WEENUS
then loaded Test using `AtAddress` 0x6ccadfd4e2233656e77b41d6c55bc8deb9753497
clicked `depositTokens` using argument `1`
and it transfers 1 WEENUS from my account to the Weenus contract. It works in this tx https://rinkeby.etherscan.io/tx/0x27e5d5cf2d5dea6fda463fd378726dbb51a891ed96d69399569783a72cd87921
View lockdrop-setup.md

Test in Remix

View encode_decode_solidity.sol
pragma solidity ^0.5.16;
contract EncodeAndDecode {
function encode() public view returns(bytes memory hash) {
return abi.encode(msg.sender, bytes("0xF785DaB2Cd075dC0a8011249357f2332972319fd"));
}
function decode(bytes memory hash) public view returns(address a, bytes memory b) {
(a,b) = abi.decode(hash, (address, bytes));
}
}
View mxc-axs-wallet.md

Terminal Window 1: Install Node Version Manager (NVM) and run the following:

nvm install v10.16.0 &&
nvm use v10.16.0 &&
yarn install &&
yarn run generate:typedefs &&
yarn run check:code &&
yarn run premigrate &&
npm install -g truffle ganache-cli
@ltfschoen
ltfschoen / flutter.md
Last active Aug 3, 2020
flutter-notes.md
View flutter.md