Last active
March 29, 2024 16:12
-
-
Save 0xTranqui/3a00d776f4065db0c77106685f941d24 to your computer and use it in GitHub Desktop.
syndicate config ideas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SyndicateClient } from '@syndicateio/syndicate-node' | |
export const syndicate = new SyndicateClient({ | |
token: () => { | |
const apiKey = process.env.SYNDICATE_API_KEY | |
if (typeof apiKey === 'undefined') { | |
throw new Error( | |
'SYNDICATE_API_KEY is not defined in environment variables.', | |
) | |
} | |
return apiKey | |
}, | |
}) | |
const syndicateProjectId = process.env.SYNDICATE_PROJECT_ID_POSTGATEWAY | |
const syndicatePostTxnObject = { | |
projectId: syndicateProjectId, | |
contractAddress: addresses.postGateway.nova, | |
chainId: 42170, // replace with arb nova constant from viem? | |
functionSignature: | |
'post((address signer, (uint256 rid, uint256 timestamp, uint8 msgType, bytes msgBody) message, uint16 hashType, bytes32 hash, uint16 sigType, bytes sig) post)', | |
args: { | |
post: // fill in here with value, | |
}, | |
} | |
const syndicatePostBatchTxnObject = { | |
projectId: syndicateProjectId, | |
contractAddress: addresses.postGateway.nova, | |
chainId: // replace with arb nova constant from viem?, | |
functionSignature: | |
'postBatch((address signer, (uint256 rid, uint256 timestamp, uint8 msgType, bytes msgBody) message, uint16 hashType, bytes32 hash, uint16 sigType, bytes sig)[] posts)', | |
args: { | |
posts: // fill in here with value, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment