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 anchor_lang::prelude::*; | |
use anchor_lang::solana_program; | |
use anchor_lang::solana_program::instruction::Instruction; | |
use anchor_lang::solana_program::pubkey; | |
use anchor_lang::solana_program::system_instruction; | |
use anchor_spl::token::{CloseAccount, Mint, Token, TokenAccount, Transfer}; | |
use solana_program::sysvar::fees::Fees; | |
use spl_token::{self}; | |
use stake_manager::GlobalState as GlobalStakeState; |
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
const Matic = require("maticjs").default; | |
const config = require("./config"); | |
// Create object of Matic | |
const matic = new Matic({ | |
maticProvider: config.MATIC_PROVIDER, | |
parentProvider: config.PARENT_PROVIDER, | |
rootChainAddress: config.ROOTCHAIN_ADDRESS, | |
syncerUrl: config.SYNCER_URL, | |
watcherUrl: config.WATCHER_URL, |
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
// main net <=> alpha net | |
module.exports = { | |
MATIC_PROVIDER: "https://alpha.ethereum.matic.network", | |
PARENT_PROVIDER: | |
"https://mainnet.infura.io/v3/70645f042c3a409599c60f96f6dd9fbc", | |
ROOTCHAIN_ADDRESS: "0x2aa012a32db4297b6c1ec06b81e498154b4e8d46", // Ethereum main net address | |
WITHDRAWMANAGER_ADDRESS: "0x592ca027cde761ed1c1d4b5f6a169b4e64881cca", // Ethereum main net address | |
DEPOSITMANAGER_ADDRESS: "0x0bdb53216625f71d17bf94999d31257751e5cbc9", // Ethereum main net address | |
SYNCER_URL: "https://alpha.matic.mainnet.api.matic.network/api/v1", | |
WATCHER_URL: "https://alpha.ethereum.watcher.matic.network/api/v1", |