Questions tagged [solidity-0.7.x]

The tag has no usage guidance.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
32 views

Making function calls exclusive per block

I have the requirement that in my smart contract certain functions cannot be called, if another function already has been called inside the same contract during the same transaction. Imagine I have ...
1
vote
1answer
262 views

Using inherited constructor in Solidity >=0.5.0

I want to use a contract inherit from another contract and use the parent constructor after using another commands in inherited constructor. So I wrote: pragma solidity ^0.5.10; contract A { ...
0
votes
1answer
11 views

How do you interface with a lower version of solidity

I'm trying to create a contract (solidity version 0.7.6) that interacts with some arbitrary contract of a lower version (0.4.21). However, I have been trying to declare an interface in (0.7.6) but it ...
0
votes
0answers
4 views

parsing error in smartcontract constructor

parsing error in smartcontract constructor, can some one please help me out and show me what I am doing wring and why this error is even thought everytrhing is looking fine from outside.
0
votes
0answers
8 views

Create Contracts from a Contract and Push it to an Array (Solidity 0.7.0 or higher)?

So basically, I'm using Remix and I have two contracts AuctionManager and BlindedAuction/Auction The auction manager will run first and it holds an array of addresses, whenever a beneficiary creates ...
0
votes
1answer
96 views

How to send an amount of ether from the smart contract to an address and save any information along with the transaction (in the TX DATA) (solidity)

I need to send a certain quality of ether from the smart contract to an address, but the problem is that I need that along with that transaction I need information to be recorded in the blockchain for ...
0
votes
0answers
33 views

How to use OpenZepplin hooks to cancel transfer if condition is not met?

I am experimenting with OpenZepplin Hooks to modify ERC20 transfer functions in this way contract IToken is ERC20 { .... function _beforeTokenTransfer(address from, address to, uint256 amount) ...
0
votes
0answers
11 views

Verify result of gas expensive view calculation in transaction

I'm have an expensive view function which calculates rewards over time and investment. When it comes to withdrawing rewards I would need to run this, which could overrun gas for the block. Is there a ...
0
votes
0answers
20 views

Issuing 1-1 eth for token problem

pragma solidity 0.6.6; // import "./XYZToken.sol"; contract Vault { mapping(address => uint256) balanceOf; mapping(address => bool) hasDepositedEther; mapping(...
0
votes
1answer
103 views

"out of gas" when trying to send back ETH from a contract to tx.origin

(UPDATED) The contract should have more than enough ETH. I deploy the contract with 0.1 ETH: https://git.io/JUBdy const consumerExample = await ConsumerExampleFactory.deploy(process.env....
0
votes
1answer
177 views

does the gasleft function return the total gas left for the transaction or the gas left for the function call

If a function is using the gasleft() function and is called by another smart contract, does it return the total gas left for the transaction or just the gas left passed to the function via the message ...