Questions tagged [solidity-0.7.x]

The tag has no usage guidance.

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

override keyword usecase + what it does [duplicate]

function burn(uint tokens) override external returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); _totalSupply = _totalSupply.sub(tokens); emit ...
0
votes
0answers
17 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
26 views

Transfer funds to inherited smart contracts [closed]

How would I make this work - the balanceOf[Pool, System + Cube] doesn't seem to work ;-; // SPDX-License-Identifier: GPLv2 pragma solidity ^0.7.0; import "./Pool.sol"; import "./Cube....
1
vote
1answer
26 views

TypeError: Type string calldata slice is not implicitly convertible to expected type string memory

I want to slice a string and save it to a memory or storage variable. Is this possible? function test(string calldata _input) external{ string memory something = _input[1:3]; } I am ...
1
vote
1answer
50 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
55 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....