MCPcopy Create free account
hub / github.com/argotorg/solidity / nativeMembers

Method nativeMembers

libsolidity/ast/Types.cpp:554–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552}
553
554MemberList::MemberMap AddressType::nativeMembers(ASTNode const*) const
555{
556 MemberList::MemberMap members = {
557 {"balance", TypeProvider::uint256()},
558 {"code", TypeProvider::array(DataLocation::Memory)},
559 {"codehash", TypeProvider::fixedBytes(32)},
560 {"call", TypeProvider::function(strings{"bytes memory"}, strings{"bool", "bytes memory"}, FunctionType::Kind::BareCall, StateMutability::Payable)},
561 {"callcode", TypeProvider::function(strings{"bytes memory"}, strings{"bool", "bytes memory"}, FunctionType::Kind::BareCallCode, StateMutability::Payable)},
562 {"delegatecall", TypeProvider::function(strings{"bytes memory"}, strings{"bool", "bytes memory"}, FunctionType::Kind::BareDelegateCall, StateMutability::NonPayable)},
563 {"staticcall", TypeProvider::function(strings{"bytes memory"}, strings{"bool", "bytes memory"}, FunctionType::Kind::BareStaticCall, StateMutability::View)}
564 };
565 if (m_stateMutability == StateMutability::Payable)
566 {
567 members.emplace_back(MemberList::Member{"send", TypeProvider::function(strings{"uint"}, strings{"bool"}, FunctionType::Kind::Send, StateMutability::NonPayable)});
568 members.emplace_back(MemberList::Member{"transfer", TypeProvider::function(strings{"uint"}, strings(), FunctionType::Kind::Transfer, StateMutability::NonPayable)});
569 }
570 return members;
571}
572
573namespace
574{

Calls 15

functionFunction · 0.85
isStringFunction · 0.85
addressClass · 0.85
isLibraryMethod · 0.80
interfaceFunctionsMethod · 0.80
declarationMethod · 0.80
derivesFromMethod · 0.80
scopeMethod · 0.80
isAnonymousMethod · 0.80
isSuperMethod · 0.80

Tested by

no test coverage detected