Questions tagged [fantom]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
19 views

Reserves are not changed after swap tokens

I forked Fantom network. And I use UniswapV2Router02, WrappedFtm, Btc contracts deployed on Fantom network in my test scripts. This is test scripits. beforeEach(async () => { [owner, ...
0 votes
1 answer
27 views

HardhatError: HH700: Artifact for contract "UniswapV2Router02" not found

I wanna get UniswapV2Router02 deployed on Fantom network. UniswapRouter = await ethers.getContractAt( "UniswapV2Router02", "0xf491e7b69e4244ad4002bc14e878a34207e38c29" )...
1 vote
0 answers
12 views

MetaMask Registering Contract Methods - Not Working

I was following these docs: https://docs.metamask.io/guide/registering-function-names.html#verify After verifying my contract and using the write section, my methods still aren't verified by MetaMask, ...
  • 33
1 vote
1 answer
28 views

Why is there a public burn function in this Fantom Smart contract?

I was reviewing some of the smart contracts on Fantom and came across this function in ZOO: https://github.com/ZooEcosystem/ZooCoin/blob/main/contracts/ZOO.sol Whilst they have an internal burn ...
  • 33
0 votes
2 answers
21 views

Smart Contract Creation and Functions

I've recently created a smart contract on Fantom and wondered about a few details: Mint Functions Burn Functions Can any users or developers interact with these functions. For example, with my newly ...
  • 33
0 votes
1 answer
23 views

Transaction triggered successfully but users can edit transaction amount, How can I stop this?

I've recently added FTM payments to my website and discovered once the transaction is sent to MetaMask everything goes to plan but looking at the image below, Users can directly edit the amount sent ...
  • 33
0 votes
1 answer
28 views

Gnosis Safe on Fantom

There seems to be unofficial Gnosis Safe launched on Fantom blockchain. https://docs.fantom.foundation/staking/fantom-safe Does this solution have the same API that Gnosis Safe provides to get ...
0 votes
0 answers
58 views

Why gas used on fantom is different from estimate gas and changed if gas limit changed

here is code and gasEstimate is 25000, tx_receipt.gasused is 50000 when gaslimit is 300000, 170000 when gaslimit is 1500000 tx = contract[network['name']].functions.test2().buildTransaction({ ...
  • 11
0 votes
1 answer
80 views

Wftm swap transaction always fails

I'm trying to swap some wftm tokens for boo tokens on spookyswap. I have 1.11 worth of wftms. I've done it manually with 0.01 worth on the spookyswap website so i don't understand why this code won't ...
  • 101
0 votes
1 answer
32 views

What does self destruct in a contract mean? [duplicate]

When I see https://ftmscan.com/address/0xe32e98b79329c045c72613b717a4cd0c168c3c49 There is a writing that the contract is self destruct. What does it mean? Some says that no one knows the private key ...
  • 243
0 votes
1 answer
17 views

How do we know that a transaction has been canceled?

For example, If I see this https://ftmscan.com/tx/0xa491250e25eb3511d6313f662662eb8e10b07d8fb033f81516dce41d97adcda3 It's written that there is this contract https://ftmscan.com/tx/...
  • 243
0 votes
0 answers
14 views

How to check if a transaction is finalized?

I understand the concept of TTF (time to finalization) but I still couldn't figure out how to check if a transaction is finalized. Imagine building a gambling app, when we should finalize our game? ...
  • 1
0 votes
1 answer
50 views

Contract has callable functions not in ABI or source code

I've found several contracts for which I am able to call functions on the contract's front-end but that exist in neither the contract source code nor ABI. When I call the functions, ftmscan (an analog ...
  • 35
0 votes
0 answers
9 views

I cannot cancel some of my limit old limit orders in spooky swap. I wonder why?

I created limit order from a long time ago. These are 2 of them https://ftmscan.com/tx/0x3dba04ddf34a4c59b62fd7923cc568958de77ac6dffc9feb13092f056f9b2372 https://ftmscan.com/tx/...
  • 243
0 votes
1 answer
28 views

do wallets like metamask interact with infura.io?

I want to create my own wallet using nethereum. Do I need paid service like infura? Say I want to send money from one fantom address to another. Do I need some public ethereum or fantom client?
  • 243
0 votes
0 answers
26 views

Hardhat Forking: Delegate FTM and get pending rewards

I am currently trying to write a contract which delegates some FTM into the SFC contract. I am using Hardhat and I am forking FTM mainnet. So far so good :) I am able to delegate the FTM's through the ...
  • 505
0 votes
0 answers
81 views

What does difficulty mean in PoA and PoS chains?

In PoW, the meaning of "difficulty" is quite straightforward and, for instance, fully described in yellow paper. (https://ethereum.github.io/yellowpaper/paper.pdf) But what does the "...
0 votes
1 answer
36 views

0x: Query Liquidity Pools for APR

Is there a way to use 0x to query LPs to find out their current APR? I'm trying to build a small reporting tool and would love to query LPs on these DEXes, but can't seem to figure out how. I tried ...
1 vote
1 answer
67 views

How to query prices on Fantom blockchain

I'm trying to write some Javascript code to query Fantom DEXes to find out the price wFTM in various wFTM / USDC liquidity pools and I'm a bit lost as to what contract method to call. I'm starting ...
1 vote
1 answer
71 views

Gnosis Safe Fantom - Connect to site that needs to connect using MetaMask and not WalletConnect

have a multi-sig wallet created and in use. It requires 2 of 4 signatures and all seems to be working just fine with it. I now need to interact with a website (https://play.tankwars.zone/) to connect ...
0 votes
0 answers
24 views

What are the differences between the Opera’s evm on the Fantom blockchain and the Ethereum’s mainnet blockchain ? Or how to deploy a contract at 0x0?

Opera is the Ethereum compatibility layer for the Fantom blockchain. Their team is claiming it’s a copy of the original go Ethereum implementation without the originally planned enhancements. However, ...
0 votes
0 answers
49 views

Fantom Deployment with Truffle stuck in confirmation

I try to deploy a contract with truffle on FTM mainnet. But it looks like the transactions never get submitted. Output: Deploying 'Contract' ------------------------- ⠋ Blocks: 0 ...
  • 251
2 votes
1 answer
449 views

Unable to decode input using Etherscan ABI

I'm looking at the input for a transaction that calls a Smart Contract and I cannot make sense of it. This specific sample is on FTM, but I'm assuming there is no difference in behaviour to ETH? ...
0 votes
0 answers
273 views

TypeError: Invalid hex String

I want to send token using private key When I call signTransaction function, the "Invalid hex string" error occurs. This is my code const sendToken = async (balance) => { try { const ...
0 votes
0 answers
157 views

In Fantom network, How to send tokens as soon as tokens transferred to wallet using web3.js

I want to send tokens (LQDR, BOO, BEETS ...) as soon as they are transferred to wallet. If I run program, it checks tokens' balance in specific wallet constantly. If a token is transferred to the ...
0 votes
0 answers
216 views

FAIL. Reason: SafeMath: subtraction overflow When trying to deposit to Geist on FTM

Keep getting an overflow randomly when trying to deposit to geist. This error randomly occurs and I cannot explain why. Has anyone else experienced this behaviour? Here is a link to the repo:https://...
0 votes
1 answer
434 views

Send Signed Transaction with Private key

I deployed Test Token(Copy of LQRD) on Fantom test network. I sent signed transaction From A account To B account using A private key. The transaction was succeeded. But token was not transfered from ...
0 votes
1 answer
54 views

0x API returning error for getting Fantom quote

The call is this one and fails with a "Server Error" https://fantom.api.0x.org/swap/v1/quote?&buyToken=0x04068da6c83afcfa0e13ba15a6696662335d5b75&sellToken=...
  • 119
0 votes
0 answers
33 views

Interacting with contract giving absurd price in Metamask

I have created a token exchange contract that works fine when interacting directly from Remix or etherscan.io , but when trying to build the app to work with the contract, it is giving absurd prices ...
  • 11
0 votes
1 answer
1k views

ERC20 Approve call to use tokens in another smart contract

I am trying to build a smart contract that is using my custom token. Below you can find the sample of smart contract that I have created that showcases the approve function. // SPDX-License-Identifier:...
  • 11
1 vote
0 answers
215 views

Websocket returning "unexpected server response: 200"

Using ethers.js with node, I was able to connect and communicate with websockets until recently. My code did work but now I only get Unexpected server response: 200 as response when trying to ...
  • 11
0 votes
1 answer
36 views

Different gas costs for token transfer on Fantom network

Can someone explain why the same WFTM transfer costs one time 38k and another time 23k gas? Here are the two transactions: https://ftmscan.com/tx/...
  • 123
0 votes
0 answers
183 views

How Does One Withdraw LP tokens To Smart Contract Address that Are Received When Adding Liquidity To SpookySwap using "removeLiquidity" in solidity?

Hello Team Using The Following Function One Is Able To Remove Liquidity uint liquidity = IERC20(LPADDRESS).balanceOf(address(this)); IERC20(LPADDRESS).approve(XXX, liquidity); IRouter(XXX)....
1 vote
1 answer
90 views

eth_accounts RPC method returns some unexpected accounts on the Fantom blockchain

What are the accounts that get returned by the eth_accounts RPC call on the Fantom blockchain? This doesn't seem to be the case on other blockchains and they (seemingly) always return an empty list. ...
  • 121
1 vote
3 answers
266 views

How to deploy a contract in Rinkeby, Ehereum, Polygon and Fantom with the same address?

I have noticed by doing some tests that when I publish the same contract on different networks, the address is the same. Then, the "Etherscan" of each network show a link to blockscan.com ...
2 votes
1 answer
612 views

swap working for `swapExactETHForTokens` but `swapExactTokensForTokens` resulting in an error

I have been trying to write token swap scripts for Spookyswap on Fantom (so the transaction formatting should be pre EIP-1559) in python using web3.py. I have forked Fantom via Hardhat for testing ...
0 votes
1 answer
194 views

constructing transactions for Fantom

Below is my attempt at constructing a transaction on Fantom (Keep in mind that Fantom is not EIP-1559 compatible, so the format should be the old one) contract_txn = contract_SPOOKY_ROUTER.functions....
1 vote
1 answer
1k views

Unable to send_raw_transaction using Web3.py on Fantom Network

I am currently trying to simply send FTM from one wallet to another on Fantom mainnet, albeit encountering a Value error 'rlp: expected List' as listed below. ftm = Web3(Web3.HTTPProvider('https://...
  • 123
0 votes
1 answer
463 views

How to run Dapp on the Fantom blockchain?

I have deployed 2 contracts on Fantom that were running on Rinkeby. Worked really well. However, when I run my Dapp using "yarn dev", I get nothing. It cannot connect to the blockchain. So ...