Are there any easy methods to browse the state of existing contracts?

JeffreyBPetersenJeffreyBPetersen Santa Cruz, CaliforniaMember Posts: 5
For example, see the current contents of a mapping?

I'm trying to figure out how difficult it would be to refer to the given contract for use outside of the Ethereum network. As well as extrapolate values such as join date (and member number by extension) without explicitly writing them into the contract.

/// @title Open Membership
/// @author Jeffrey B. Petersen
contract OpenMembership {

struct Member {
bool isMember;
mapping (address => bool) endorsees;
}

mapping (address => Member) members;

/// @notice Openly declare yourself a member.
function join(){
members[msg.sender].isMember = true;
}

/// @notice Revoke your membership declaration.
function leave(){
members[msg.sender].isMember = false;
}

/// @notice Endorse someone else's membership.
/// @param endorsee The address of the member to be endorsed.
function endorse(address endorsee){
members[msg.sender].endorsees[endorsee] = true;
}

/// @notice Revoke your endorsement of someone else's membership.
/// @param endorsee The address of the member to be unendorsed.
function unendorse(address endorsee){
members[msg.sender].endorsees[endorsee] = false;
}
}

Comments

Sign In or Register to comment.