|
| 1 | +// |
| 2 | +// The methods here are defined with sample parameters. They are meant to be used on the mainnet and might not work on other networks. |
| 3 | +// Also, some of the parameters might stop working at some point. More refinement is needed to make them more robust. |
| 4 | +// |
| 5 | + |
| 6 | +export const filecoinChainHead = { |
| 7 | + name: "Filecoin.ChainHead", |
| 8 | + params: [], |
| 9 | +}; |
| 10 | + |
| 11 | +export const filecoinStateMinerPower = { |
| 12 | + name: "Filecoin.StateMinerPower", |
| 13 | + params: ["t01000", []], |
| 14 | +}; |
| 15 | + |
| 16 | +export const filecoinStateMinerInfo = { |
| 17 | + name: "Filecoin.StateMinerInfo", |
| 18 | + params: ["t01000", []], |
| 19 | +}; |
| 20 | + |
| 21 | +export const filecoinStateMarketStorageDeal = { |
| 22 | + name: "Filecoin.StateMarketStorageDeal", |
| 23 | + params: [109704581, []], |
| 24 | +}; |
| 25 | + |
| 26 | +export const ethChainId = { |
| 27 | + name: "eth_chainId", |
| 28 | + params: [], |
| 29 | +}; |
| 30 | + |
| 31 | +export const ethCall = { |
| 32 | + name: "eth_call", |
| 33 | + params: [ |
| 34 | + { |
| 35 | + data: "0xf8b2cb4f000000000000000000000000cbff24ded1ce6b53712078759233ac8f91ea71b6", |
| 36 | + from: null, |
| 37 | + gas: "0x0", |
| 38 | + gasPrice: "0x0", |
| 39 | + to: "0x0c1d86d34e469770339b53613f3a2343accd62cb", |
| 40 | + value: "0x0", |
| 41 | + }, |
| 42 | + "latest", |
| 43 | + ], |
| 44 | +}; |
| 45 | + |
| 46 | +export const ethGasPrice = { |
| 47 | + name: "eth_gasPrice", |
| 48 | + params: [], |
| 49 | +}; |
| 50 | + |
| 51 | +export const ethGetBalance = { |
| 52 | + name: "eth_getBalance", |
| 53 | + params: ["0x6743938A48fC8799A5608EF079C53f3cF3B84398", "latest"], |
| 54 | +}; |
| 55 | + |
| 56 | +// |
| 57 | +// Groupings of methods. Either arbitrary or based on data shared by RPC providers. |
| 58 | +// |
| 59 | + |
| 60 | +// All methods we have implemented in test scripts so far. |
| 61 | +export const allMethods = [ |
| 62 | + filecoinChainHead, |
| 63 | + filecoinStateMinerPower, |
| 64 | + filecoinStateMinerInfo, |
| 65 | + filecoinStateMarketStorageDeal, |
| 66 | + ethChainId, |
| 67 | + ethCall, |
| 68 | + ethGasPrice, |
| 69 | + ethGetBalance, |
| 70 | +]; |
| 71 | + |
| 72 | +// The top 5 methods according to Hubert's metal die roll. |
| 73 | +export const top5Methods = [ |
| 74 | + filecoinChainHead, |
| 75 | + ethCall, |
| 76 | + ethChainId, |
| 77 | + ethGetBalance, |
| 78 | + // should be `ChainNotify`, but it's a subscription method, so it's tricky to test |
| 79 | + filecoinStateMinerPower, |
| 80 | +]; |
0 commit comments