Questions tagged [ethereumj]

For questions regarding the installation or use of EthereumJ, a Java library that implements the Ethereum protocol.

Filter by
Sorted by
Tagged with
0 votes
1 answer
412 views

Im getting the following error: ParserError: Expected primary expression. struct ManagingOrder.Parking memory new_Parking = Parking({

Im using blockchain technology for the first time, for a college project. Im trying to run a smart contract from Github. After debugging the errors shown while compiling the smart contract (in ...
0 votes
1 answer
384 views

Smart Contract Deployment through React JS

I have deployed multiple contracts using Truffle and Hardhat from a NodeJS project, but I wanted to know if there is a way to deploy smart contracts from ReactJS?
0 votes
0 answers
95 views

Pikamoon not showing value in TrustWallet

I recently got on the Pikamoon train. I claimed my tokens as a 3rd round investor today. The tokens went into my trust wallet and are shown there, but they have no value. My buddies have coinbase ...
0 votes
1 answer
625 views

Query Ethereum Blockchain for functions return value of a Specified Smart Contract

I want to get smart contract functions return value sent by a specified smart contract within a range of blocks. I found a [manual] working method to achieve this: async function getTxsByAccount(...
2 votes
1 answer
307 views

EthereumJ: Private Network: How to I set my sender account?

I'm currently using EthereumJ and I'm trying out a use case to send an amount to a specific account in my own private chain. But I'm getting this error: Not enough cash: Require: 14000000000000001, ...
1 vote
1 answer
519 views

Correct way to calculate Gas Price and Gas Limit using offline mode in ethereumj

Please help me to understand the correct way to compute Gas Price and Gas Limit using offline mode in ethereumj. I have been using EtherScan's API eth_gasPrice and eth_estimateGas as of now. Just ...
0 votes
1 answer
438 views

how to connect to a private ethereum testnet with blockcypher

our project uses blockcypher to create eth wallet which can transfer eth now.Blockcypher supports ETH main network and its own testnet. Is there any way to connect the blockcypher node to a custom ...
1 vote
4 answers
2k views

how much does using ethereum services cost

Lets say im creating my own cryptocurrency and my own blockchain on ethereum, what would be the basic costs for setting all this up if i am developing on Ethereum
2 votes
4 answers
4k views

How to use Solidity solc to compile A.sol that imports B.sol file?

I know how to install solc via "npm install --save solc" then use solc.compile to compile one sol file. But now I've got A.sol file that imports B.sol file, and when I run node compile.js, no error in ...
0 votes
2 answers
454 views

Type uint256 is not implicitly convertible to expected type address

My aim is to return all the family members inside of the mapping but i keep getting this error from remix Type uint256 is not implicitly convertible to expected type address. --> members[i] = ...
1 vote
1 answer
234 views

How to call smart contracts in Web3j

I wrote this code in TS using web3 library: // ABI = my deployed SmartContract as json ABI const daiToken = new web3.eth.Contract(Abi as AbiItem[], smartContractAdress) const smartContractFunction = ...
0 votes
0 answers
121 views

Generating Ethereum Address from Mnemonic Seed Phrase in Java

I hope you're doing well. I have a question related to Ethereum address generation in Java. I'm currently working on a project and I need to generate an Ethereum address using a mnemonic seed phrase. ...
1 vote
2 answers
219 views

UniswapV2's equivalent of getPair and other functions

i see uniswapv3 quoter or factory or router contracts doesn't have getPair, getReserve and other similar ABI functions like UniswapV2. does UniswapV3 have Equivalent for this functions? or did they ...
0 votes
3 answers
951 views

Approve USDT on Ethereum

I have a very simple contract. contract MyContract { address _owner; modifier owner() { require(msg.sender == _owner); _; } constructor(address manager) { ...
0 votes
0 answers
12 views

Get all transactions on ethereum

Is there a way to get all transactions on ethereum such that transactions between two unique wallets will be counted as one ?
1 vote
2 answers
6k views

EthersJS Listening to events with NodeJS Strange Errors

I am trying to listen to blockchain events using ethers on NodeJS. I've looked around for few tutorials and copied the code from one of them. Currently the code i have is: const ethers = require("...
0 votes
1 answer
16 views

Array of structures

How to store the returned array of structs from a contract to some other contract? Like for eg. I have a doctor contract that has the function as : function getRegisteredDoctors() public view returns(...
1 vote
1 answer
355 views

How to make user sign up and login on my decentralized application?(on production it should work without metamask)

Assuming that user who is going to signup is not having any ethereum account so how can I generate a public, private key and address for ethereum and make use of it to make further transactions. Users ...
0 votes
1 answer
52 views

Ethereum Mainnet Error: "Migrations" could not deploy due to insufficient funds

Newbie to Ethereum NFT contract deployment here. So please bear with my questions. I am trying to deploy a ERC-721 contract to ETH Mainnet and I have 0.285 ETH in my wallet. But I am still getting ...
11 votes
5 answers
16k views

How can I browse mempool in Ethereum?

How can I browse mempool in Ethereum? Is it possible from EthereumJ or on some websites?
0 votes
1 answer
27 views

How do i prevent further burn once the minimum total supply of my token has been reached?

I have successfully created my token and I have an automatic burn fee but I would like the burn fee to be automatically set to 0 once the minimum total supply has been reached and also prevent any ...
0 votes
1 answer
109 views

Variable of interface type ? what is the purpose of giving interface name as variable type?

//SPDX-License-Identifier:MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract staking{ IERC20 public s_stakingToken; IERC20 public ...
0 votes
1 answer
26 views

Explanation of a sample transaction details is needed

I am to the blockchain space. I was reading the Ethereum whitepaper, and I couldn't understand this example: Suppose Alice wants to send 11.7 BTC to Bob. First, Alice will look for a set of ...
1 vote
1 answer
2k views

How to add a logo or icon for erc20 crypto token?

I am planning to launch my own crypto tokens on polygon. But couldn’t understand the process properly of how to upload logo for the token. Also I don't think on testnet I can test it. Is there any ...
-4 votes
1 answer
45 views

How can I use a reentrancy attack to permanently freeze funds?

If possible, can you please send me the code with as much details as possible? I would like to understand more about it but didn't find useful content on the internet. Thanks in advance
6 votes
2 answers
1k views

Use uint40 for time in Solidity?

My question is: Should I use uint40 for time in Solidity? All the examples I've seen use uint256 for time, however, I think it's too wasteful -- while using uint32 is maybe a little aggressive due to ...
0 votes
2 answers
245 views

EthereumJ connect to private node

I need to connect to private ethereum node with using ethereumj without ethereum.conf file. I need configure connect from code using Spring Framework.
0 votes
0 answers
34 views

how to simulate a transaction before it is mined? [duplicate]

My program needs to know how the transactions in the mempool will affect the state when mined. Does anyone know of any tools to help with this? Is is possible by chaing go ethereum source code? or ...
0 votes
1 answer
96 views

how to get "internal transactions" from transactions that have multiple erc-721 transfers in them? (web3 py)

Take a look at this transaction: https://etherscan.io/tx/0x542eb6e70c8122283fefc596f3fcc02a59579f5f43df7f3396f1b1ec72d03647#internal There are multiple erc-721 token transfers happening in the same tx,...
0 votes
2 answers
33 views

Regaining access to a smart contract

So I have a tricky situation. Sometime back we deployed a smart contract, let's call that as contractA owned by userA. Then we needed to make some edits so we deployed another smart contract contractB ...
11 votes
3 answers
962 views

Error: "message":"function \"Ballot\" arguments must include \"proposalNames\""}

I am trying below code to write Voting Contract referring to Solidity documentation pdf. Code compiles without error but I am getting below error while deploying. writing Ballot to app\meta\Ballot\...
0 votes
1 answer
115 views

Chain tests in mocha framework with smart contract testing

I am doing smart contract testing with hardat and mocha framework. Suppose I have two following it blocks testing contract A. it('test1', () => { contractA.updateValue(val); // some other ...
1 vote
1 answer
72 views

VM Exception while processing transaction: revert — Transferring ether from EOA to contract account

Problem summary I get the following error whenever I try transferring ether from an EOA(externally owned account) to a contract account in one of my functions as seen below. I am currently using the ...
1 vote
0 answers
53 views

How to encrypt a message with multiple public keys for multiple recipients

Is it possible to encrypt a message using multiple Ethereum public keys for multiple recipients of a message, e.g. using https://github.com/pubkey/eth-crypto#encryptwithpublickey , so that each ...
0 votes
1 answer
147 views

Why (balance == wei) return false, when I use ethers.js

I'm begin learn ethers.js. I wrote like this const balance = await provider.getBalance("0x862...99"); const ether = ethers.utils.formatEther(balance); const wei = ethers.utils....
1 vote
1 answer
43 views

What this function implies?Why is aAdjusted and bAdjusted?

This function is from uniswap-v3/core/contracts/libraries/Oracle.sol /// @notice comparator for 32-bit timestamps /// @dev safe for 0 or 1 overflows, a and b _must_ be chronologically before or equal ...
0 votes
1 answer
128 views

address payable error [duplicate]

please i'm having this issue while trying to deploy my smart contract, please can anyone explain this error for me and how i can solve it Type address is not implicitly convertible to expected type ...
2 votes
3 answers
1k views

What is the "right" way to send Ether to multiple addresses?

I have seen this discussed here but didn't get a satisfactory answer. What is the recommended way to send ether to multiple recipients? One way that I have thought of is follows: Deploy a smart ...
1 vote
0 answers
171 views

convert time to utc in Dune Query

I can create a query on the DuneAnalytics site, but the default date format for a field is "2022-02-08 02:44", which downloads to csv as "2022-02-08T02:44:46+00:00". Does anyone ...
5 votes
2 answers
2k views

web3j.ethSendRawTransaction wait until the transaction is successfully mined - Web3j

Im trying to send 0 ether to the same account with Web3j, however when i run this code it give me directly the transaction hash, even if the transaction has not been mined yet and still pending. I can'...
4 votes
1 answer
152 views

How to work with inherited contracts in EthereumJ?

In EthereumJ, I have two contracts i deployed them individually,first one was deployed but for the second i got error as in that i was calling function of first one and example i have second is first ,...
0 votes
2 answers
1k views

How to make a payable transferFrom function that inherits from openzeppelin erc721 contract

I have just finished the crypto zombies tutorial https://cryptozombies.io/ and wanted to get it working locally but also using a solc 0.8.0. Compilation has thrown me lots of errors, many of which I ...
0 votes
2 answers
289 views

Correct default development blockchain port for truffle

How is the truffle port set when one runs truffle unbox react and then truffle develop ? The documentation states that the default port is 9545 (https://trufflesuite.com/docs/truffle/getting-started/...
1 vote
1 answer
197 views

LoadCredentials function returns file not found exception

I am using the following code to deploy my contract: @RequestMapping("/") public String index() throws Exception { Web3j web3j = Web3j.build(new HttpService("https://rinkeby.infura.io/v3/...
5 votes
3 answers
4k views

How to convert ETH ethereum transaction value to decimal in javascript

Example value: 0x2c1c986f1c48000 from: here Expected value back: 0.19866144 Eth
1 vote
1 answer
362 views

Truffle Migrate

What happens when there is a minor change in the smart contract and I run truffle migrate command. Example: //before contract test{ function display() public returns (string){ return "...
1 vote
1 answer
85 views

Should same contract address be same for multiply users?

OK i know that this is silly question but cant wrap my head around smart contracts .I am using web3j to make a simple android dapp. It should have add deposit, withdraw deposit and get current amount ...
1 vote
0 answers
1k views

Opensea-js What is the actual rate limit?

I am wondering what is the actual rate limit of this api? Even with using an api key I get rate limited or throttled requests quiet fast. I can not find any resource about the actual rates they are ...
2 votes
1 answer
257 views

Dev install fails for Python 3.8 when installing py-evm dependencies

When following this guide in the py-evm docs, I get this verbose error when installing dependencies. It appears to be related to mypy and typed-ast, but I don't know enough about these to be able to ...
0 votes
1 answer
63 views

What happens if the tokenURI api serves a different metadata?

The way to reference the actual payload of the NFT is a centralized endpoint. When I create the NFT I might provision an API with an endpoint that serves a particular piece of data. What's to stop me (...

1
2 3 4 5