Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 698 Bytes

deploy-contract.md

File metadata and controls

24 lines (19 loc) · 698 Bytes

Deploy contract endpoint

Method: POST

/gateway/deploy-contract - allows to deploy contract or contract with contract source. Transaction is firstly wrapped in a data item as described in the Arweave standard ANS-104 and then uploaded to Bundlr. Finally, it is indexed in Warp gateway.

Example request:

const body = {
  contractTx,
  sourceTx,
};

await fetch(`https://gateway.warp.cc/gateway/contracts/deploy`, {
  method: 'POST',
  body: JSON.stringify(body),
  headers: {
    'Accept-Encoding': 'gzip, deflate, br',
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
});