Comments (7)
@TheGreatAxios Thank you for answer.
This is my fault.
The same to: address was used.
I separated the to: address, and it works fine.
(contract address, wallet address)
...
final contractFunction = contract.function('safeTransferFrom');
return await client.estimateGas(
sender: EthereumAddress.fromHex(from),
to: EthereumAddress.fromHex(contract address),
data: contractFunction.encodeCall([EthereumAddress.fromHex(from), EthereumAddress.fromHex(wallet address), tokenId, Uint8List.fromList([])]),
gasPrice: EtherAmount.inWei(gasPrice),
amountOfGas: gasPrice,
value: EtherAmount.inWei(BigInt.from(1)),
);
...
The gasLimit is similar to 90,000. (real 87,933)
Thank you very much.
Have a good day.
from web3dart.
your code is ok. change your rpc url
from web3dart.
@ttb-inc Is it working? if not, what network are you using?
from web3dart.
@ttb-inc Is it working? if not, what network are you using?
@TheGreatAxios
It still doesn't work.
[Network]
80001 (Polygon Testnet(Mumbai))
(https://docs.polygon.technology/docs/develop/network-details/network/)
[RPC Endpoint]
RPC Endpoint tested two things.
- https://rpc-mumbai.matic.today/
- Supported by Moralis. (https://speedy-nodes-nyc.moralis.io/[API_KEY]/polygon/mumbai)
Both of the above result in the same result.
Thank you.
from web3dart.
@ttb-inc Please send your code here, I will take a look. Currently, I am having no issues estimated gas on Mumbai; so it may be something related to your setup/config.
NOTE: DO NOT UPLOAD ANY API KEYS when you upload your code (Just a reminder :)) I see you commended the one out above
from web3dart.
@ttb-inc Please send your code here, I will take a look. Currently, I am having no issues estimated gas on Mumbai; so it may be something related to your setup/config.
NOTE: DO NOT UPLOAD ANY API KEYS when you upload your code (Just a reminder :)) I see you commended the one out above
@TheGreatAxios Thank you for answer.
...
final contractFunction = contract.function('safeTransferFrom');
return await client.estimateGas(
sender: EthereumAddress.fromHex(from),
to: EthereumAddress.fromHex(to),
data: contractFunction.encodeCall([EthereumAddress.fromHex(from), EthereumAddress.fromHex(to), tokenId, Uint8List.fromList([])]),
gasPrice: EtherAmount.inWei(gasPrice),
amountOfGas: gasPrice,
value: EtherAmount.inWei(BigInt.from(1)),
);
...
If there is no problem with the above code, I will check it again.
Let me create testable code.
Thank you.
from web3dart.
@ttb-inc Is this for an ERC-1155 or an ERC-721?
Also, can you please provide the error.
Thanks
from web3dart.
Related Issues (20)
- Event Filtering broken without Websockets HOT 1
- Sending hex of bytes32 instead of Uint8List
- int? chainId = 1, causing the sender to be always invalid sender HOT 2
- Credentials.signToUint8List fails with RangeError HOT 2
- Add token and get balance HOT 3
- RPCError: got code -32000 with msg "under min gas price". HOT 1
- Flutter web3dart error: Invalid argument: Instance of '_BigIntImpl' HOT 1
- Unable to encode contract function HOT 1
- How to call secp256K1 directly, the private key package is hashed using keccak256 HOT 2
- Signature transaction HOT 1
- Data conversion
- How to get the name of the log in transaction receipt ?
- Does okx-chain not support it?
- JsonRpcError(code: 5000, message: Cannot read property 'gasLimit' of undefined)
- How to use on layer2 arb network?
- Question: Flutter Web and Metamask HOT 1
- Transaction value property can be null but it's not compatible with some EVM Wallets
- Any plan to add EIP-4844 support?
- GeneratedContract read add sender
- RPCError: got code -32000 with msg "insufficient funds for transfer"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web3dart.