Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions libsolidity/analysis/GlobalContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ int magicVariableToID(std::string const& _name)
{"pedersenHash", -32},
{"batchvalidatesign", -33},
{"validatemultisign", -34},
{"freeze", -35},
{"unfreeze", -36},
{"freezeExpireTime", -37},
{"withdrawreward", -38},
{"vote", -39},
{"rewardBalance", -40},
Expand Down Expand Up @@ -122,9 +119,6 @@ inline std::vector<std::shared_ptr<MagicVariableDeclaration const>> constructMag
magicVarDecl("sha3", TypeProvider::function(strings{"bytes memory"}, strings{"bytes32"}, FunctionType::Kind::KECCAK256, StateMutability::Pure)),
magicVarDecl("suicide", TypeProvider::function(strings{"address payable"}, strings{}, FunctionType::Kind::Selfdestruct)),
magicVarDecl("tx", TypeProvider::magic(MagicType::Kind::Transaction)),
magicVarDecl("freeze", TypeProvider::function(strings{"uint", "uint"}, strings{"bool"}, FunctionType::Kind::Freeze, StateMutability::NonPayable)),
magicVarDecl("unfreeze", TypeProvider::function(strings{"uint"}, strings{"bool"}, FunctionType::Kind::Unfreeze, StateMutability::NonPayable)),
magicVarDecl("freezeExpireTime",TypeProvider::function(strings{"uint"}, strings{"uint"}, FunctionType::Kind::FreezeExpireTime, StateMutability::NonPayable)),
magicVarDecl("withdrawreward", TypeProvider::function(strings{}, strings{"uint"}, FunctionType::Kind::WithdrawReward)),
magicVarDecl("freezebalancev2", TypeProvider::function(strings{"uint", "uint"}, strings(), FunctionType::Kind::FreezeBalanceV2, StateMutability::NonPayable)),
magicVarDecl("unfreezebalancev2", TypeProvider::function(strings{"uint", "uint"}, strings(), FunctionType::Kind::UnfreezeBalanceV2, StateMutability::NonPayable)),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
contract C {
function f() public {
freeze(1, 1);
unfreeze(1);
freezeExpireTime(1);
}
}
// ----
// DeclarationError 7576: (47-53): Undeclared identifier.
// DeclarationError 7576: (69-77): Undeclared identifier.
// DeclarationError 7576: (90-106): Undeclared identifier.
10 changes: 10 additions & 0 deletions test/libsolidity/syntaxTests/tron/address_freeze_members.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
contract C {
function freezeFor(address payable a) public {
a.freeze(1, 1);
a.unfreeze(1);
}

function freezeExpiry(address a) public view returns (uint256) {
return a.freezeExpireTime(1);
}
}