MCPcopy Create free account
hub / github.com/0xProject/0x-examples / signTradeObject

Function signTradeObject

gasless-v2-headless-example/index.ts:152–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150
151 // Helper functions
152 async function signTradeObject(): Promise<any> {
153 const tradeSignature = await client.signTypedData({
154 types: quote.trade.eip712.types,
155 domain: quote.trade.eip712.domain,
156 message: quote.trade.eip712.message,
157 primaryType: quote.trade.eip712.primaryType,
158 });
159 console.log("🖊️ tradeSignature: ", tradeSignature);
160 return tradeSignature;
161 }
162
163 async function signApprovalObject(): Promise<any> {
164 const approvalSignature = await client.signTypedData({

Callers 2

executeTradeFunction · 0.85
executeTradeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected