1

I'm trying to send erc20 token using the Blockcypher Ethereum API. specifically the "Call Contract Method"

but I keep getting

{"error": "Error calling contract: Missing contract or ABI for 1f342fb495cf6947b2d0db341ab5813042aad66f.."}

this is the api call I'm using

curl -sd '{"private": "myprivatekey", "gas_limit":80000, "addresses": "addressimsendingto", "value": 500,"abi": "[{\"constant\": true,\"inputs\": [],\"name\":\"name\",\"outputs\": [ {\"name\":\"\",\"type\":\"string\" } ],\"payable\": false,\"stateMutability\":\"view\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [ {\"name\":\"_spender\",\"type\":\"address\" }, {\"name\":\"_value\",\"type\":\"uint256\" } ],\"name\":\"approve\",\"outputs\": [ {\"name\":\"success\",\"type\":\"bool\" } ],\"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\":\"_value\",\"type\":\"uint256\" } ],\"name\":\"transferFrom\",\"outputs\": [ {\"name\":\"success\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": true,\"inputs\": [],\"name\":\"decimals\",\"outputs\": [ {\"name\":\"\",\"type\":\"uint8\" } ],\"payable\": false,\"stateMutability\":\"view\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [],\"name\":\"enableTokenTransfer\",\"outputs\": [],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [ {\"name\":\"_value\",\"type\":\"uint256\" } ],\"name\":\"burn\",\"outputs\": [ {\"name\":\"success\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": true,\"inputs\": [ {\"name\":\"\",\"type\":\"address\" } ],\"name\":\"balanceOf\",\"outputs\": [ {\"name\":\"\",\"type\":\"uint256\" } ],\"payable\": false,\"stateMutability\":\"view\",\"type\":\"function\" }, {\"constant\": true,\"inputs\": [],\"name\":\"TransferAllowed\",\"outputs\": [ {\"name\":\"\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"view\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [ {\"name\":\"_from\",\"type\":\"address\" }, {\"name\":\"_value\",\"type\":\"uint256\" } ],\"name\":\"burnFrom\",\"outputs\": [ {\"name\":\"success\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": true,\"inputs\": [],\"name\":\"owner\",\"outputs\": [ {\"name\":\"\",\"type\":\"address\" } ],\"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\":\"_value\",\"type\":\"uint256\" } ],\"name\":\"transfer\",\"outputs\": [ {\"name\":\"success\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": true,\"inputs\": [ {\"name\":\"\",\"type\":\"address\" } ],\"name\":\"frozenAccount\",\"outputs\": [ {\"name\":\"\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"view\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [ {\"name\":\"_spender\",\"type\":\"address\" }, {\"name\":\"_value\",\"type\":\"uint256\" }, {\"name\":\"_extraData\",\"type\":\"bytes\" } ],\"name\":\"approveAndCall\",\"outputs\": [ {\"name\":\"success\",\"type\":\"bool\" } ],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": true,\"inputs\": [ {\"name\":\"\",\"type\":\"address\" }, {\"name\":\"\",\"type\":\"address\" } ],\"name\":\"allowance\",\"outputs\": [ {\"name\":\"\",\"type\":\"uint256\" } ],\"payable\": false,\"stateMutability\":\"view\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [],\"name\":\"disableTokenTransfer\",\"outputs\": [],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [ {\"name\":\"target\",\"type\":\"address\" }, {\"name\":\"freeze\",\"type\":\"bool\" } ],\"name\":\"freezeAccount\",\"outputs\": [],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"constant\": false,\"inputs\": [ {\"name\":\"newOwner\",\"type\":\"address\" } ],\"name\":\"transferOwnership\",\"outputs\": [],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"function\" }, {\"inputs\": [ {\"name\":\"initialSupply\",\"type\":\"uint256\",\"index\": 0,\"typeShort\":\"uint\",\"bits\":\"256\",\"displayName\":\"initial Supply\",\"template\":\"elements_input_uint\",\"value\":\"1000000\" }, {\"name\":\"tokenName\",\"type\":\"string\",\"index\": 1,\"typeShort\":\"string\",\"bits\":\"\",\"displayName\":\"token Name\",\"template\":\"elements_input_string\",\"value\":\"JST\" }, {\"name\":\"tokenSymbol\",\"type\":\"string\",\"index\": 2,\"typeShort\":\"string\",\"bits\":\"\",\"displayName\":\"token Symbol\",\"template\":\"elements_input_string\",\"value\":\"JST\" } ],\"payable\": false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\" }, {\"anonymous\": false,\"inputs\": [ {\"indexed\": false,\"name\":\"target\",\"type\":\"address\" }, {\"indexed\": false,\"name\":\"frozen\",\"type\":\"bool\" } ],\"name\":\"FrozenFunds\",\"type\":\"event\" }, {\"anonymous\": false,\"inputs\": [ {\"indexed\": false,\"name\":\"\",\"type\":\"bool\" } ],\"name\":\"TransferEnabled\",\"type\":\"event\" }, {\"anonymous\": false,\"inputs\": [ {\"indexed\": false,\"name\":\"\",\"type\":\"bool\" } ],\"name\":\"TransferDisabled\",\"type\":\"event\" }, {\"anonymous\": false,\"inputs\": [ {\"indexed\": true,\"name\":\"from\",\"type\":\"address\" }, {\"indexed\": true,\"name\":\"to\",\"type\":\"address\" }, {\"indexed\": false,\"name\":\"value\",\"type\":\"uint256\" } ],\"name\":\"Transfer\",\"type\":\"event\" }, {\"anonymous\": false,\"inputs\": [ {\"indexed\": true,\"name\":\"from\",\"type\":\"address\" }, {\"indexed\": false,\"name\":\"value\",\"type\":\"uint256\" } ],\"name\":\"Burn\",\"type\":\"event\"}]"}' -s https://api.blockcypher.com/v1/eth/main/contracts/1f342fb495cf6947b2d0db341ab5813042aad66f/transfer?token=myblockcyphertoken

the ABI is from the contract's admin page in Mist, plus the formatting for the BlockCypher api (it doesn't work without the formatting neither...)

can anyone pin point me to a right direction?

this has been bugging the hell outta me for a while now...

Thank you in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.