Skip to content

Instantly share code, notes, and snippets.

View ss-sonic's full-sized avatar
🏠
Working from home

Shubham Singh ss-sonic

🏠
Working from home
View GitHub Profile
exitTrade = async ({ sourceExitLimitPrice, circuitBreaker }) => {
this.log.debug(`Placing Exit order on Source at ${sourceExitLimitPrice} ${sourceExitLimitPrice}`)
let options = { timeInForce: "FOK" }
if (!circuitBreaker) {
options["price"] = sourceExitLimitPrice
options["premimumMargin"] = this.premimumMargin
options["quantityFraction"] = this.currentStackCount
}
if (this.executionType === "MARKET") {
delete options.price
check if Web3 is available to react app
window.ethereum
check if locked
check which network it is in by chain id - [80001, 80001, 80001, 80001]
web3.getAccount()
Four chain
Four staking contract for each chain
Each staking contract will have 3 pool
They will take a staking token and give a reward token
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.16;
interface IERC20 {
function balanceOf(address user) external returns(uint256);
function transfer(address to, uint256 value) external returns (bool);
}
contract Rescue {
address public owner = address(0x899BfBA3FbD79B80D35e9Fb4dd594eFD8d76f283);
@ss-sonic
ss-sonic / codex_resume.sh
Last active September 6, 2025 15:47
codex_resume
codex_resume() {
emulate -L zsh
setopt localoptions extendedglob noshwordsplit
unsetopt xtrace verbose 2>/dev/null || true
set +x +v
local want_last=0 list_any=0 refresh=0 limit=200 target_dir="" sep=$'\t'
local -a passthru
while (( $# > 0 )); do