You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
I was interested in this issue as it sounds like (but may not be) related to a new issue I recently opened #827 (comment).
I was able to fix it, it seems it was related with the solidity version I was using on my smart contracts.
With this config on the top of the smart contract everything seems fine.
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
Hello, I have this basic contracts in solidity but when i try to create a contract from another contract I have this 'Runtime Error: revert'
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.0 <0.9.0;
contract User {
string public name;
constructor(string memory _name) public payable {
name = _name;
}
function getUserName() public view returns(string memory _name) {
return name;
}
}
contract Users {
User[] public users;
User public user;
function create(string memory _name) public {
User user = new User(_name);
}
function getUsers() public view returns (User[] memory _users) {
return users;
}
function getUser() public view returns (User _user) {
return user;
}
}
The text was updated successfully, but these errors were encountered: