Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Make some left methods read-only (#233)
Browse files Browse the repository at this point in the history
* fix: make some left methods read-only

* fix: change rpc url

* fix: change node url to rpc v1
  • Loading branch information
emmanuelm41 authored Feb 17, 2023
1 parent 7c6a757 commit 13766b4
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions contracts/v0.8/MinerAPI.sol
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ library MinerAPI {
function getBeneficiary(bytes memory target) internal returns (MinerTypes.GetBeneficiaryReturn memory) {
bytes memory raw_request = new bytes(0);

bytes memory raw_response = Actor.call(MinerTypes.GetBeneficiaryMethodNum, target, raw_request, Misc.NONE_CODEC, 0, false);
bytes memory raw_response = Actor.call(MinerTypes.GetBeneficiaryMethodNum, target, raw_request, Misc.NONE_CODEC, 0, true);

bytes memory result = Actor.readRespData(raw_response);

Expand All @@ -236,7 +236,7 @@ library MinerAPI {
function getBeneficiary(uint64 target) internal returns (MinerTypes.GetBeneficiaryReturn memory) {
bytes memory raw_request = new bytes(0);

bytes memory raw_response = Actor.callByID(target, MinerTypes.GetBeneficiaryMethodNum, Misc.NONE_CODEC, raw_request, 0, false);
bytes memory raw_response = Actor.callByID(target, MinerTypes.GetBeneficiaryMethodNum, Misc.NONE_CODEC, raw_request, 0, true);

bytes memory result = Actor.readRespData(raw_response);

Expand Down
11 changes: 9 additions & 2 deletions contracts/v0.8/VerifRegAPI.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ library VerifRegAPI {
function getClaims(VerifRegTypes.GetClaimsParams memory params) internal returns (VerifRegTypes.GetClaimsReturn memory) {
bytes memory raw_request = params.serializeGetClaimsParams();

bytes memory raw_response = Actor.call(VerifRegTypes.GetClaimsMethodNum, VerifRegTypes.ActorID, raw_request, Misc.DAG_CBOR_CODEC, 0, false);
bytes memory raw_response = Actor.call(VerifRegTypes.GetClaimsMethodNum, VerifRegTypes.ActorID, raw_request, Misc.DAG_CBOR_CODEC, 0, true);

bytes memory result = Actor.readRespData(raw_response);

Expand All @@ -53,7 +53,14 @@ library VerifRegAPI {
) internal returns (VerifRegTypes.RemoveExpiredAllocationsReturn memory) {
bytes memory raw_request = params.serializeRemoveExpiredAllocationsParams();

bytes memory raw_response = Actor.call(VerifRegTypes.RemoveExpiredAllocationsMethodNum, VerifRegTypes.ActorID, raw_request, Misc.DAG_CBOR_CODEC, 0, false);
bytes memory raw_response = Actor.call(
VerifRegTypes.RemoveExpiredAllocationsMethodNum,
VerifRegTypes.ActorID,
raw_request,
Misc.DAG_CBOR_CODEC,
0,
false
);

bytes memory result = Actor.readRespData(raw_response);

Expand Down
2 changes: 1 addition & 1 deletion docs/deploy-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ After a few seconds, you will end up on the following page. Please, click on "Ad
Now it is time to fill each text box with the corresponding value. Once you finish typing in the values, hit "Save".

- Name: Filecoin Hypersapce
- RPC URL: https://api.zondax.ch/fil/node/hyperspace/rpc/v0
- RPC URL: https://api.zondax.ch/fil/node/hyperspace/rpc/v1
- ChainID: 3141 (Hyperspace's ID)
- Currency symbol: TFIL (Test FIL).

Expand Down
2 changes: 1 addition & 1 deletion hardhat/deploy/market.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function hexToBytes(hex) {
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/deploy/miner.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function hexToBytes(hex) {
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/deploy/power.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function hexToBytes(hex) {
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/deploy/simple_coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function hexToBytes(hex) {
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/deploy/verifReg.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function hexToBytes(hex) {
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
defaultNetwork: "hyperspace",
networks: {
hyperspace: {
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
accounts: [PRIVATE_KEY],
},
},
Expand Down
2 changes: 1 addition & 1 deletion hardhat/tasks/get-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ task("get-address", "Gets Filecoin f4 address and corresponding Ethereum address
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/tasks/market-api/withdraw-balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ task("withdraw_balance", "")
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/tasks/miner-api/change-beneficiary.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ task("change-beneficiary", "")
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion hardhat/tasks/simple-coin/send-coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ task("send-coin", "Sends SimpleCoin")
async function callRpc(method, params) {
var options = {
method: "POST",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v0",
url: "https://api.zondax.ch/fil/node/hyperspace/rpc/v1",
// url: "http://localhost:1234/rpc/v0",
headers: {
"Content-Type": "application/json",
Expand Down

0 comments on commit 13766b4

Please sign in to comment.