3,053 questions
-4
votes
0
answers
53
views
How to auto-close trades on Stop Loss/Take Profit without MetaMask confirmation? [closed]
I’m building a web dApp that places futures positions with stop-loss (SL) and take-profit (TP) values.
When the price crosses the SL or TP level, I want the position to close automatically.
### ...
0
votes
0
answers
47
views
Hardhat3: How to deploy smartcontract in script on localhost?
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 ...
0
votes
2
answers
69
views
using dazl to access daml sandbox. how can i listen to events on ledger?
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 ...
2
votes
0
answers
97
views
How does Sui’s one-time witness (OTW) guarantee single initialization at the protocol level?
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 ...
0
votes
2
answers
83
views
How to declare the 'types' argument to `Eth::Abi.decode` to parse the response of a Solidity function that returns a single struct
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": "...
2
votes
1
answer
79
views
How do you do deploy a smart contract in native mobile app using Dart or Flutter (without using a webview)?
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. ...
1
vote
0
answers
37
views
Calling the ethereum EIP-4788 contract from go
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 ...
1
vote
1
answer
41
views
Can hashing be done in compact on the client side using persistentHash?
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): ...
0
votes
1
answer
60
views
Chainlink VRF: Created Subscription ID Mismatch Between On-Chain and Dashboard
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 ...
0
votes
0
answers
43
views
Can I implement a tax deduction feature in an ERC20 contract where the tax is deducted in BNB or ETH when a user swaps tokens on PancakeSwap?
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 ...
1
vote
0
answers
52
views
Uniswap V3: Unable to Add Liquidity After Deploying ERC20 Token with Tax Mechanism
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 ...
1
vote
1
answer
82
views
Risc Zero Proof Verification Fails On-Chain but Works Off-Chain
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. ...
0
votes
1
answer
38
views
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ]
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)...
0
votes
0
answers
193
views
PancakeSwap universal router usage. Web3, PancakeSwap, Bsc testnet
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 ...
-2
votes
2
answers
60
views
Why it is taking high cause fee
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 ...
1
vote
0
answers
38
views
How to Deploy a Smart Contract and Have Someone Else Sign the Transaction? Polygon
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’...
0
votes
0
answers
32
views
IBM Hyperledger Fabric error in packaging chaincode
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 ...
0
votes
0
answers
58
views
Error while trying to compiler Zokrates file: square.zok
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:
...
0
votes
1
answer
63
views
How do I send a payment to an address other than the sender from a TON smart contract?
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 ...
0
votes
1
answer
52
views
How can know new token(smart contract) except https://www.defined.fi/new? [closed]
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'...
0
votes
1
answer
81
views
function sync() in smarcontract Pair Uniswap V2 is called from where
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 ...
0
votes
0
answers
37
views
FailedCall() with OpenZeppelin meta transactions (ERC2771Forwarder and ERC2771Context)
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 ...
0
votes
0
answers
46
views
Deploying a proxy for the smart contract using hardhat ethers is not working
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 ...
0
votes
1
answer
95
views
Failing to deploy smart contract through ganache gui
const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
try {
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:7545")...
0
votes
0
answers
69
views
FunT Ton Language send to multiple addresses
I`m writing FunC ton language. Here is my code in recv_internal:
int amount = 10004000;
slice dis_address1 = "0QCqKALVHGWllnc90l3oQ0yn6j0bJ2vyQp-IV76Dxm9TnWdL"a;
sum = sum + ...