caller_is_root.sol 271 B

1234567891011121314
  1. import "polkadot";
  2. contract CallerIsRoot {
  3. uint public balance;
  4. function covert() public payable {
  5. if (caller_is_root()) {
  6. balance = 0xdeadbeef;
  7. } else {
  8. print("burn more gas");
  9. balance = 1;
  10. }
  11. }
  12. }