πŸ“– Relay API

post
Deploy a Forwarder contract

https://api.rockside.io/ethereum/:network/forwarders
Deploy a forwarder contract
Request
Response
Request
Path Parameters
network
required
string
Available networks are: ropsten, mainnet
Headers
apikey
required
string
Your API Key is available on Rockside Dashboard
Body Parameters
owner
required
string
Ethereum address of the owner of the contract. Owner can modify the list of authorized senders and move the funds of the contract.
destinations
optional
array
List of authorized forward destination. If empty all destination are authorized. When forwarder deployed only owner can modify this list.
Response
200: OK
You get the address of your forwarder and the txHash and the trackingID to to follow the status of the transaction.
{
"address": "0xa83E94cA4A9D92009C1Bf6dCA54b3E34D4463138",
"transaction_hash": "0x6663a81a1a827c4bf2301eb169de900c51d2b6e4e2c26d503dce10888f8cdee9",
"tracking_id": "01E9ZSDHMYYFMW3E1CVQ9ADVHK"
}

get
List Forwarders

https://api.rockside.io/ethereum/:network/forwarders
Get the list of all your forwarders
Request
Response
Request
Path Parameters
network
required
string
Available networks are: mainnet, ropsten
Headers
apikey
required
string
Your API Key is available on Rockside Dashboard
Response
200: OK
List of your forwarders
[
"0x7Bb7703f2c601A54b484ADd52a07AFAD9C9F495e",
"0x57732F6610623D944c2150C8E394e44f37b18357"
]

post
Get relay parameters

https://api.rockside.io/ethereum/:network/forwarders/:forwarder_address/relayParams
Get the parameters required to create the relay message.
Request
Response
Request
Path Parameters
network
required
string
Available networks are: ropsten, mainnet
forwarder_address
required
string
Address of the forwarder contract
Headers
apikey
required
string
Your API Key is available on Rockside Dashboard
Body Parameters
account
required
string
The public address of the EOA that will sign the relay message.
channel_id
required
string
The channel to use to .get the nonce.
Response
200: OK
Returns the nonce and the gas price prices. You can choose a gas price and use it has gas_price_limit for "relay a transaction" route.
{
"nonce": "4",
"gas_prices": {
"fast": "81000000000",
"fastest": "98000000000",
"safelow": "57000000000",
"standard": "66000000000"
}
}

post
Relay a transaction

https://api.rockside.io/ethereum/:network/forwarders/:forwarder_address/
Relay your transaction by providing signed message, speed and gasprice limit.
Request
Response
Request
Path Parameters
network
required
string
Available networks are: ropsten, mainnet.
forwarder_address
required
string
Address of the forwarder contract
Headers
apikey
required
string
Your API Key is available on Rockside Dashboard
Body Parameters
gas_price_limit
required
string
Maximum gas price to use to relay the transaction.
speed
required
string
Speed to relay your transaction: safelow (around 30 min), average (around 5 min), fast (around 2 min), fastest (around 30 sec). Higher speed required higher gas price limit.
message
required
object
The parameters that the destination contract will receive. Object with signer, to, data and nonce.
signature
required
string
Signature of the parameters present in the message fields.
Response
200: OK
{
"transaction_hash": "0x6663a81a1a827c4bf2301eb169de900c51d2b6e4e2c26d503dce10888f8cdee9",
"tracking_id": "01E9ZSDHMYYFMW3E1CVQ9ADVHK"
}

get
Get transaction infos

https://api.rockside.io/ethereum/:network/transactions/:id
Retrieve informations about a transaction relayed.
Request
Response
Request
Path Parameters
network
required
string
Available network are: mainnet, ropsten
id
required
string
transaction_hash or tracking_id. Returned by the relay service when sending your transaction. Use the tracking ID to have the latest and automatically updated status of your transaction even in case of replays and other actions taken.
Headers
apikey
required
string
Your API Key is available on Rockside Dashboard
Response
200: OK
Returns infos for a transaction.
{
"transaction_hash": "0x2968698cb90ec9d95f8656d28bb29593029c79bcd22b42dc6b9469cb03729e2a",
"tracking_id": "01EA266P6PKN0ZY01P0Q6G7WR5",
"from": "0xdd0f36e17474e8cbf9c4e483d02a1cf34f41550a",
"to": "0x7bb7703f2c601a54b484add52a07afad9c9f495e",
"data_length": 484,
"value": 0,
"gas": 87601,
"gas_price": 19270,
"chain_id": 3,
"receipt": {
"status": 1,
"cumulative_gas_used": 6332041,
"logs": [],
"transaction_hash": "0x2968698cb90ec9d95f8656d28bb29593029c79bcd22b42dc6b9469cb03729e2a",
"contract_address": "0x0000000000000000000000000000000000000000",
"gas_used": 86687,
"block_hash": "0xd21a10cc344cb84faaab6725de8dedf51ae8deaacba62c6e0a570dc2578481f2",
"block_number": 8035552,
"transaction_index": 8
},
"status": "success",
}