function_call_external.sol 449 B

12345678910111213141516
  1. contract foo {
  2. function bar1(uint32 x, bool y) public returns (address, bytes32) {
  3. return (address(3), hex"01020304");
  4. }
  5. function bar2(uint32 x, bool y) public returns (bool) {
  6. return !y;
  7. }
  8. }
  9. contract bar {
  10. function test(address f) public {
  11. (address f1, bytes32 f2) = foo.bar1{program_id: f, accounts: []}(102, false);
  12. bool f3 = foo.bar2{program_id: f, accounts: []}({x: 255, y: true});
  13. }
  14. }