Skip to content

Instantly share code, notes, and snippets.

@zoernert
Created December 29, 2021 11:54
Show Gist options
  • Save zoernert/2566bbde081eb910d49b7ebc931ff6f3 to your computer and use it in GitHub Desktop.
Save zoernert/2566bbde081eb910d49b7ebc931ff6f3 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.11+commit.d7f03943.js&optimize=true&runs=200&gist=
pragma solidity ^0.8.0;
import "./espledger.sol";
contract espaccounting {
mapping (address => espledger) public ledgers;
function transfer(address from,address to, uint256 value) public returns (bool success) {
espledger ledger = ledgers[msg.sender];
if(address(ledger) == address(0)) {
ledger = new espledger(msg.sender);
ledgers[msg.sender] =ledger;
}
return ledger.transfer(from,to,value);
//return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment