Smart Contract Interface

We believe that you are the best advocate of your smart contracts, that's why we have developed a generic interface layer that enables us to support integration at scale. All Antic needs from you is to expose the relevant meta transactions so that our contract will be able to fulfill once consensus is reached.

🚧

Security first!

As we will be sending requests to your server from our server we are expecting you to provide us with a key with which we will authenticate.
All server to server requests will then make use of the Authorization header to pass the created JWT token.

For fully integrated Antic Groups capabilities we expect the following endpoints to be available on your servers

Receiving meta transaction for buying an asset

//optional payload that can contain any data type and a hash that represents the payload. 
//we can POST back the payload once the transaction succeeds on the BC (see details below). 
async getBuyTransaction(input: {
  tokenAddress: string;
  tokenId: string;
  daoAddress: string;
  priceInWie: string;
}): Promise<{ tx: PopulatedTransaction; hash?: string; payload: any }> {
      <YOUR IMPLEMENTATION GOES HERE>
}

Receiving meta transaction for listing an asset for sale

//optional payload that can contain any data type and a hash that represents the payload. 
//we can POST back the payload once the transaction succeeds on the BC (see details below). 
async getListForSellTransaction(input: {
  tokenAddress: string;
  tokenId: string;
  daoAddress: string;
  priceInWie: string;
}): Promise<{ tx: PopulatedTransaction; hash?: string; payload: any }> {
      <YOUR IMPLEMENTATION GOES HERE>
}

Receiving meta transaction for cancelling a listing

//optional payload that can contain any data type and a hash that represents the payload. 
//we can POST back the payload once the transaction succeeds on the BC (see details below). 
async getCancelSellTransaction(input: {
  tokenAddress: string;
  tokenId: string;
  daoAddress: string;
  priceInWie: string;
}): Promise<{ tx: PopulatedTransaction; hash?: string; payload: any }> {
      <YOUR IMPLEMENTATION GOES HERE>
}

Receiving the contract address (operator) that we need to approve with setApprovalForAll (as the operator)

async getOperatorAddressToApprove(input: {
  tokenAddress?: string; 
  tokenId?: string; 
  daoAddress?: string;
}): Promise<string> {
      <YOUR IMPLEMENTATION GOES HERE>
}

Is asset still available for sale

//identification param is the 'order/listing id' for a specific buying if one exists
async getOperatorAddressToApprove(input: {
    tokenAddress: string; 
    tokenId: string; 
  price: string; 
  identification?: string;
}): Promise<bool> {
      <YOUR IMPLEMENTATION GOES HERE>
}

To support post backs for successful Blockchain transaction, the following endpoints should be implemented

Buy transaction complete

async postBuyExecuted(body: {
  nftAddress: string;
  tokenId: string;
  daoAddress: string;
  payload?: any;
}): Promise<bool> {
      <YOUR IMPLEMENTATION GOES HERE>
}

List for sale transaction complete

async postListedForSellExecuted(body: {
  nftAddress: string;
  tokenId: string;
  daoAddress: string;
  payload?: any;
}): Promise<bool> {
      <YOUR IMPLEMENTATION GOES HERE>
}

Cancel listing transaction complete

async postCancelListedForSaleExecuted(body: {
  nftAddress: string;
  tokenId: string;
  daoAddress: string;
  payload?: any;
}): Promise<bool> {
      <YOUR IMPLEMENTATION GOES HERE>
}

👍

Talk to us!

Our product evolves and improves as you build on top of it, iterating quickly to help support new use cases and constantly optimizing for value. To do so effectively, we want your feedback. Any feedback is welcomed - good, bad, or neutral.
You can share your input via email at [email protected]

For tech questions, clarifications or god forbid issues, please utilize the Discussions tab