Documentation ¶
Index ¶
- func CheckMinTerminalWidth() error
- func GetBytecodeToValidate(bytecode string, level string, filename string, levelsDir string, lang string) (string, string, error)
- func GetSolves(levels map[string]Level) map[string]string
- func IsValidEthereumAddress(address string) bool
- func LoadLevels() (map[string]Level, error)
- func ParseOutput(output string) (int, int, error)
- func RunTest(levelsDir string, testContract string, verbose bool) ([]byte, error)
- func WriteConfig(config Config) error
- type Config
- type Level
- type SubmissionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMinTerminalWidth ¶ added in v0.4.5
func CheckMinTerminalWidth() error
func GetBytecodeToValidate ¶
func GetBytecodeToValidate(bytecode string, level string, filename string, levelsDir string, lang string) (string, string, error)
compiles the solution file and returns the bytecode + solution type (e.g. sol, yul, vyper, huff)
func IsValidEthereumAddress ¶ added in v0.4.5
func LoadLevels ¶
func ParseOutput ¶
parseOutput function to parse gas and size values of output from forge test
func WriteConfig ¶
Types ¶
type Config ¶
type Config struct { EVMR_VERSION string `mapstructure:"EVMR_VERSION"` EVMR_SERVER string `mapstructure:"EVMR_SERVER"` EVMR_TOKEN string `mapstructure:"EVMR_TOKEN"` EVMR_ID string `mapstructure:"EVMR_ID"` EVMR_NAME string `mapstructure:"EVMR_NAME"` EVMR_LEVELS_DIR string `mapstructure:"EVMR_LEVELS_DIR"` }
func LoadConfig ¶
type SubmissionData ¶
type SubmissionData struct { Id string `json:"id"` LevelId int `json:"level_id"` UserId int `json:"user_id"` Gas string `json:"gas"` Size string `json:"size"` SubmittedAt string `json:"submitted_at"` Type string `json:"type"` OptimizedFor string `json:"optimized_for"` Username string `json:"user_name"` LevelName string `json:"level_name"` }
func FetchSubmissionData ¶
func FetchSubmissionData(config Config) ([]SubmissionData, error)
fetchSubmissionData function to fetch existing submission data
Click to show internal directories.
Click to hide internal directories.