-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.js
More file actions
62 lines (50 loc) · 1.7 KB
/
hardhat.config.js
File metadata and controls
62 lines (50 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require("@nomicfoundation/hardhat-ethers");
const { HyperliquidSDK } = require("@ambitlabs/hyperliquid-sdk");
const { ethers } = require("ethers");
const dotenv = require("dotenv");
// .env.nft dosyasından çevre değişkenlerini yükle
dotenv.config({ path: '.env.nft' });
const privateKey = process.env.PRIVATE_KEY || '';
/**
npx hardhat changeBigBlocks --network hyperliquid_mainnet
*/
task("changeBigBlocks", "Changes usingBigBlocks value of your account")
.setAction(async (taskArgs) => {
const provider = new ethers.JsonRpcProvider("https://api.hyperliquid.xyz/evm", 999, {
staticNetwork: true,
batchMaxCount: 1,
});
const wallet = new ethers.Wallet(privateKey, provider);
console.log('Address: '+wallet.address)
const sdk = new HyperliquidSDK("mainnet", { signer: wallet, signatureChainId: 999 });
// Doğru metod adını bulalım
console.log('SDK metotları:');
for (const method in sdk) {
if (typeof sdk[method] === 'function') {
console.log(` - ${method}`);
}
}
// Daha sonra bu bölümü doğru metod adıyla güncelleyeceğiz
try {
// await sdk.evmUserModify(true);
console.log('Metodu bulduktan sonra bu satırı güncelleyeceğiz.');
} catch (error) {
console.error('Hata:', error.message);
}
});
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.20",
networks: {
hyperliquid_testnet: {
chainId: 998,
url: `https://api.hyperliquid-testnet.xyz/evm`,
accounts: [privateKey],
},
hyperliquid_mainnet: {
chainId: 999,
url: `https://api.hyperliquid.xyz/evm`,
accounts: [privateKey],
},
},
};