Skip to content

Instantly share code, notes, and snippets.

@ccashwell
Last active February 16, 2018 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccashwell/751075d1fe696014e268652d53095b0e to your computer and use it in GitHub Desktop.
Save ccashwell/751075d1fe696014e268652d53095b0e to your computer and use it in GitHub Desktop.
Transferring Mythereum Cards with MyEtherWallet
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"approvedFor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cardId","type":"uint256"}],"name":"destroyCard","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"mintWildcard","outputs":[{"name":"cardId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"tokensOf","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"classVariants","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"classQuantity","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_editionNumber","type":"uint8"},{"name":"_numCards","type":"uint8"}],"name":"mintEditionCards","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"},{"name":"","type":"uint256"}],"name":"classDefaults","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"cards","outputs":[{"name":"name","type":"string"},{"name":"class","type":"uint8"},{"name":"classVariant","type":"uint8"},{"name":"damagePoints","type":"uint8"},{"name":"shieldPoints","type":"uint8"},{"name":"abilityId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"latestEditionReleased","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_abilityId","type":"uint256"},{"name":"_name","type":"string"},{"name":"_canBeBlocked","type":"bool"},{"name":"_blackMagicCost","type":"uint8"},{"name":"_grayMagicCost","type":"uint8"},{"name":"_whiteMagicCost","type":"uint8"},{"name":"_addedDamage","type":"uint256"},{"name":"_addedShield","type":"uint256"}],"name":"replaceAbility","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"abilities","outputs":[{"name":"name","type":"string"},{"name":"canBeBlocked","type":"bool"},{"name":"blackMagicCost","type":"uint8"},{"name":"grayMagicCost","type":"uint8"},{"name":"whiteMagicCost","type":"uint8"},{"name":"addedDamage","type":"uint256"},{"name":"addedShield","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cardId","type":"uint256"},{"name":"_addedDamage","type":"uint8"},{"name":"_addedShield","type":"uint8"}],"name":"improveCard","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_editionNumber","type":"uint8"},{"name":"_name","type":"string"},{"name":"_classId","type":"uint8"},{"name":"_classVariant","type":"uint8"},{"name":"_damagePoints","type":"uint8"},{"name":"_shieldPoints","type":"uint8"},{"name":"_abilityId","type":"uint8"}],"name":"addCardToEdition","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_canBeBlocked","type":"bool"},{"name":"_blackMagicCost","type":"uint8"},{"name":"_grayMagicCost","type":"uint8"},{"name":"_whiteMagicCost","type":"uint8"},{"name":"_addedDamage","type":"uint256"},{"name":"_addedShield","type":"uint256"}],"name":"addAbility","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_editionNumber","type":"uint8"}],"name":"isEditionAvailable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":false,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"}]
  1. Go to MyEtherWallet's Contract UI (https://myetherwallet.com/#contracts)
  2. Enter "0xa67aac23549f4c672256b59b43ab0bacfcfcd498" in the Contract Address field
  3. Copy the contract's ABI into the box labeled "ABI / JSON Interface" from the ABI.json file
  4. Click "Access"
  5. Scroll down to the section titled "Read / Write Contract"

You'll now see the drop-down list containing all of the callable functions the contract provides. For example, you can get a list of card token IDs you own with the tokensOf function, or transfer ownership of a card token you own using the transfer function. If you want to double-check that you've got the correct card token ID, you can use the cards function to verify the details associated with the card (such as the name, shield, damage, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment