This file contains 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
pragma solidity ^0.4.11; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal constant returns (uint256) { | |
uint256 c = a * b; |
This file contains 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
class HTTP: | |
Create = 0 | |
List = 1 | |
Retrieve = 2 | |
Update = 3 | |
Delete = 4 | |
class App: | |
def __init__(self, **kwargs): |
This file contains 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
pragma solidity ^0.5.0; | |
// Multiplier-Finance Smart Contracts - this is bullshit | |
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPoolAddressesProvider.sol"; | |
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPool.sol"; | |
// PancakeSwap Smart Contracts - this is bullshit | |
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakeCallee.sol"; | |
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakeFactory.sol"; | |
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakePair.sol"; |
This file contains 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 bs58; | |
#[inline] | |
pub fn convert_string_to_accountid(account_str: &str) -> AccountId { | |
let mut output = vec![0xFF; 35]; | |
bs58::decode(account_str).onto(&mut output).unwrap(); | |
let cut_address_vec: Vec<_> = output.drain(1..33).collect(); | |
let mut array = [0; 32]; | |
let bytes = &cut_address_vec[..array.len()]; | |
array.copy_from_slice(bytes); |
This file contains 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
pragma solidity 0.8.21; | |
library InputOutput { | |
function _finalize( | |
Context memory _context, // - input argument | |
uint64[4] memory _output_ // - input argument and also output of the function | |
) internal view { | |
// tx.members | |
uint256 now_ = block.timestamp; // local var |