sophia/test/contracts/upfront_charges.aes
2018-12-22 01:23:40 +01:00

7 lines
323 B
Plaintext

contract UpfrontCharges =
record state = { b : int } // For enabling retrieval of sender balance observed inside init.
public function init() : state = { b = b() }
public function initialSenderBalance() : int = state.b
public function senderBalance() : int = b()
private function b() = Chain.balance(Call.origin)