The following codes is a function of contract B, how can a contract A get these values such as balance[from], balance[to], balance[msg.sender] as efficiently and directly as possible in contract B

function transferProxy (address from, address to, uint  value, uint fee) {
    if (balance[from] < fee + value)

    if (balance[to] + value < balance[to] || balance[msg.sender] + fee < balance[msg.sender])

    balance[to] += value;
    balance[msg.sender] += fee;
    balance[from] -= value + fee;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.