Questions tagged [ethereumj]
For questions regarding the installation or use of EthereumJ, a Java library that implements the Ethereum protocol.
201 questions
1
vote
1
answer
72
views
How to setup a private GoEthereum network
I'm studying Ethreum by creating by own private ethereum network. I have three basic question. I will give as much information as I can to help to get great responses.
My network setup is very simple:
...
0
votes
0
answers
306
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 ...
1
vote
1
answer
711
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 = ...
1
vote
2
answers
405
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
2k
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
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(...
0
votes
1
answer
66
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 ...
1
vote
2
answers
8k
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
29
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
134
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
27
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 ...
-4
votes
1
answer
48
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
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
113
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 ...
0
votes
1
answer
126
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 ...
0
votes
2
answers
503
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
91
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
1
answer
3k
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 ...
1
vote
0
answers
62
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
157
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....
0
votes
1
answer
416
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?
1
vote
1
answer
46
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
146
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 ...
1
vote
0
answers
195
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 ...
0
votes
2
answers
322
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
91
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 ...
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 ...
2
votes
1
answer
272
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
65
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 (...
0
votes
1
answer
371
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 ...
1
vote
1
answer
2k
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.
0
votes
0
answers
612
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 "...
3
votes
1
answer
533
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,...
0
votes
2
answers
307
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 ...
1
vote
1
answer
199
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 ...
0
votes
1
answer
45
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 ...
1
vote
1
answer
156
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 ...
6
votes
1
answer
3k
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 ...
1
vote
1
answer
763
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?
1
vote
1
answer
365
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 "...
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-...
0
votes
0
answers
307
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/...
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 ...
0
votes
1
answer
416
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 ...
1
vote
1
answer
203
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 ...
0
votes
1
answer
546
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
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 ...
1
vote
1
answer
530
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: ...