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
0 votes
1 answer
20 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
10 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
0 answers
19 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
0 answers
37 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
1 vote
1 answer
46 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
27 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
36 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
42 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
47 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
  • 111
2 votes
1 answer
26 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
53 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
74 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
24 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
  • 1
0 votes
1 answer
39 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
106 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
30 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
88 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
74 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
243 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
77 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,179
0 votes
1 answer
122 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
488 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
40 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
105 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
65 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
74 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
32 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
241 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
174 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
139 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
356 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
57 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
287 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
302 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
32 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
490 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,179
0 votes
1 answer
110 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
0 answers
128 views

What's the best way to get multi-chain (EVM only) transaction details given a wallet address?

Context I want to display user transactions as shown in Polygon scan (with all the details, logs, decoded input field, etc.) Currently I use Ankr's getTransactionsByAddress to get the transactions for ...
Nishanth Gobi's user avatar
0 votes
0 answers
27 views

web3.eth.abi.decodeLog not finding an event argument

I have a complicated event with the following signature: event SwappedShares(uint256 _stable, DataTypes.FeeReturn _fees, address _user, DataTypes.SubPoolGroup[] _subPoolGroups); Here are the ...
Barney Chambers's user avatar
0 votes
0 answers
142 views

abi: cannot use invalid as type array as argument

I am using go-ethereum to deploy a smart contract. This is how I create the contractABI contractABI, err := abi.JSON(strings.NewReader(getAbi())) if err != nil { log.Fatal(err) } ...
pigfox's user avatar
  • 51
0 votes
1 answer
348 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
0 answers
143 views

How to decode data into a struct and store it?

I am trying to make a function that takes in abi-encoded data and decodes it into a struct and stores the struct's values in my smart contract. To generate the encoded data, I am using ethers.js ...
ohShoes's user avatar
  • 53
0 votes
1 answer
356 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
117 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
335 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
0 votes
1 answer
40 views

using encodePacked vs encodeWithSignature when call function on an external contract

When we call a function on an external contract, we need to put calldata as an argument. // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.10; contract test1 { mapping (address => ...
imelon2's user avatar
  • 528
0 votes
1 answer
30 views

Is there a downside to using a deprecated version of the ERC20 ABI?

I am aware there is deprecated keyword "constant" present in old versions of Solidity ABI for ERC20. Is this still just as good as the latest versions, or should I update asap? On the other ...
Sergio Gliesh's user avatar
0 votes
1 answer
428 views

Does the specific ABI of a particular ERC20 token have to be used in order to interract with it?

....Or can the standard, static ERC20 ABI be used for any ERC20 token equally? Namely, in a custom ERC20 token (smart contract) there can exist any function(s) the author of a token may have ...
Kyell's user avatar
  • 91

1
2 3 4 5
10