@gelatonetwork/relay-sdk
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -19,2 +19,3 @@ "use strict"; | ||
const constants_1 = __importDefault(require("../utils/constants")); | ||
const { RELAY_URL } = constants_1.default; | ||
const sendRelayTransaction = (chainId, dest, data, token, relayerFee) => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -24,3 +25,3 @@ const params = { dest, data, token, relayerFee }; | ||
try { | ||
const res = yield axios_1.default.post(`${constants_1.default}/relays/${chainId}`, params); | ||
const res = yield axios_1.default.post(`${RELAY_URL}/relays/${chainId}`, params); | ||
output = res.data; | ||
@@ -43,3 +44,3 @@ } | ||
try { | ||
const res = yield axios_1.default.get(`${constants_1.default}/relays/`); | ||
const res = yield axios_1.default.get(`${RELAY_URL}/relays/`); | ||
result = res.data.relays; | ||
@@ -62,3 +63,3 @@ } | ||
try { | ||
const res = yield axios_1.default.get(`${constants_1.default}/oracles/${chainId}/estimate`, { | ||
const res = yield axios_1.default.get(`${RELAY_URL}/oracles/${chainId}/estimate`, { | ||
params, | ||
@@ -85,3 +86,3 @@ }); | ||
try { | ||
const res = yield axios_1.default.get(`${constants_1.default}/oracles/`); | ||
const res = yield axios_1.default.get(`${RELAY_URL}/oracles/`); | ||
result = res.data.oracles; | ||
@@ -97,3 +98,3 @@ } | ||
try { | ||
const res = yield axios_1.default.get(`${constants_1.default}/oracles/${chainId}/paymentTokens/`); | ||
const res = yield axios_1.default.get(`${RELAY_URL}/oracles/${chainId}/paymentTokens/`); | ||
result = res.data.paymentTokens; | ||
@@ -100,0 +101,0 @@ } |
{ | ||
"name": "@gelatonetwork/relay-sdk", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "SDK to integrate the Gelato Multichain Relay", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -59,3 +59,5 @@ # Gelato Multichain Relay SDK | ||
4. Submit transaction | ||
4. Submit transaction: | ||
If you want to submit a transaction using the Gelato Multichain Relayer, the transaction should pay to the Gelato contract | ||
to execute, otherwise the transaction will revert. | ||
```typescript | ||
@@ -71,6 +73,5 @@ import { BigNumber } from "ethers"; | ||
chainId, | ||
destAddress, // The contract address that should be whitelisted in the Relay | ||
destAddress, | ||
data, | ||
paymentTokenAddress, | ||
estimatedExecutionFeeInToken.toHexString() // Not used yet | ||
); | ||
@@ -94,2 +95,18 @@ console.log(`RelayerTransactionId = ${relayTx.taskId}`); | ||
AVALANCHE: 43114 | ||
``` | ||
``` | ||
## Gelato Contract Addresses | ||
| Chain | Contract Address | | ||
|--- |--- | | ||
| MAINNET | 0x3CACa7b48D0573D793d3b0279b5F0029180E83b6 | | ||
| ROPSTEN | 0xCc4CcD69D31F9FfDBD3BFfDe49c6aA886DaB98d9 | | ||
| RINKEBY | 0x0630d1b8C2df3F0a68Df578D02075027a6397173 | | ||
| GOERLI | 0x683913B3A32ada4F8100458A3E1675425BdAa7DF | | ||
| OPTIMISM | 0x01051113D81D7d6DA508462F2ad6d7fD96cF42Ef | | ||
| BSC | 0x7C5c4Af1618220C090A6863175de47afb20fa9Df | | ||
| XDAI | 0x29b6603D17B9D8f021EcB8845B6FD06E1Adf89DE | | ||
| MATIC | 0x7598e84B2E114AB62CAB288CE5f7d5f6bad35BbA | | ||
| FANTOM | 0xebA27A2301975FF5BF7864b99F55A4f7A457ED10 | | ||
| MOONBEAM | 0x91f2A140cA47DdF438B9c583b7E71987525019bB | | ||
| ARBITRUM | 0x7C5c4Af1618220C090A6863175de47afb20fa9Df | | ||
| AVALANCHE | 0x7C5c4Af1618220C090A6863175de47afb20fa9Df | |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17988
282
109
1