Questions tagged [smart-contract-wallets]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
24 views

How to get smart contract information about ABI token balance by web3?

when I get ethereum block data like below... from web3 import Web3 w3 = Web3(Web3.HTTPProvider('http://127.0.0.1:8545')) print(w3.isConnected()) block = w3.eth.get_block('latest') it can get block ...
0
votes
1answer
11 views

ERC20 token conversion to ETH or USDC

How can we convert ( via smart contract coding ) any erc20 token like BAT back to ETH or USDC ? I am very new to smart contract programming and I want to write the smart contract for the conversion. ...
0
votes
1answer
10 views

How to write smart contracts using solidity to control other smart contracts?

I am learning blockchain tech and try to write some smart contracts racking my brains for the following things using Proxy. a smart contract that can extract data from a different contract and save ...
0
votes
1answer
10 views

How to transfer DAIs from account to smart contract and vice-versa?

I used the below code to send 0.1 DAI from my account to a smart contract: const tokenTx = await daiTokenContract.approve('accountAddress', ethers.utils.parseEther("0.1")); await tokenTx....
1
vote
0answers
21 views

Important Question regarding Github repository. Need kind Help!

I am facing some errors during the installation of dependencies. whenever I run npm install the dependencies start downloading however after a few seconds it gives the following error shown in ...
0
votes
3answers
56 views

How to write a Solidity function that accepts ERC20 tokens as payment? [duplicate]

There is an ERC20 token (contract 1 - I do not own this.) and the tokens are being used to pay for a service in my services contract (Contract 2). I can easily send contract 1 tokens from the user ...
0
votes
0answers
18 views

MetaMask - RPC Error: Error: [ethjs-query] while formatting outputs from RPC

I am very new to Ethereum smart contract solidity programming. Currently, I have been facing this issue when I try to pass a variable from my Node.js servlet to the smart contract I deployed using ...
0
votes
1answer
19 views

How to securely send a message

I was wondering that can I encrypt a string, send it to a smart contract, for that to be decrypted only by some address's private key? e.g "Hello" to be encrypted in a way that it would be ...
0
votes
0answers
10 views

Solidity Smart Contract - Split and Send Contract ETH Balance Between Two Accounts

Want to start off by saying thanks in advance. I'm very new to solidity, so really appreciate your time. I've built a basic smart contract for testing purposes, and I'm running it on Remix. I want to ...
0
votes
0answers
14 views

NULL value returned when trying to fetch data from solidity smart contract from react js

I'm trying to make a Student Management System using Ethereum blockchain. I've linked my smart contract (solidity) with react frontend. I try to get the setted value from the smart contract, but this ...
0
votes
0answers
16 views

Unlock a wallet address for use in smart contracts

I want to unlock my wallet address for use in Smart Contracts. I’ve already done it on Ganache Cli on a forked chain but I don’t know how to do it on the mainnet. Thanks in advance!
0
votes
0answers
8 views

Why my hash value for separate files is not being rendered?(Ethereum Solidity)

I'm trying to store my files in IPFS and get the hash value and store them in the smart contract.I want to render my hash value in the frontend page. But in the below code the hash value of first ...
0
votes
1answer
13 views

ParserError: Expected ',' but got ';' 31 | require(balance0f(from) >= value, 'balance too low';

I'm getting this error when trying to compile: ParserError: Expected ',' but got ';' --> gabicoin.sol:31:56: | 31 | require(balance0f(from) >= value, 'balance too low'; | ^ Below is the code: ...
0
votes
1answer
12 views

Undeclared Identifier Error

I am new to solidity and I have an undeclared identifier error on lines 80 and 81. Can someone please explain what I am missing. I am trying to write a smart contract for adding and deleting products ...
0
votes
0answers
17 views

generate address for wallet and create sub account

In bitcoin node we first create a wallet then generate address for it. When you check balance you see sum balance all of them because all of them are in one wallet and you can withdrawal all balance ...
0
votes
0answers
15 views

NOT RECEIVING ETHER IN CONTRACT ADDRESS [duplicate]

so i created and deployed a smart contract on testnet using remix to that receives ether and send out the equivalent amount of token determine in the contract. Each time i send ether to this contract ...
4
votes
1answer
78 views

how to deploy a smart contract on same address in ethereum and binance

I have a challenge from my client that he wants to deploy a token contract on ethereum & binance but wants to have same contract address ? He has proved to me that it is possible but has shared no ...
0
votes
0answers
9 views

extracting extra data from transaction into a smart contract

Im trying to understand how to extract the extra data field(s) from a send into a contract in solidity, i.e., the fallback function is payable and im wondering what i can do to obtain the extra data ...
0
votes
0answers
21 views

how can we return all the keys of a mapping in solidty?

I'm trying to return only the keys(all keys) of a mapping in a solidity smart contract. But I can't find any solution to this. Can someone give me solution?
1
vote
1answer
29 views

What is the pupose of TokenID increment in OpenZepplin implementation?

I am exploring OpenZepplin implementation of ERC721. One thing I found in example of Counters.sol to increment/decrement tokenId. I do get that we do not tokenId for the uniqueness in case the owner ...
0
votes
1answer
19 views

Transfer ERC20 tokens of a smart contract

I have an smart contract where people had to send some ETH using a simple transfer. Some of them transferred ERC20 tokens and not ETH. Is there a way of sending this ERC20 tokens back to it's owners? ...
0
votes
0answers
15 views

Smart Contract is Minting - Help Needed

My smart contract is minting without a mint function. My smart contract can be seen here: https://bscscan.com/address/0xacd6fd33553b8dbb7efbc8ea3a1be09fa3650787#code It's meant to have a manual burn, ...
0
votes
0answers
15 views

Query regarding encryption mechanism in solidity

can someone guide me regrading solidiry smart contracts does remix Ide or solidity use some encryption mechamism for its contract data?
0
votes
0answers
31 views

Withdraw funds from contract

I made the following withdraw function in my smart contract: function withdraw() public onlyOwner { (bool success, ) = msg.sender.call{value: address(this).balance}(""); } I call ...
1
vote
1answer
9 views

error input in remix

Error: types/values length mismatch (count={"types":3,"values":4}, value={"types":["address[]","address","uint256"],"values":[&...
0
votes
2answers
98 views

Can retire funds from a smart contract

I deploy a smart contract and I provide it with some eth. Now I want the amount I did provide. Ideas? pragma solidity ^0.5.0; // Multiplier-Finance Smart Contracts import "https://github.com/...
1
vote
1answer
45 views

If someone performed an arbitrage, is it possible to see the smart contract he executed if I know his wallet address?

For example if I look at an address like this: https://bscscan.com/tx/0xfbe65ad3eed6b28d59bf6043debf1166d3420d214020ef54f12d2e0583a66f13 I can see the transactions, but is it possible to see what ...
0
votes
2answers
79 views

Is it possible to send tokens to any smart contract address?

This is a BSC address but I noticed people are able to send tokens to a smart contract address. I thought only wallets can receive compatible tokens: https://bscscan.com/address/...
0
votes
0answers
63 views

How to retrieve multiple values returned from solidity with ether.js?

In ethers.js documentation, it is written to retrieve data like below // 'contract' is an instance of Contract made with ethers.js // Get the current value let currentValue = await contract.getValue();...
0
votes
1answer
76 views

How do I execute the withdraw function to withdraw token from smart contract?

Total newbie here. So I deployed a contract and already did the flash loan, but now I want to withdraw the remaining funds that I deposited into the smart contract (for the premium fee). How do I ...
0
votes
1answer
25 views

How to call a payable function within a payable function from the same contract?

Imagine a contract with a 2 functions: A.sol: contract A{ function buyItem() { #implementation } function buyItems() { for(#loop_conditions) { ...
0
votes
1answer
21 views

splitting contract in data and application contract

I made 2 contracts in 2 different solidity files. Lets for simplicity assume the contracts are called A and B. A contains data and some simple function calls, B contains more complex function calls. ...
0
votes
0answers
11 views

Checking if address previously sent token to adddress

I am developing a function that allows a user to mark another one as a scammer, this will be later displayed in a webapp. To do this, i need to know if the user (address) previously interacted (sent ...
0
votes
1answer
50 views

Time locked wallet contract withdraw revert

I have a time locked wallet code which withdraws the fund after some period: // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; ...
0
votes
1answer
19 views

Fictitious use case to send confidential data

I am designing the network architecture of a Fictitious agency that needs to send confidential data. So my questions are: Is it possible to send images through the Ethereum network? I've read that, ...
0
votes
1answer
19 views

Conditional Transactions in Ethereum

Is it possible to send conditional transactions in ethereum? For, e.g., Alice wants to send five ethers to bob. Alice has initiated a transaction for this transfer, but these five ethers will be ...
0
votes
0answers
83 views

ETH smart contract deposit and withdrawal functionality - multiple addresses?

I have an ERC721 smart contract with basic functionality. When the user deposits this ERC721 token, I generate for him a new eth address. For example using account_pass = random_text() Account....
0
votes
0answers
33 views

How much does it cost to send all tokens to a liquidity pool?

I'm creating a token, and will create a liquidity pool on pancakeswap with a BNB pairing. If I have 20 billion tokens, and send them all to the pool with a price of $0.0000001/token. How much would it ...
0
votes
1answer
52 views

Should I limit the amount of tokens a person can buy/sell per transaction/per 24 hours

I'm creating a token and want to solve the big whale issue of pump and dump, or just the dump problem. As such, I thought about limiting how much an address can sell per transaction or per 24 hours. ...
0
votes
0answers
7 views

Environment setup

I'm trying to configure Remix IDE on Ubuntu, pulled from https://github.com/ethereum/remix-project However every time a node file throws some error and it halts the installation. Meanwhile I'm trying ...
0
votes
1answer
25 views

Adding token image into smart contract [duplicate]

can we directly add the token logo to the token smart-contract so that we can visualize it in Wallets and Exchanges and so that we don’t have to register it in another way Please help erc20 token ...
0
votes
0answers
15 views

Smart Contract Web Access

I am currently developing a smart contract which I will be needing to retrieve a random holder address and send them tokens. I will using oracle to get randomness, but my question is how store all the ...
2
votes
1answer
22 views

Don't know how to get money out of smart wallet

Three years ago I bought some Ethereum. Little as I knew I put some of it in a smart contract. The smart contract says it has 0.21 ether. https://etherscan.io/address/...
0
votes
2answers
52 views

Bridge between Ethereum networks

I’m interested in building a bridge between Ethereum Mainnet and Ropsten testnet. The user will send USDT/ETH to the mainnet contract and will receive tokens on Ropsten(and the other way around). What ...
0
votes
0answers
60 views

smart contract payout scheme

recently I found myself working on a project that might just be perfectly suited to attach a token model to. For this to work, however, I need some knowledge on the feasibility of one of the aspects. ...
0
votes
1answer
30 views

Issue while testing a smart contract

Im getting myself into smartcontract development using solidity, I wrote the below smart contract and I have some issues with the Chai and Mocha test for the first function addCandidate() //SPDX-...
1
vote
1answer
34 views

multiple arguments giving error web3 [closed]

.addMedicalReport( patientBio.id, patientBio.name, patientBio.birthDate, patientBio.phoneNumber, patientBio._address, patientBio.MedReportId, ...
2
votes
1answer
55 views

KeyError: 'wallets'

Screenshot of directory: This is the code in my brownie.config.yaml file: reports: exclude_contracts: - SafeMath dependencies: - smartcontractkit/chainlink-brownie-contracts@1.0.2 - ...
0
votes
1answer
26 views

Is there anyway to implement Proof of stake (PoS) in Ethereum?

I am looking for a mechanism that implements Proof of stake (PoS) in ethereum. I am working on a mechanism that closely related to PoS, however, I do not find any other platforms. I was hoping that ...
1
vote
1answer
56 views

Ethereum Solidity (smart contract) blockchain implementation for selecting a node as a miner to add the block

If I use a proof-of-work (PoW) algorithm in the Ethereum blockchain, the node selects to mine a new block is totally random as per my local implementation using Go-Ethereum and inter-process ...