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
1 vote
2 answers
32 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 ...
Biruk Damte's user avatar
0 votes
3 answers
225 views

Approve USDT on Ethereum

I have a very simple contract. contract MyContract { address _owner; modifier owner() { require(msg.sender == _owner); _; } constructor(address manager) { ...
Oleg Belousov's user avatar
0 votes
0 answers
11 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 ?
Loki's user avatar
  • 9
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(...
Suvam Tamang's user avatar
0 votes
1 answer
40 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 ...
j7coder's user avatar
1 vote
2 answers
4k 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("...
Akall's user avatar
  • 423
0 votes
1 answer
21 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 ...
samuel godwin's user avatar
0 votes
1 answer
68 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 ...
Prem's user avatar
  • 1
0 votes
1 answer
21 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 ...
Haydar Al-Rikabi's user avatar
-4 votes
1 answer
43 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
Joe B's user avatar
  • 3
0 votes
0 answers
33 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 ...
bluehost33's user avatar
0 votes
1 answer
82 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,...
Yasserius's user avatar
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 ...
Maddy's user avatar
  • 1
0 votes
1 answer
91 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 ...
Tahlil's user avatar
  • 218
0 votes
2 answers
392 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] = ...
Chowa C's user avatar
1 vote
1 answer
57 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 ...
mbappai's user avatar
  • 115
1 vote
1 answer
930 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 ...
abcdefgh's user avatar
  • 163
1 vote
0 answers
47 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 ...
user66732's user avatar
  • 435
0 votes
1 answer
121 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....
Tuan Vu's user avatar
0 votes
1 answer
352 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?
Saheb Singh's user avatar
1 vote
1 answer
37 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 ...
user96949's user avatar
0 votes
1 answer
107 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 ...
Mars Ifeanyi's user avatar
1 vote
0 answers
147 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 ...
Eric Falkenstein's user avatar
0 votes
2 answers
236 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/...
femibyte's user avatar
  • 115
1 vote
1 answer
79 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 ...
gojic's user avatar
  • 147
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 ...
Chris S's user avatar
  • 161
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 ...
HubertBlu's user avatar
  • 123
2 votes
1 answer
234 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 ...
Sabnock66's user avatar
0 votes
1 answer
58 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 (...
Eight Rice's user avatar
0 votes
1 answer
344 views

Transfer not working on buy swaps with ERC20

I am trying to send a percentage of ethereum to my marketing wallet when someone buys or sells my token via uniswap. It seems to work on sells but not on buys... why is that? i get nothing transferred ...
HeelMega's user avatar
  • 101
1 vote
1 answer
1k views

How to decide SPDX license for a smart contract? [closed]

I am not sure how to decide which spdx licence will go with my smart contract. Can anyone help like how decide which spdx licence will be use in a contract.
Shubham Singh's user avatar
0 votes
0 answers
443 views

web3 transaction value always 0

Can anyone explain to me, why the transaction object I receive via web3 always has a value of 0? When I open up the transactionhash in etherscan, it shows under the to field which is named "...
Chris S's user avatar
  • 161
3 votes
1 answer
492 views

Is IPFS mandatory for NFT

Is it mandatory to use IPFS for file storage and use its hash in metadata for NFT, What if file is stored on s3 and we save its sha256 or md5 in metadata? Hash will be same until file content is ditto,...
murtza gondal's user avatar
0 votes
2 answers
215 views

Internal transaction [duplicate]

So, I was using Bitbuy to buy and send eth to the wallet of my friend. I dont know how but that transaction finish as internal and it doesnt appear on friends wallet. Does anyone know who needs to do ...
Marko's user avatar
  • 1
1 vote
1 answer
182 views

Make Hyperledger Besu sync faster during DOS blocks

I am attempting to sync a full node using Hyperledger Besu and it has slowed down considerably when hitting about block 2,300,000. Geth and Parity can be made faster as this link details to sync these ...
skword's user avatar
  • 123
0 votes
1 answer
42 views

Why the need for different tokens?

So, ERC20 tokens are bought depositing equivalent Price = amount to be bought*price of tokens) in eth to the smart contract eth address. So lets talk about BAT ERC20 token: If I am verified BAT ...
sbibek086's user avatar
1 vote
1 answer
135 views

How many parallel read/write request single contract can handle each second

I need this reply for a large user base prospective, where each second too many request going to that particular contract , so the question is what is write per second limit and what is read per ...
ashwin's user avatar
  • 389
6 votes
1 answer
2k views

how to call "selfdestruct" if not written in contract, as documentation says its possible

as mentioned in documentation "Even if a contract’s code does not contain a call to selfdestruct, it can still perform that operation using delegatecall or callcode." so my question is how ...
ashwin's user avatar
  • 389
1 vote
1 answer
681 views

Smart Contract Application in ASP>NET [closed]

I just have started to learn Smart Contract. I have to design front end in ASP.NET. Can I call Contract from it?
Ravikant Ninave's user avatar
1 vote
1 answer
358 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 "...
Arpit Bajpai's user avatar
0 votes
1 answer
134 views

Having a problem compiling a ERC20 token smart contract - Code inside

Basically i'm using a cut and paste erc20 token code from this site: https://hashnode.com/post/how-to-build-your-own-ethereum-based-erc20-token-and-launch-an-ico-in-next-20-minutes-...
IBETITALL420's user avatar
0 votes
0 answers
270 views

Just not able to install Web3 through powershell

After reading a lot of articles about how to install Web3j in windows. I also tried following this article : https://kauri.io/generate-a-java-wrapper-from-your-smart-contract/...
sweet archita's user avatar
0 votes
0 answers
2k views

TypeError: Operator != not compatible with types string storage ref and int_const 0

Im using blockchain technology for the first time, for a college project. Im trying to run a smart contract from Github (in Powershell windows 10). Im unable to compile the contract due the following ...
sweet archita's user avatar
0 votes
1 answer
408 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 ...
sweet archita's user avatar
1 vote
1 answer
173 views

Value of emitted events in App.js

Actually in my App.js I have called my contract function like this: [ this.state.swapcontract.methods.sendFunds(address).send({ from: this.state.account , value:amount}) ] The function is called ...
Shivam Raina's user avatar
0 votes
1 answer
383 views

Can we use secp256r1 to generate valid Ethereum address instead of secp256k1?

We interact with HSM via Graphene to generate EC public/private key for Ethereum blockchain, many tutorials say secp256k1 to generate valid Eth address, however the Graphene supports only secp256r1
Wazen Shbair's user avatar
2 votes
0 answers
1k views

get event logs and debug trace from eth_call

I am looking for a way to execute a transaction locally (using local geth/parity node) for simulation only, before actually submitting it to blockchain. I know that I can use 'eth_call' RPC call and ...
Or Bachar's user avatar
  • 357
1 vote
1 answer
498 views

How to resolve this error in solidity “The constructor should be payable if you send value.”?

In this solidity code the finalizeRequest() is giving a run-time error. Here is the error : Campaign.finalizeRequest(uint256) 0x692...77b3a transact to Campaign.finalizeRequest errored: VM error: ...
fuzious's user avatar
  • 115
1 vote
0 answers
295 views

Not able to decode the input data from transaction using web3j (Java)

I am creating transactions using web3j and passing some private data in that transaction. The transaction is also getting mined . I have subscribed to the mined blocks, where I am fetching the ...
Aniket's user avatar
  • 96
0 votes
2 answers
100 views

Calling smart contract functions and submitting transacions in BACK-END in high level

I have read some references to create ethereum transactions by a BACK-END server, all in low level, for example, requiring that I control the nonce by myself. Are there safe ways to avoid this control ...
Suzana Maranhão Moreno's user avatar