The "Update Configured Gas Limit" API endpoint provided by Krypcore allows users to update the configured gas limit for a specific contract under a given instance.
Update Configured Gas Limit under the given instance.
200: OK SUCCESS 401: Unauthorized Failure in authentication
Copy {
"data": {
"__v": 0,
"_id": "65116d2bc7636a4aaxxxxx",
"chainId": 80001,
"contractAddress": "0x0E762313219aE4dD7C674367a39901Ac1cxxxxx",
"contractName": "Test-contract",
"contractStatus": "ACTIVE",
"createdAt": "2023-09-25T11:21:15.828Z",
"gasLimitConfigured": 500000000000000000,
"gasUsed": 401420,
"linkedDAppId": "DEV_TT-1_XENO_231_xxxxxxxx",
"linkedDAppName": "TT-1",
"network": "polygon-mumbai",
"numberOfTransactions": 3,
"serviceInstance": "INS_SM_175_xxxxxxx",
"subscriptionId": "2991xxxxxx",
"updatedAt": "2023-12-26T10:05:24.757Z",
"userId": "DEV_XENO_92_xxxxxxxx"
},
"message": "Gas limit configured updated successfully",
"status": true
}
Copy {
"message": "Invalid API key in request"
}
Take a look at how you might call this method using our official libraries, or via curl
curl Node.js (Fetch) Python Golang
Copy curl --location 'https://api.krypcore.com/api/v0/gasless/updateGasLimitConfigured' \
--header 'Authorization: 81d4a427-xxxx-xxxx-xxxx-f8482816e872' \
--header 'Content-Type: application/json' \
--data '{
"gasLimitConfigured": 0.5,
"contractAddress": "0x0E762313219aE4dD7C674367a39901Ac1cxxxxxx",
"dAppId": "DEV_TT-1_XENO_231_xxxxxxx",
"chainId": 80001
}'
Copy var myHeaders = new Headers();
myHeaders.append("Authorization", "81d4a427-xxxx-xxxx-xxxx-f8482816e872");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"gasLimitConfigured": 0.5,
"contractAddress": "0x0E762313219aE4dD7C674367a39901Ac1cxxxxxx",
"dAppId": "DEV_TT-1_XENO_231_xxxxxxx",
"chainId": 80001
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.krypcore.com/api/v0/gasless/updateGasLimitConfigured", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Copy import requests
import json
url = "https://api.krypcore.com/api/v0/gasless/updateGasLimitConfigured"
payload = json.dumps({
"gasLimitConfigured": 0.5,
"contractAddress": "0x0E762313219aE4dD7C674367a39901Ac1cxxxxxx",
"dAppId": "DEV_TT-1_XENO_231_xxxxxxx",
"chainId": 80001
})
headers = {
'Authorization': '81d4a427-xxxx-xxxx-xxxx-f8482816e872',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Copy package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.krypcore.com/api/v0/gasless/updateGasLimitConfigured"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"gasLimitConfigured": 0.5,`+"
"+`
"contractAddress": "0x0E762313219aE4dD7C674367a39901Ac1cxxxxxx",`+"
"+`
"dAppId": "DEV_TT-1_XENO_231_xxxxxxx",`+"
"+`
"chainId": 80001`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "81d4a427-xxxx-xxxx-xxxx-f8482816e872")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))