Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing JsonRpcProvider to StaticJsonRpcProvider #26

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?

.prettierignore
2 changes: 1 addition & 1 deletion src/components/ui/MimTokenBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
},

async initContract() {
const defaultProvider = new providers.JsonRpcProvider(
const defaultProvider = new providers.StaticJsonRpcProvider(
"https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
);

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/glpApr/contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {
GmxGlpWrapperAddress,
} = require("./constants");

const provider = new providers.JsonRpcProvider(rpc);
const provider = new providers.StaticJsonRpcProvider(rpc);

module.exports.getGlpManagerContract = () =>
new Contract(glpManagerAddress, GlpManager.abi, provider);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/stargateFarmApy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Percent, CurrencyAmount, Token } = require("@uniswap/sdk");
import lpStakingAbi from "@/utils/abi/StargateLPStaking";
import poolAbi from "@/utils/abi/StargatePool";

const provider = new providers.JsonRpcProvider(url);
const provider = new providers.StaticJsonRpcProvider(url);
const YEAR = 31536000;

const stgToken = new Token(1, "0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6", 18);
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/farmPools.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
});
}

return new this.$ethers.providers.JsonRpcProvider(networkRpc);
return new this.$ethers.providers.StaticJsonRpcProvider(networkRpc);
},
},
methods: {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/connectWallet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const subscribeProvider = async (provider, isCoinbase) => {

const initWithoutConnect = async () => {
const chainId = +(localStorage.getItem("MAGIC_MONEY_CHAIN_ID") || 1);
const provider = new ethers.providers.JsonRpcProvider(
const provider = new ethers.providers.StaticJsonRpcProvider(
walletconnect.options.rpc[chainId]
);

Expand All @@ -98,7 +98,7 @@ const initWithoutConnect = async () => {
};

const checkSanctionAddress = async (address) => {
const provider = new ethers.providers.JsonRpcProvider(
const provider = new ethers.providers.StaticJsonRpcProvider(
"https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
);

Expand Down