All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How to use gnosis safe in situations where private key of the safe is needed?

I know smart contracts do not have private keys and so in the case of gnosis multi-sig wallets. But I have a use case where I am using a 3rd party SDK that requires a private key to get initialized ...
0
votes
0answers
5 views

How can I call contract which created from another contract (In TESTING)?

Hello guys now Im testing my contract, but I dont know how to call contract which created from another contract, If someone did it please help) Create I mean like following code. function ...
0
votes
0answers
4 views

Signing a 0x limit order as a taker without UI

I have been using the @0x/contract-wrappers to sign a limit order as the taker but I can't find a way to configure a provider that can accept a private key to sign the order rather than using Metamask ...
0
votes
0answers
3 views

TypeError: ethers.getContractFactory is not a function

Im trying to run the partybid contract https://github.com/PartyDAO/partybid from windows powershell but am running into this issue where getContractFactory is not a function Under helpers.js: const fs ...
0
votes
0answers
4 views

Call function in event callback

I have a contract that sends an event when the transaction is done. In my React/Web3 application, I'm listening to this event and when it's triggered I would like to run another function. My code ...
0
votes
0answers
2 views

Passing Contract's variable as param constructure of another contract when migrate truffle

Token.sol contract Token is ERC20 { address public admin; constructor () ERC20("SimpleToken", "SIM") { admin = msg.sender; _mint(msg.sender, 10000 * (10 ** ...
0
votes
0answers
3 views

Pricing of LP token

I was reading this article about the fair pricing of liquidity pool tokens and I came across this formula: How to derive it?
0
votes
0answers
8 views

Ive got an Eth wallet for which I have damaged my private key I have 59-60 out of 64 characters in order and the public ID - need to brute force guess

Ive got an Eth wallet for which I have damaged my private key I have 59-60 out of 64 characters in order and the public ID - need to brute force guess the password how do I do this quickly and ...
0
votes
0answers
3 views

couldn't send transaction to smart contract with local private key

type is not supported from eth_keys.datatypes import PrivateKey from web3 import Web3, eth from web3.middleware import geth_poa_middleware from web3.middleware import ...
0
votes
1answer
17 views

TypeError: Member "toString" not found or not visible after argument-dependent lookup in uint256

im having a big trouble trying to resolve this problem. Maybe anyone here can help me find it. This is the .sol contract and im having this error: TypeError: Member "toString" not found or ...
0
votes
0answers
3 views

Locking Liquidity and renounce: still able to withdraw after lock period?

Someone can help me to understand how Locking Liquidity works? I want to know how Unicrypt or Trustswap lock our tokens: If I create a token, add the liquidity, lock it with unicrypt, renounce the ...
0
votes
0answers
2 views

best way to delete or clear nested mapping?

How would I clear/reset this mapping of mapping? mapping (address => mapping (address => bool)) nomineeApprovals
0
votes
0answers
5 views

Downloading all transactions from an NFT project

I'm looking to get access to a table where each row represents a single NFT transaction for a specific project. Let's use the Bored Apes Yacht Club NFT project as an example. Let's say there are 10,...
0
votes
0answers
5 views

Give certain address permission to transfer ownership

I'm trying to create a contract and give a certain address, that is not the owner, permission to transfer ownership, or to atleast have the transferOwnership function public but only be able to ...
0
votes
0answers
11 views

Mint failing on rinkeby with ethers and react. Help troubleshooting?

I've deployed a contract on Rinkeby with Truffle, and connected to it with Ethers.js and React. When I call the minting function defined in the smart contract, passing an address and token metadata ...
0
votes
0answers
6 views

Issue with web3 trying to connect to ganache from node's console [closed]

I'm trying to connect to my ganache and I'm getting this error. Welcome to Node.js v17.2.0. Type ".help" for more information. > const web3 = new Web3('http://127.0.0.1:7545) const web3 = ...
0
votes
1answer
9 views

Interaction of smart contract with mobile wallet/ wallet connect

I have a dapp that interacts with a smart contract using metamask through brownser and I would like to be able to interact with this smart contract through a mobile wallet using wallet connect. I can ...
0
votes
0answers
5 views

Refund gas fee Solidity

I have a solidity smart contract function which can only be called by the owner (onlyOwner modifier). A Node.JS app calls this function, it has the owner wallet mnemonic, and the function executes. ...
0
votes
0answers
6 views

How to listen for events in a well-known contract (Compound cDai) called by my contract

I don't know how to debug the situation where I wrote a contract (MyDeFiProject) which calls a well-known contract developed by someone else (in this case Compound cDai on Rinkeby). The transaction ...
0
votes
1answer
9 views

Handling transactions fees when using Chainlink

I have a smart contract which must reach out to an off-chain data source (custom API) in order to verify that the wallet calling the function can do so. My understanding is that this is done via a ...
0
votes
0answers
3 views

Issue Badges (ERC721) for ICO participants ; and based on that define reflection % in the ERC20 contract?

I have unique requirements for a project. They are trying to issue ERC721 based badges/identities to the ICO participants. And utilize that identity/cert for sending reflection rewards via ERC20 ...
0
votes
1answer
9 views

How to bit shift a bytes in solidity / assembly?

I can bit shift uint_n_ easily but I don't manage to bit shift a bytes memory myBytes. When doing myBytes << i I have a compile error and when using assembly I receive 0. See my MWE for assembly ...
0
votes
0answers
2 views

Reflect.finance token-type deployment: change distribution on constructor

I am developing a token based on reflect.finance / safemoon way of work with reflections between holders, but I always reach an error when trying to distribute the initial token supply between ...
0
votes
1answer
15 views

Using ECDSA to verify a signature inside smart contract

Following the technique to verify ethereum signature with ECDSA. Sign it like you mean it: creating and verifying Ethereum signatures Signing and Verifying Messages in Ethereum A Closer Look At ...
0
votes
0answers
6 views

Geth state heal in progress - will it terminate?

This question is somewhat related to this one, but unfortunately I don't have enough reputation to post my thoughts there. I have been tracking my state heal progress for some time now, and I have a ...
0
votes
1answer
10 views

How to use solidity library in brownie?

Say I have the following SimpleMath solidity library defined as follows: library SimpleMath { function add(uint a, uint b) internal pure returns(uint) { return a + b; } } How do I import ...
0
votes
0answers
10 views

How to allow contract function to run only after receiving gas payment

I am creating a dApp where there are 2 major stakeholders. Clients and multiple organizations. For a background on the Smart Contract, it has modifiers like onlyAdmin & onlyOrganizations. Where a ...
0
votes
0answers
14 views

Gnosis UI display decoded transaction details

I am creating transactions (both simple and multisend) to send to my Gnosis Safe using the @gnosis.pm/safe-core-sdk and @gnosis.pm/safe-service-client Node.js packages. I can see the transactions show ...
0
votes
0answers
15 views

complex panoramix statement to sol code

I get some code from panoramix decompiler and I wanna simulate it in a solidity. the statement is so complex for me when I write solidity code from it, it returns a different value than the deployed ...
0
votes
1answer
8 views

Large array as constructor arguments fails

My goal is to pass two fairly large arrays to my constructor: constructor(AggregatorV3Interface _chainlinkFeedAddress, IERC20 _currency, address[] memory _whitelistedAddresses, uint256[] memory ...
0
votes
0answers
11 views

How to verify whether an address has been active on OpenSea?

We do a bunch of validations in our project to ensure real people can claim NFTs and that bots with auto-generated wallets are filtered out. One I'm still figuring out is how to ensure the address is ...
0
votes
0answers
5 views

web3.py (python) web3.eth.sendTransaction throws checksum error, when converting "to" field to checksum I get "web3.exceptions.ExtraDataLengthError"

After calling data from 'https://polygon.api.0x.org/swap/v1/quote?' I want to send the json recieved as transaction using web3.eth.sendTransaction(tx). However, using web3.py (python) this throws the ...
0
votes
0answers
8 views

So, anyone can access any smart contract just by using interfaces right? [duplicate]

If true, how can I restrict access to my future contracts to only me?
0
votes
0answers
5 views

What happens if a node has better compute than another node?

Let's say you have node A which has a better processor/ram than node B. If the nonce in proof of work was not required, than Node A should theoretically be able to compute the next block state faster ...
0
votes
0answers
8 views

Correct terminology for referring to a specific function of a specific contract

Is there a preferred way of referencing a function of a contract in English? For example, suppose I want to say to someone "to learn more, call the contractInfo function on the contract with ...
0
votes
1answer
10 views

Is MEV possible on bitcoin?

Miner Extractable Value (MEV) is a big topic in the life of ethereum users, and it creates an additional revenue source for the miners. Is MEV possible on the bitcoin blockchain as well? And if yes/no,...
1
vote
1answer
8 views

EIP-1559: Why does geth expect an input list for types.txdata?

I manually composed, signed, and serialized the following raw transaction: ...
0
votes
0answers
5 views

On EIP-721, how to check if receiver address is capable of receiving?

In the EIP-721 transferFrom states that the caller is responsible to confirm the "to" is capable of receiving NFTs or else they may be permanently lost. Because it throws if "to" ...
0
votes
0answers
9 views

How can I delay some Blocks By using Web3.py

For now, I'm creating some bots by using Web3.py. And I have to delay some blocks to send transaction for this bot. In web3.js, I know provider.waitForTransaction(hash, confirmation). and it can help ...
0
votes
0answers
5 views

How much it takes for all nodes to sync?

I think the title is clear. I wanted to know how much it takes for all nodes to sync on ethereum,binance and fantom network?
0
votes
0answers
5 views

I am trying to establish the price relationship for the USDT token sale

I am trying to make a token price per stablecoin relationship, but it is not being easy since the ouput always returns 0 uint256 baseDivisor = 18; uint256 public priceTokenPerDai = (1 / baseDivisor); ...
0
votes
0answers
11 views

How to add transaction deadline?

I am using web3 to make transactions but I am stuck on how can I add transaction deadlines in web3.eth.sendTransaction function. I am using 0x API for getting the swap quote. My code :- await web3.eth....
0
votes
1answer
5 views

How do I assert this properly?

Say I want to make a test for this sample contract: // assume we import OpenZeppelin's Ownable contract Metaverse extends Ownable, ... { ... // Assume this is just to experiment and learn. ...
0
votes
0answers
6 views

Need your help with technical realization Binance Smart Chain contract with top up and withdraw balance in both USDT and BUSD currencies?

How to create smart contract for binance smart chain, where users can top up his balance and withdraw their balance in both: USDT and BUSD currencies? But their balance in the smart contract should be ...
0
votes
0answers
6 views

how to add fucntion batch transfer?

hello i want to know if this function of batch transfer is correct : ----------------------------- i already add this function on my contract but when i deploy the contract the fucntion dosnt work ...
0
votes
0answers
9 views

Get list of all child contract addresses from contract factory in solidity

I have a factory contract with the below code: import './interfaces/ChildInterface.sol'; import './Child.sol'; contract Parent { Child[] public childContracts; function createContract(address ...
0
votes
1answer
8 views

[SOLVED]: CANNOT find my pending transactions using: ether.js & [provider.on("pending") and provider.getTransaction(tx)]

I am using Quicknode and ether.js to monitor pending transactions using the following code: provider.on("pending", async (tx) => { provider.getTransaction(tx).then(function (transaction)...
0
votes
1answer
9 views

Block address of a contract

In solidity we retrieve owner address by using msg.sender, 1.But how to retrieve the block address on which the contract was deployed ?
0
votes
0answers
8 views

Best Practices For Splitting Payments

I have bulid a payment split flow. It is working and tested on Remix. I am using PaymentSplitter by OpenZeppelin and here's how it looks overall: However, I would really appreciate if I can get a ...
0
votes
0answers
19 views

Best way to convert point coordinate (x, y) to unique token Id

I have a map which has width as 100 and height as 100, meaning ​100 * 100 size map. The origin is at the center and its coordinate is (0, 0). So -50 < x < 50 and -50 < y < 50. I want to ...

15 30 50 per page
1
2 3 4 5
824