Categories
Cryptocurrency Ethereum Mastering Development

How to solve the problem: java.lang.RuntimeException: Error processing transaction request: VM Exception while processing transaction: stack underflow

I generated JAVA wrapper solidity code. I am trying to deploy my contract on our local Ethereum blockchain and and get the following error: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access […]

Categories
Cryptocurrency Ethereum Mastering Development

Error while calling a erc721 contract funciton using go-language

I am trying to call a function which is "mintUniqueTokenTo(address,uint256,string)" in a ERC721 token using go language , but for some reason it is failing. I think one reason could be that i am not using padded and encoded uri just like toAddress and id, but i coudnt find a way to do so. I […]

Categories
Cryptocurrency Ethereum Mastering Development

configureMinter at USDC Token on Rinkeby

I have deployed the ERC20 token USDC to Rinkeby. More precisely I have deployed the proxy contract and the token contract. Then I called the upgradeToAndCall function to implement and initialize the token contract. Everything till here was ok. The problem came when I tried to call the configureMinter function. function configureMinter(address minter, uint256 minterAllowedAmount) […]

Categories
Cryptocurrency Ethereum Mastering Development

ethEstimateGas.getAmountUsed throws MessageDecodingException

I picked up a transaction in the pending transaction pool and wanted to get its estimated gas by using ethEstimateGas, my code is shown below (the values of hash, from, nonce, .gasPrice, gas, to, value, data were extracted from the picked-up transaction) Web3j web3j = Web3j.build(new HttpService()); // hash: 0xf27ed319f214118180f6122bea37e22899a95c18010c416560e88eeb6fd26d72 from = “0x01da3542aec2fd8ef345c33f672c89bf1c38abe1”; nonce = […]

Categories
Cryptocurrency Ethereum Mastering Development

How to make sign tx for erc20 token transfer?

How can I make an erc20 token transfer in node, I know to transfer eth is like this for using ethers. Lib: let privateKey = “0x3141592653589793238462643383279502884197169399375105820974944592” let wallet = new ethers.Wallet(privateKey) console.log(wallet.address) // “0x7357589f8e367c2C31F51242fB77B350A11830F3” // All properties are optional let transaction = { nonce: 0, gasLimit: 21000, gasPrice: utils.bigNumberify(“20000000000”), to: “0x88a5C2d9919e46F883EB62F7b8Dd9d0CC45bc290”, // … or supports […]

Categories
Cryptocurrency Development Ethereum

How to interact with my ropsten smart contract

I’ve looked for hours online for how to interact with contracts but I’ve yet to find an efficient way to do so. My contract is deployed at 0x09B81faA7fB51E5Af79b0241243e58297aC84158 on the ropsten network. I just want to know how to call my method function getChallengeNumber() public view returns (bytes32) { return challengeNumber; } and function mint(uint256 […]

Categories
Cryptocurrency Development Ethereum

How to resolve insufficient fund error in ganache in web3j java?

static void test2() throws IOException, ExecutionException, InterruptedException { BasicConfigurator.configure(); Web3j web3a=Web3j.build(new HttpService(“HTTP://127.0.0.1:8545”)); EthAccounts accounts=web3a.ethAccounts().send(); // list all the accounts System.out.println(accounts.getAccounts()); String sendingAddress = “0x5DC18De4028C850A72e41D558B4b34601510424e”; String receivingAddress = “0x5905bA08f544306Bc947E81897daf9A5aE7A8de1”; BigInteger value=new BigInteger(“100”); BigInteger nonce=new BigInteger(“0”); BigInteger gasPrice=new BigInteger(“20000000”); BigInteger gasLimit=new BigInteger(“30000”); Credentials credentials=Credentials.create(sendingAddress); RawTransaction rawTransaction=RawTransaction.createEtherTransaction(nonce,gasPrice,gasLimit,receivingAddress,value); byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction,credentials); String hexValue = Numeric.toHexString(signedMessage); EthSendTransaction ethSendTransaction = […]