I am working with the basic truffle
framework. The MetaCoin.sol
file which is installed automatically has the following
contract MetaCoin {
mapping (address => uint) balances;
function MetaCoin() {
balances[tx.origin] = 10000;
}...
What this accomplishes is adding 10000 MetaCoin into account 0. What I want to do is access account 1, 2, 3, perhaps to add MetaCoin or do something else. But I don't know how to do this. I can do it by explicitly including the address (e.g. balances[0x90afa53bce...]
) but this is bad because truffle addresses are not static between sessions.
I know that truffle tests starts out with all accounts in a list, but I want to access them within the contract first, and then test.