contract-new-lines.fmt.sol 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // config: contract_new_lines = true
  2. contract ContractDefinition is
  3. Contract1,
  4. Contract2,
  5. Contract3,
  6. Contract4,
  7. Contract5
  8. {}
  9. // comment 7
  10. contract SampleContract {
  11. // spaced comment 1
  12. // spaced comment 2
  13. // that spans multiple lines
  14. // comment 8
  15. constructor() { /* comment 9 */ } // comment 10
  16. // comment 11
  17. function max( /* comment 13 */
  18. uint256 arg1,
  19. uint256 /* comment 14 */ arg2,
  20. uint256 /* comment 15 */
  21. )
  22. // comment 16
  23. external /* comment 17 */
  24. pure
  25. returns (uint256)
  26. // comment 18
  27. {
  28. // comment 19
  29. return arg1 > arg2 ? arg1 : arg2;
  30. }
  31. }
  32. // comment 20
  33. contract /* comment 21 */ ExampleContract is /* comment 22 */ SampleContract {}
  34. contract ERC20DecimalsMock is ERC20 {
  35. uint8 private immutable _decimals;
  36. constructor(string memory name_, string memory symbol_, uint8 decimals_)
  37. ERC20(name_, symbol_)
  38. {
  39. _decimals = decimals_;
  40. }
  41. }