Skip to content

Latest commit

 

History

History
executable file
·
56 lines (34 loc) · 831 Bytes

File metadata and controls

executable file
·
56 lines (34 loc) · 831 Bytes

Asteroid Style Guide

Currently, there is no definite or enforced style guide when writing Asteroid code.

However, there are some generally preferred conventions:

  • Opening braces should be on the same line as the declaration

Asteroid Functions Styling

Functions should begin with a lower-case letter.

func add(a, b, c int) int {
    return a + b + c
}

Asteroid Events Styling

Events should begin with an upper-case letter.

event Add(a, b, c int)

Asteroid Classes Styling

Classes should begin with an upper-case letter.

class OrderBook {

}

Asteroid Interfaces Styling

Interfaces should begin with an upper-case letter.

interface OrderBook {

}

Asteroid Contracts Styling

Contracts should begin with an upper-case letter.

contract OrderBook {

}