Skip to content

Instantly share code, notes, and snippets.

View ptsayli's full-sized avatar

Sayli Patil ptsayli

View GitHub Profile
@ptsayli
ptsayli / send-poly-usdc-to-arb-dai.ts
Last active February 23, 2024 15:40
Send USDC on Polygon chain to DAI on Arbitrum chain
import { Path, Socket } from "@socket.tech/socket-v2-sdk";
import { ethers } from "ethers";
const PRIVATE_KEY = '<Paste your Private key here>'
const wallet = new ethers.Wallet(PRIVATE_KEY)
const socket = new Socket({
apiKey: "72a5b4b0-e727-48be-8aa1-5da9d62fe635",
});
@ptsayli
ptsayli / test-rlp.go
Created July 23, 2020 09:21
test rlp-encoding
package main
import (
"encoding/hex"
"fmt"
"github.com/maticnetwork/bor/rlp"
hmTypes "github.com/maticnetwork/heimdall/types"
)
func main() {
const WebSocket = require('ws')
const ws = new WebSocket('wss://ws-mumbai.matic.today/')
ws.on('open', function open() {
ws.send('{"id": 1, "method": "eth_subscribe", "params": ["newDeposits", {}]}')
})
ws.on('message', function incoming(data) {
console.log(data)
@ptsayli
ptsayli / settings.json
Created December 11, 2019 11:46
vscode settings
{
"workbench.colorTheme": "Atom One Dark",
"editor.fontFamily": "FiraCode-Medium",
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.scrollBeyondLastLine": false,
"editor.tabSize": 2,
"prettier-eslint.eslintIntegration": true,
"prettier.jsxSingleQuote": true,
"prettier.semi": false,
@ptsayli
ptsayli / test.js
Created November 27, 2019 13:28
Test eth_signTypedData
import signUtil from "eth-sig-util"
const getLoginTypedData = ({ address, timestamp, primaryType }) => ({
types: {
EIP712Domain: [
{ name: 'name', type: 'string' },
{ name: 'host', type: 'string' },
{ name: 'version', type: 'string' },
],
WebLogin: [