Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
45 views

I'm writing an ERC20-based contract in Solidity 0.8.21. When I call transferFrom, the transaction reverts even though the allowance and balance are sufficient. Here’s a simplified example: function ...
Fauzan Hidayatulloh's user avatar
0 votes
0 answers
60 views

I'm playing with a simple project of issuing ERC20 token. Following the example in hardhat3 doc, I successifully deployed the contract on localhost with CLI as below: run local blockchain npx hardhat ...
Liuzhou Zhuo's user avatar
0 votes
0 answers
74 views

I’m trying to call the Bluefin contract from my own contract. Bluefin contract: https://suiscan.xyz/mainnet/object/0x5d029d551d589105a9589e47ef75ffaa43e6d9d1d844745867db2a56e18f65e1/contracts The ...
ligulfzhou's user avatar
0 votes
2 answers
81 views

I am trying to create a dazl script that would listen to events on locally run daml sandbox, and upon catching an event, process it (with my bus. logic). AI gives me a bunch of suggestions that fail ...
Buddy Thomas's user avatar
0 votes
1 answer
63 views

I have the following deploment script: require('dotenv').config(); const { ethers } = require("ethers"); const fs = require("fs"); const path = require("path"); const ...
Kotaka Danski's user avatar
2 votes
0 answers
103 views

Sui Move’s one-time witness (OTW) pattern ensures a module’s init function runs exactly once. From Move documentation The OTW is a special type of Witness that can be used only once. It cannot be ...
Yilmaz's user avatar
  • 51k
1 vote
0 answers
35 views

I'm working on testing a Chainlink VRF-based Raffle contract using Foundry, but I’m encountering a EvmError: Revert when running the test that checks whether the raffle correctly blocks entries while ...
King Lucky's user avatar
0 votes
2 answers
84 views

I am using eth gem to interact with a Smart Contract in EVM. The Smart Contract has a function whose ABI in JSON format is this: { "inputs": [ {"internalType": "...
p.matsinopoulos's user avatar
1 vote
0 answers
68 views

I’m testing a Solidity smart contract for a project. A user buys a short-term policy that expires in 5 seconds. After advancing blockchain time by 10 seconds, I try to call claim(), but the ...
Aditya General's user avatar
2 votes
1 answer
84 views

I know how to do this in Javascript with web3.js, but I don't know how to do this from a native mobile app written in Flutter/Dart. I have seen references for people having done this with web3Dart. ...
Stan Gregg's user avatar
0 votes
0 answers
72 views

I have written test cases for the Bridge smart contract, which uses LayerZero for cross-chain communication. However, when I set up the Hardhat project and attempted to run the test cases, I ...
Nitesh Mehra's user avatar
1 vote
0 answers
40 views

I am trying to call the EIP-4788 contract from go. For development, I am using the Sepolia testnetwork. I have a local beacon chain client running connected to a geth instance running on the Sepolia ...
unsafe_where_true's user avatar
0 votes
1 answer
87 views

I'm new to blockchain. I setup a ganache network, added it to metamask. I'm trying to start an npm server and it works. On npm start, I'm being redirected to localhost:3000, where there are 4 options. ...
curious cat's user avatar
1 vote
1 answer
46 views

I'm using Midnight and learning compact. I'm hoping to get some clarification on the persistentHash function (export declare function persistentHash<a>(rt_type: CompactType<a>, value: a): ...
TechnicalError620's user avatar
0 votes
0 answers
128 views

I'm working on a Solana Anchor project and I'm running into a cryptic error when trying to run my tests: Finished `_test` profile [unoptimized + debugging] target(s) in 10.14s Running Unittests src/...
David Horjet's user avatar
0 votes
1 answer
61 views

I'm encountering an issue where the subscription ID returned by my script is different from the one shown on vrf.chain.link for the Sepolia network, which when i try to fund to the subid from my ...
Phc Chu Vaky Ramadan's user avatar
1 vote
1 answer
51 views

I'm learning Midnight's tooling and compact language. I currently have two contracts: a.compact: module a { export sealed ledger num: Uint<8>; } b.compact: import "a"; constructor(...
Petlover620's user avatar
0 votes
0 answers
46 views

The _transfer() function only handles ERC20 token transfers, so I can't implement any logic for ETH or BNB within it. I integrated some functions, but they were not callable on PancakeSwap. When I ...
Nitesh Mehra's user avatar
1 vote
0 answers
21 views

I am new to Solidity and am trying to add a struct containing a mapping to an array. However, this fails. When I run this on Remix I get a message transact to CampaignFactory.createCampaign pending ......
Shubham Tiwary's user avatar
1 vote
0 answers
57 views

I am trying to add liquidity to Uniswap V3 for my ERC20 token, which has a 4% tax deduction on transfers. The tax mechanism ensures that whenever users transfer tokens, 4% is sent to the owner's ...
Nitesh Mehra's user avatar
0 votes
1 answer
80 views

I have deployed an ERC20 contract on the Sepolia chain and added liquidity on Uniswap V2. However, when I tried to swap the token with ETH, the token price was not being calculated, and I was unable ...
Nitesh Mehra's user avatar
1 vote
1 answer
88 views

I am working on a smart contract that uses Risc Zero to verify proofs generated from a Rust program. I have successfully generated the seal, imageID, and journalDigest from the Risc Zero Rust program. ...
user59066's user avatar
0 votes
0 answers
51 views

I'm working on a script to purchase Blum tokens using the TEP-74 Jettons standard, but instead of triggering the buy operation, the transaction is being processed as a normal TON transfer. Below is ...
Okan Altunbaş's user avatar
0 votes
1 answer
51 views

Game.sol //contract using solidity pragma solidity ^0.8.0; contract HeadOrTail{ address public owner; event GameStarted(address indexed player1, address indexed player2, uint256 betAmount)...
Aakash's user avatar
  • 1
0 votes
1 answer
58 views

Here is a question from a coding interview. I am just wondering what would be the major pitfall in this small smart contract in your opinion: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; ...
Tony Nagy's user avatar
0 votes
0 answers
212 views

I'm working on an integration with PancakeSwap using Java and Web3J. All my tests were conducted on BSC Testnet. After conducting some research, I used the UI to perform a transaction that went ...
Fife's user avatar
  • 1
0 votes
0 answers
97 views

In Aptos, we have 2 types of tokens: Coin (e.g., APT) and Fungible Assets (USDC by Circle). How can I efficiently receive both types in my smart contract? Instead of a function that allows <...
Gavin's user avatar
  • 57
-2 votes
2 answers
61 views

https://bscscan.com/address/0x1732b451aa189832109e8715b9ae0563bab7c2bc#writeContract I have deployed this contract on BSC, can someone guide why it is taking some much gas fee. If you have any ...
user919573's user avatar
0 votes
0 answers
39 views

Issue Summary: Problem: When deploying two smart contracts (DonorRegistration.sol and DonationRecords.sol), they were both getting the same address on the Hardhat network, which should not happen. ...
Gnaneshwar Reddy's user avatar
1 vote
0 answers
38 views

I'm trying to deploy a Smart Contract on the Polygon mainnet, but I need the deployment transaction to be signed by someone else's wallet (so they become the contract owner and receive the tokens). I’...
user2701487's user avatar
0 votes
0 answers
96 views

I'm having trouble making this smart contract process successfully. Polygonscan I have tried optimizing the bytecode and trying different parameters, but I keep getting the same errors. I can't figure ...
J324's user avatar
  • 13
0 votes
0 answers
38 views

During packaging of chaincode of tar.gz file in IBM Hyperledger Fabric I'm getting the below error: Failed to determine workspace language type, supported languages are JavaScript, TypeScript, Go and ...
Prashant Barai's user avatar
1 vote
0 answers
109 views

I am getting Fail with error 'FiatTokenV2: invalid signature' https://sepolia.etherscan.io/tx/0x405cb5c8a6f0295d1194bf6ce794f906537cefb5b65ab2005d674812e7f66c35 The contract itself - https://sepolia....
Itai Bar's user avatar
  • 757
0 votes
0 answers
58 views

I'm trying to write and compile a ZoKrates program that verifies if a private number x satisfies x^2 == 16. The program in ZoKrates should look like this: def main(private field x) -> field: ...
Rash's user avatar
  • 1
-1 votes
1 answer
254 views

I created a ERC721 type smart contract to mint 8 NFT's to the Polygon blockchain. The NFT images are stored on my own server (for this project I don't use IPFS). I also created the corresponding json ...
Bart DV's user avatar
0 votes
1 answer
66 views

I'm using tact and I haven't found any resources that do this successfully: withdraw the tokens that were sent to the smart contract into a specified address. I have attempted this code to withdraw ...
Anon's user avatar
  • 11
0 votes
0 answers
80 views

I'm facing the Error(execution revert: STF) while swapping USDC into wAVAX I’m encountering the following error message when attempting to swap USDC for AVAX using the Uniswap V3 exactInputSingle ...
Abishek 's user avatar
0 votes
1 answer
52 views

I want to get name lists of new token more faster than Defined.fi/new I am knowing just Defined.fi/new. but more than faster, which web site or scrape tool do I have to use ? For new token listing, I'...
dr.mStar's user avatar
  • 101
-2 votes
1 answer
173 views

I am new to Solidity and Smart Contracts. I saw a Youtube video of a supposed automated bot which I am sure it is a scam. This is the code the they provided and I cannot tell where the money is ...
Kristi Jorgji's user avatar
0 votes
1 answer
89 views

I understand that the Pair contract will use TWPA to ensure price average, this _update function is called when Mint, Burn, Swap. In case the average period does not have the above transactions, the ...
Newbie's user avatar
  • 21
0 votes
1 answer
94 views

I'm working on a smart contract test using ethers.js, and I'm facing an issue with rounding errors when comparing ether balances of accounts after executing transactions. Specifically, the problem ...
Vlad Tsykin's user avatar
0 votes
0 answers
42 views

I'm encountering an issue with meta-transactions (OpenZeppelin Forwarder and Context) in my ERC-721 contract. When executing a batch token transfer via a meta-transaction, I receive the following ...
Antonio M's user avatar
0 votes
2 answers
83 views

I have a smart contract which can hold ETH. receive() external payable whenNotPaused { if (msg.value == 0) revert AmountZero(); emit EthDeposit(msg.sender, msg.value); } function withdraw(...
Fergus Johnson's user avatar
0 votes
0 answers
49 views

I am able to compile the smart contract successfully, which generates the ABI and bytecode for the contract as expected. Below is my deployContract function that gets the ABI and bytecode for the ...
Gowtham Prabhu K A's user avatar
0 votes
0 answers
94 views

I have deployed a simple smart contract to try on the TRON Shasta network via tronide. Here is the simple contract address: contract. I assumed it would display code tabs on the smart contract ...
Wildanzr's user avatar
0 votes
1 answer
99 views

const ethers = require("ethers"); const fs = require("fs-extra"); async function main() { try { const provider = new ethers.JsonRpcProvider("http://127.0.0.1:7545")...
666ryuga's user avatar
0 votes
0 answers
36 views

const ethers = require("ethers"); const fs = require("fs-extra"); async function main() { try { const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545")...
666ryuga's user avatar
0 votes
0 answers
73 views

I`m writing FunC ton language. Here is my code in recv_internal: int amount = 10004000; slice dis_address1 = "0QCqKALVHGWllnc90l3oQ0yn6j0bJ2vyQp-IV76Dxm9TnWdL"a; sum = sum + ...
ali shekari's user avatar
1 vote
0 answers
82 views

I wrote some unit tests for my modules, which worked well. But I don't get why I can't call these functions on Aptos Explorer The error is showed in the image is Error: {"message":"...
Gavin's user avatar
  • 57
0 votes
0 answers
122 views

I am using 1inch swap aggregator smart contract to swap some amount of a token to another one. As 1inch described here in AggregationRouterV6 contract we can use the function swap as follows: function ...
Alireza Zojaji's user avatar

1
2 3 4 5
62