added

[2023-06-22][V2] Added referrer to v2 orders

📘

INFORMATION

The property referrer will be added to the orders returned by the GET v2/orders and GET v2/events endpoints. It will return the signer's referrer and rate if present.

What's changing?

Following the release of the LooksRare affiliate system, we'll be adding the property referrer to the orders returned by both the GET v2/orders and GET v2/events endpoints.

The referrer object is comprised of the address and rate fields.

The address field represents the Ethereum address of the referrer, and the rate field signifies the commission rate of the referrer in basis points, as shown below:

// Example order object

{
	"referrer": {
		"address": "0x0000000000000000000000000000000000000000",
		"rate": 10000 // The rate is in basis points
	},
	... // The other order properties
}

When the signer does not have a referrer, the referrer property will be set to null.

What should I do?

This change affects how you execute LooksRare orders.

When executing the order, you should include the referrer's address.

The recommended way is to use the @looksrare/sdk-aggregator which takes care of organising the transaction based on the referrer in the most optimal way.

You can find more details about the LooksRare Aggregator SDK here:

Otherwise, without the aggregator, you'll also need to arrange the orders based on the referrer.

The LooksRare v2 SDK accepts the referrer's address in both the executeOrder and executeMultipleOrders functions, as shown below:

executeOrder(maker: Maker, taker: Taker, signature: string, merkleTree: MerkleTree = defaultMerkleTree, affiliate: string, overrides?: Overrides)

The smart contracts functions executeTakerBid, executeTakerAsk and executeMultipleTakerBids all include the parameter affiliate.

You'll need to include the referrer's address as the fifth parameter:

executeTakerBid(takerBid, makerAsk, makerSignature, merkleTree, affiliate)

Support

If you have any questions or encounter any issues, you can contact us via our Devs Discord.