Skip to main content

Questions tagged [abi]

The Application Binary Interface (ABI) is the standard way to interact with contracts in the Ethereum ecosystem, both from outside the blockchain and for contract-to-contract interaction. Data is encoded according to its type, as described in this specification. The encoding is not self describing and thus requires a schema in order to decode.

Filter by
Sorted by
Tagged with
1 vote
1 answer
24 views

Redundant byte offset requirement in the Contract ABI Specification?

I've had the pleasure of finding out that, contrary to what I've been used to in the other byte-transferring/-interpretation systems (e.g. the C/C++ languages, the communication protocols, etc.), ...
Iaroslav's user avatar
  • 375
2 votes
2 answers
81 views

Metamsk error : while converting number to string, invalid number value ‘1e-7’, should be a number

I ma running a Daap the utilizes mostly metamask as a wallet and i do keep getting errors like this while converting number to string, invalid number value ‘1e-7’, should be a number this is a local ...
Kaki Master Of Time's user avatar
0 votes
0 answers
41 views

react project cannot get the data from the contract

I copied a project and there is a problem when ( tried to access the page of my react app it shows "failed to fetch" ERROR Failed to fetch TypeError: Failed to fetch at HttpProvider.<...
sasya's user avatar
  • 1
0 votes
1 answer
18 views

Small space appearing before string in remix

Hello I saw that type casting from bytes to string gave the same result whether the bytes are a string encoded or encodePacked. So I am trying some small contract in remix, to see how that works and ...
Aimane Harrak's user avatar
0 votes
0 answers
29 views

How do I determine the constructor bytecode for contracts created by another contract

I am looking to decode constructor arguments for EVM contracts. Some contracts are created by externally owned accounts, but many are created via a contract transaction. In both cases how can I ...
Matthew's user avatar
0 votes
1 answer
25 views

Abi Encode with Signature - String memory as parameter to function

I'm trying to do abi.encodeWithSignature( "mint(address, string **memory**)", receiverAddress, tokenURI ) The function definition ...
MAYANK CHHIPA's user avatar
0 votes
1 answer
33 views

Runtime ABI-encoded contract method

I am building an application that gets tokens at runtime, I need to transfer some of them and I am attempting to calculate the required gas. Below is a example of the gas calculation code, but it ...
pigfox's user avatar
  • 71
0 votes
1 answer
44 views

Why wagmi with react returns object with numeric keys when fetch data from contract?

I have the issue that when I use useReadContract with abi , address an function name i receive the data like this: [{result: {0: value, 1: value}}]. The question is why this is possible when I have ...
blockchainer's user avatar
1 vote
0 answers
17 views

Blind signing when trying to send USDT over Arbitrum network

I am trying to send USDT ERC20 token through arbitrum network and all things go well until i want to personally sign it using my hardware wallet. seems like the ABI is wrong or corrupt as i get bling ...
saugat giri's user avatar
1 vote
1 answer
49 views

Not getting every transaction and unable to parse data

The following JS code uses a basic BNB Smart Chain endpoint from QuickNode and ethers.js v6.3.0 to parse all transactions' data that is sent to PancakeSwap address. const address = '...
PancakeBot's user avatar
0 votes
1 answer
97 views

AbiFunctionNotFoundError: Function "mint" not found on ABI. Make sure you are using the correct ABI and that the function exists on it

I get this error when I call the mint() function "biFunctionNotFoundError: Function "mint" not found on ABI. Make sure you are using the correct ABI and that the function exists on it.&...
soso.eth's user avatar
2 votes
1 answer
235 views

How to get revert message in Web3js?

I want to get the revert massage from a send method call to a smart contract. So I use: receipt.logs[0].data that is a string containing a hexadecimal value. Now I want to to decode this value to get ...
Alireza Zojaji's user avatar
0 votes
0 answers
14 views

Smart Contract calling another contract not effecting any changes

I have two smart contracts, a LeaderBoard contract and a Reward contract. I have the Reward contract call the LeaderBoard contract to add/update values, and I am testing everything using HardHat and ...
ndrb's user avatar
  • 1
0 votes
0 answers
40 views

error="abi: improperly formatted output:

I have modified the bsc genesis contract and added only more function: function addValidator(address _consensusAddress) public { currentValidatorSet.push(Validator({ consensusAddress: ...
user132452's user avatar
1 vote
0 answers
105 views

Using abigen with combined-json option generates nothing

I was trying to generate go binding using following commands: abigen --combined-json UniswapV2PriceOracle.json --pkg abi --type UniswapV2 --out UniswapV2.go It doesn't give any error, but the go file ...
John Smith's user avatar
0 votes
0 answers
113 views

Unverified smart contract call function without know abi ? can we find it from its website?

I am new on this things sorry i will ask like a noob I will give what i have and ask you 1- 0xmintcontract 2- 0xtoken 3- have access on website to mint both unverified So there is a website i am ...
Mehmet Harun Çiçek's user avatar
0 votes
1 answer
56 views

Why Etherscan's API missing ABI functions?

Here is transaction https://etherscan.io/tx/0x0db6f8036ca7ea58bf4a8799bbf62bb30e3431d644d37d4030c27ac0d22f7542#eventlog In logs we can see 3rd function SendToInjectiveEvent(). It is interaction with ...
sirjay's user avatar
  • 103
2 votes
1 answer
57 views

How to correctly pack Log data in Go

Using go-ethereum, I want to convert a struct containing my log fields into a types.Log{} object containing the data bytes and topics. Essentially, I want to do the opposite of the Parse<EventName&...
Ryan Collingham's user avatar
0 votes
0 answers
66 views

EE TypeError: invalid type (argument="type", value="myEnumName", code=INVALID_ARGUMENT, version=6.10.0)

Error occurs during library deployment if I have an enum in function arguments, including structs that have enums. Why does this error happen, and how can I fix it without changing enums to uint8? ...
Gleb Protasov's user avatar
1 vote
2 answers
85 views

Verification of a proxy contract not working because of constructor args

I am creating a smart contract verification service as a learning experiment and I am now able to verify most of contracts that I come across etherScan (in part doing so there is not only an option). ...
Daniel Pérez García's user avatar
0 votes
0 answers
28 views

Can't fetch the entrance Fee from my deployed contract to my frontend component

PART OF FREE CODE CAMP BLOCKCHAIN COURSE Hey guys I am using react-moralis library to connect with the deployed smart contract. The smart contract is a Raffle based contract //SPDX-License-Identifier: ...
eik's user avatar
  • 3
0 votes
1 answer
63 views

Place a Bear Bet via Pancakeswap Predictions

I'm pretty new to using Python to interact with smart contracts. I've been trying to make a short and simple python script that will interact with Pancakeswap's prediction market contract and place a ...
dbakathaillist's user avatar
1 vote
1 answer
245 views

abi.encode an already encoded parameter

I want to use an already abi-encoded parameter and encode it again with another value. Encoding works, but I cannot figure out the decoding. I technically could decode it and encode it again with that ...
mttttt's user avatar
  • 11
0 votes
1 answer
33 views

Does contracts with the same bytecode have the same abi?

I would like to know if I can infer an ABI for contracts that have the same bytecode. If both have the same bytecode can I assume their ABI will be the same?
Bruno Casarotti's user avatar
0 votes
1 answer
110 views

ABI encode external function call with multiple arguments in Huff

I am trying to make an external function call, with multiple arguments, to a contract written in Solidity from a contract written in Huff. I am able to successfully call an external contract when the ...
JSON_Derulo's user avatar
2 votes
2 answers
96 views

Solidity automatically generated getter function returning tuple instead of struct

// SPDX-License-Identifier: MIT pragma solidity =0.8.22; contract A { struct User { string name; uint age; } mapping(uint => User) public users; function getUser(...
zzh1996's user avatar
  • 141
1 vote
1 answer
474 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 = ...
Paweł Krupski's user avatar
2 votes
1 answer
106 views

Transaction data is not a multiple of 32 bytes

My understanding is that in a transaction's input data, the first 4 bytes, i.e. 8 characters, is reserved for a function signature. The rest of the data, after processed by the API, will be fitted to ...
Khanh's user avatar
  • 41
0 votes
0 answers
14 views

Is there any way to fake the signature selector in Solidity for abi.encodeWithSelector?

Is there any way to fake the selector pointer for an arbitrary contract address call with abi.encodeWithSelector? For example, I want to call a particular contract's deposit(...) method, but the ...
Mila A's user avatar
  • 1,319
0 votes
1 answer
361 views

Querying events using ethersjs provides logs with unrelated contract addresses

The UniswapV2Factory contract has the following event: event PairCreated(address indexed token0, address indexed token1, address pair, uint) I am using etherjs to detect all events on chain in the ...
RamanSB's user avatar
  • 103
0 votes
1 answer
826 views

TypeError: abis.filter is not a function

I've been working on a React program that provides a frontend for a Solidity smart contract I'd been making. The App.js code is shown below: import React, { useState, useEffect } from 'react'; import ...
aussastan's user avatar
0 votes
1 answer
62 views

I want to subscribe to flashloan events on the Aave v2 contract via websocket, how do I find the function/event?

I am trying to set up a websocket connection with ethers.js to listen for flashloan events. I have made a connection successfully listening to Transfer events on the USDT contract - which was simple ...
Zara44's user avatar
  • 3
1 vote
1 answer
114 views

how to verify a contract on etherscan?

thank you for your answers, but I think I'm still missing something, I don't know where to look for the elements that I don't like? does anyone have a solution please? I try with CONTRACT VERIFICATION ...
Bryce De Nyce's user avatar
1 vote
0 answers
68 views

Uniswapv2 "quote" ABI

I am trying to sign contractof Uniswapv2 on ethereum mainnet using "quote" ABI. the function is quote(uint amountA, uint reserveA, uint reserveB) I use c++ to make the raw transaction and ...
Biruk Damte's user avatar
1 vote
1 answer
90 views

transactionContract.addtoblockchain is not a function

Calling a specific function from smart contract through react jsx file , console is giving me error "transactionContract.addtoblockchain is not a function", even the function is present in ...
Chinmay Tiwari's user avatar
1 vote
1 answer
52 views

Fetching an implementation contract using ethersjs

I'm attempting to get the implementation contract for a proxy using ethers (and testing it using the recently published Paypal USD: https://etherscan.io/address/...
Abraham P's user avatar
  • 103
1 vote
1 answer
310 views

How to get Factory address from the Router address? Web3.js

I'm trying to get a factory address for Uniswap on base network, unfortunately I'm not able to locate this address anywhere and I'm kind of desperate as without it I'm not able to try my code that ...
RasmonT's user avatar
  • 131
0 votes
0 answers
194 views

TypeError: AbiCoder is not a constructor, testing purchaseSnack function is failing. I think due to not handling ether conversion correctly

I am trying to write a test script using hardhat to test the purchaseSnack function but I keep receiving these errors. 1) VendingMachine Should fail if insufficient funds are sent: ...
Daryle's user avatar
  • 1
1 vote
2 answers
202 views

Mint From Existing Contract

I have the following contract that is already deployed (pasted below). I can see where the constructor() method is doing an emit Transfer from the 0x0 (zero) address to the deployer address in order ...
ASumeet's user avatar
  • 15
0 votes
1 answer
472 views

Abi encode / decode mystery additional 32 byte field Uniswap v2

When I encode my abi data in web3js or web3.py for a uni v2 trade I get the following: 0x 00000000000000000000000000000000000000000000000000000000000000a0 ...
Nat's user avatar
  • 279
0 votes
0 answers
79 views

How to unpack abi.Arguments() and access values by name

I am trying to unpack encoded arguments in input field of trunsaction. Input field consist of 2 params: blockId and Input (another input field) - and I got stuck unpacking this 2nd input. var ...
davaymne's user avatar
1 vote
3 answers
391 views

I can't verify contract on etherscan because it needs abi-encoded constructor

I can't verify and check my contract on Etherscan. It asks me for the abi-encoded constructor, but I can't find it. Can someone help me, or tell me how to find the missing information? Please! // SPDX-...
Bryce De Nyce's user avatar
0 votes
1 answer
388 views

How to call smart contract methods without abi?

I need to call a smart contract from python, but it is not verified. Since this is not my contract, I cannot verify it. How to call the smart contract methods through python in this case? Smart ...
Никита Филиппов's user avatar
1 vote
1 answer
35 views

can't find contract after compile successfully in remix: No Contract Compiled Yet

I compile this file in 0.4.8 successfully, pragma solidity 0.4.8; contract A { function f(uint[] arr) constant external returns (uint len) { assembly { pop arr := len }...
LEVI_104's user avatar
0 votes
1 answer
672 views

Ethers.js solidityPackedKeccak256 to bytes32

I have a commit-reveal pattern implemented in my Solidity smart contract. I use the keccak256 encryption function to secure the player's commitment. How can I convert the return value of ...
Mila A's user avatar
  • 1,319
0 votes
1 answer
138 views

What is an alternative for ethers.AbiCoder in geth

I have a following code that encodes parameters with AbiCoder const name = "Crown"; const symbol = "Crown"; const decimals = 18; const coder = new AbiCoder(); const nameBytes = ...
Danijel Radakovic's user avatar
0 votes
1 answer
395 views

Transforming Ethereum ABI(JSON) into Human-Readable ABI in Python

I know there is one example to do it: ethersjs implementation But how to transforming Ethereum ABI into Human-Readable ABI in Python?
LEVI_104's user avatar
0 votes
1 answer
450 views

Abi calldata encoding nested structs, find a way

I didn't found any instructions about nested structs (in structs). Seen video about sending bytecode to contract and I wanted to understand. For example, method is: function fulfillOrder( Order ...
Peter Ivanoff's user avatar
2 votes
1 answer
128 views

abi-decoder's decodeMethod returns undefined

I am trying to decode the input field of this transaction as below, const decodedInput = abiDecoder.decodeMethod(transaction.input); but decodedInput returns undefined despite the my ABI having the ...
Nishanth Gobi's user avatar
0 votes
1 answer
441 views

How to encode arbitrary amount of parameters for encodeWithSignature without adding them to function definition?

Lets says we have Contract A that needs to call Contract B at a certain address which the requirements that Contract A doesn't know the exact parameter structure the function in that Contract B needs &...
CoderMan's user avatar

1
2 3 4 5
10