Skip to content

Instantly share code, notes, and snippets.

View sivo4kin's full-sized avatar

Bogdan Sivochkin sivo4kin

View GitHub Profile
@sivo4kin
sivo4kin / OrphanedWallet-8224.sol
Last active February 8, 2024 16:27
smart contract account draft
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;
import "./interfaces/IAccount.sol";
import "./interfaces/IPaymaster.sol";
import "./interfaces/IWallet.sol";
import "./interfaces/UserOperation.sol";
import "../common/NonReentrant.sol";
import { SnarkProof } from "../common/Types.sol";
import "../protocol/errMsgs/OrphanedWalletErrMsgs.sol";
@sivo4kin
sivo4kin / PantherPaymaster.sol
Last active January 9, 2024 16:21
PaymasterDraft
// SPDX-Licenyse-Identifier: GPL-3.0
pragma solidity ^0.8.12;
/* solhint-disable no-inline-assembly */
import "@account-abstraction/contracts/core/BasePaymaster.sol";
import "../common/Types.sol";
import "../protocol/interfaces/IPantherPoolV1.sol";
import "./interfaces/IWallet.sol";
import "./interfaces/IWETH9.sol";
@sivo4kin
sivo4kin / metatransaction-msgsender-tests-error.txt
Created February 17, 2023 15:11
metatransaction-msgsender-tests-error
594 passing (1m)
9 pending
2 failing
1) PantherPoolV0 and Vault Integration
Test GenerateDeposits & Exit
GenerateDeposits -> Exit - Integration test
Async ... calls:
Error: VM Exception while processing transaction: reverted with reason string 'TransferHelper: token contract call failed'
@sivo4kin
sivo4kin / biconomy-test.txt
Created January 25, 2023 09:01
"@biconomy/mexa": "^3.0.5", error
package.json
"@biconomy/mexa": "^3.0.5",
init Biconomy
export async function biconomyProvider(): Promise<Biconomy> {
const provider = ethers.getDefaultProvider("MUMBAI_RPC_URL")
const biconomy = new Biconomy(provider as ExternalProvider, {
contractAddresses: [StakingAddressMumbai],
@sivo4kin
sivo4kin / git-rebase-steps
Created October 11, 2022 14:23
git rebase steps to fix conficts on merge
git checkout develop
git pull
git checkout your/branch
git rebase develop
// fix conflicts
git add just edited files
git rebase --continue
git push --force-with-lease
@sivo4kin
sivo4kin / POS-slashing-techniques.txt
Created May 19, 2022 13:36
research on POS slashing
eth 2.0 specs
https://github.com/goerli/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#proposer-slashings
beacon chain
https://github.com/goerli/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#attester-slashings
honest validator
https://github.com/goerli/eth2.0-specs/blob/dev/specs/phase0/validator.md#proposer-slashings
EIP 3076 Validator client interchange format (slashing protection)
@sivo4kin
sivo4kin / secp256k1-parameters.txt
Created July 11, 2021 05:26
Recommended Parameters secp256k1 due to http://www.secg.org/sec2-v2.pdf
2.4.1
Recommended Parameters secp256k1
The elliptic curve domain parameters over F p associated with a Koblitz curve secp256k1 are
specified by the sextuple T = (p, a, b, G, n, h) where the finite field F p is defined by:
p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE
FFFFFC2F
= 2 256 − 2 32 − 2 9 − 2 8 − 2 7 − 2 6 − 2 4 − 1
The curve E: y 2 = x 3 + ax + b over F p is defined by:
a = 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
@sivo4kin
sivo4kin / linux-screen-window-tabs.txt
Last active June 17, 2021 09:02
linux screen window tabs
CTRL A + :
caption always "%{= kw}%-w%{= gW}%n %t%{-}%+w %-= bigdatums.net - %Y-%m-%d %C:%s"
@sivo4kin
sivo4kin / parse_austria.php
Created March 21, 2019 02:57 — forked from geek-at/parse_austria.php
Parsing ip data from a file
<?php
$infile = 'austria.csv';
$outfile = 'austria.ips';
$fp = fopen($outfile,'w');
$handle = fopen($infile, "r");
if ($handle)
{
while (($line = fgets($handle)) !== false) {
$line = trim($line);
@sivo4kin
sivo4kin / sap_hf_workshop
Last active November 16, 2018 06:57
sap blockchain workshop
https://github.com/sapcis/blockchain-workshop-chaincode
https://github.com/sapcis/blockchain-workshop-oracle
https://github.com/sapcis/blockchain-workshop-ui5
https://drive.google.com/file/d/1mwx-69S74lg7_pueopmRdrTaGyvQRKwy/view?usp=sharing
https://drive.google.com/file/d/1NNo8tHcI75zMCfgxat0Xy1P3ueG4S7KW/view?usp=sharing