Issue | Instances | |
---|---|---|
[GAS-1] | Use != 0 instead of > 0 for unsigned integer comparison | 5 |
[GAS-2] | Don't initialize variables with default value | 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// takes a numeraire amount, calculates the raw amount of eurs, transfers it in and returns the corresponding raw amount | |
function intakeNumeraire(int128 _amount) | |
external | |
override | |
returns (uint256 amount_) | |
{ | |
uint256 _rate = getRate(); | |
amount_ = (_amount.mulu(10**tokenDecimals) * 10**oracleDecimals) / _rate; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs; | |
fn sort_desc<T: Ord>(v: &mut Vec<T>) { | |
v.sort_by(|a, b| b.cmp(a)); | |
} | |
/// # Advent Of Code 2022 (Day 1). | |
/// | |
/// Challenge is you an input which displays "calories of elves" ([link](https://adventofcode.com/2022/day/1)): | |
/// |
OlderNewer