{"id":21574761,"url":"https://github.com/ja88a/chainlink-eth-secretnetwork","last_synced_at":"2025-08-20T16:04:14.764Z","repository":{"id":53189643,"uuid":"352183403","full_name":"ja88a/Chainlink-eth-SecretNetwork","owner":"ja88a","description":"Relay Chainlink oracles data on Ethereum into Secret Network contracts - Chainlink Spring 21 hackathon project","archived":false,"fork":false,"pushed_at":"2022-09-26T14:24:25.000Z","size":2160,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T18:47:43.071Z","etag":null,"topics":["chainlink","contracts","cosmwasm","ethereum","ethersjs","off-chain","on-chain","oracle","secret-network"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ja88a.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-27T21:43:31.000Z","updated_at":"2023-08-26T01:31:58.000Z","dependencies_parsed_at":"2023-01-18T22:16:04.331Z","dependency_job_id":null,"html_url":"https://github.com/ja88a/Chainlink-eth-SecretNetwork","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ja88a/Chainlink-eth-SecretNetwork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ja88a%2FChainlink-eth-SecretNetwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ja88a%2FChainlink-eth-SecretNetwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ja88a%2FChainlink-eth-SecretNetwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ja88a%2FChainlink-eth-SecretNetwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ja88a","download_url":"https://codeload.github.com/ja88a/Chainlink-eth-SecretNetwork/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ja88a%2FChainlink-eth-SecretNetwork/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268617308,"owners_count":24279230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chainlink","contracts","cosmwasm","ethereum","ethersjs","off-chain","on-chain","oracle","secret-network"],"created_at":"2024-11-24T12:11:03.930Z","updated_at":"2025-08-03T21:34:06.812Z","avatar_url":"https://github.com/ja88a.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chainlink Oracles Data Bridge to Secret Network\n\n## General\nThis mono repo contains the source of services and contracts development projects for relaying [Chainlink oracle](https://data.chain.link) contracts' data towards [Secret Network](https://scrt.network) contracts. \n\nThe overall solution and thoughts are reported in this project [wiki](https://github.com/ja88a/Chainlink-eth-SecretNetwork/wiki).\n\nThe project was initiated and developped in the context of the Chainlink Spring 2021 Hackathon. The initial proof-of-concept submission made on 2021-04-11 is available in devpost.com [here](https://devpost.com/software/chainlink-oracles-bridge-to-secret-network).\n\nSome of the key tools / tech this project benefits from:\n- [NestJS](https://nestjs.com) Best TypeScript app server development option\n- [Ethers.js](https://github.com/ethers-io/ethers.js) Ethereum network client SDK in TypeScript\n- [Secret Network](https://github.com/enigmampc/SecretNetwork) toolkits, reference docs and sample apps\n- [CosmWasm](https://github.com/CosmWasm/cosmwasm) excellent Cosmos toolkits and reference documentation\n- [RustUp](https://rustup.rs) full featured Rust toolchain manager, with Cargo \u0026 rustc\n- [Chainlink](https://chain.link) tools, vision and their off-chain / on-chain integration design\n- [Kafka](https://kafka.apache.org/) as the distributed event streaming platform among the main services\n\n## Status\nThis dev project has been put aside, considering mostly that the BandProtocol is a good \u0026 existing option for Secret contracts to integrate data/price feeds.\n\nThe interest of this code repository is mostly on the ETH \u0026 SN SDKs integration, and moreover the solution for independant MS operators to collaborate through Kakfka: to distribute the tasks/workloads and reach a consensus to apply changes on chain.\n\n## Tech Requirements\n\n- Yarn to build \u0026 run the modules\n- Lerna in order to develop against local versions of packages\n- Kafka for the services to interact\n- Docker for running the services locally containerized, and fully optimizing the Secret contracts\n- Cargo and corresponding Rust toolkit for the Secret oracle contract development\n- GNU Make to benefit from build scripts\n \nEach module should define its own dependencies and provide minimum guidance. Still there are many different frameworks and technics used in order the full end-to-end solution.\n\n## Play\n### Setup\n\n```bash\nlerna bootstrap\n```\n\nInstalls packages for all workspaces. Except for the Secret oracle contracts' dev projects. \n\n## Build\n\n```bash\nlerna run build\n```\n\nRuns the setup step for all modules. Typically this step just compiles TypeScript, but may involve other tasks.\n\n## Test\n\nIn order to test modules locally, you may need to set environment variables for the given API.\n\n```bash\nlerna run test\n```\n\n## Docker\n\nTo build a Docker container for a specific `$module`, use the following example:\n\n```bash\nmake docker module=moduleName\n```\n\nThe naming convention for Docker containers will be `$moduleName-module`.\n\nThen run it with:\n\n```bash\ndocker run -p 8080:8080 -e API_KEY='YOUR_API_KEY' -it moduleName-module:latest\n```\n\n## Serverless\n\nCreate the zip:\n\n```bash\nmake zip module=moduleName\n```\n\nThe zip will be created as `./$moduleName/dist/$moduleName-module.zip`.\n\n### Install to AWS Lambda\n\n- In Lambda Functions, create function\n- On the Create function page:\n  - Give the function a name\n  - Use Node.js 12.x for the runtime\n  - Choose an existing role or create a new one\n  - Click Create Function\n- Under Function code, select \"Upload a .zip file\" from the Code entry type drop-down\n- Click Upload and select the `$moduleName-module.zip` file\n- Handler:\n  - index.handler (same as index.awsHandlerREST) for REST API Gateways (AWS Lambda default)\n  - index.awsHandlerREST for REST API Gateways\n  - index.awsHandlerHTTP for HTTP API Gateways\n- Add the environment variable (repeat for all environment variables):\n  - Key: API_KEY\n  - Value: Your_API_key\n- Save\n\nBy default, Lambda functions time out after 3 seconds. You may want to change that to 60s in case an API takes longer than expected to respond.\n\n#### To Set Up an API Gateway (HTTP API)\n\nIf using a HTTP API Gateway, Lambda's built-in Test will fail, but you will be able to externally call the function successfully.\n\n- Click Add Trigger\n- Select API Gateway in Trigger configuration\n- Under API, click Create an API\n- Choose HTTP API\n- Select the security for the API\n- Click Add\n\n#### To Set Up an API Gateway (REST API)\n\nIf using a REST API Gateway, you will need to disable the Lambda proxy integration for Lambda-based adapter to function.\n\n- Click Add Trigger\n- Select API Gateway in Trigger configuration\n- Under API, click Create an API\n- Choose REST API\n- Select the security for the API\n- Click Add\n- Click the API Gateway trigger\n- Click the name of the trigger (this is a link, a new window opens)\n- Click Integration Request\n- Uncheck Use Lamba Proxy integration\n- Click OK on the two dialogs\n- Click the Mapping Templates dropdown\n- Check \"When there are no templates defined (recommended)\"\n- Add new Content-Type `application/json`\n- Use Mapping Template: \n```\n#set($input.path(\"$\").queryStringParameters = $input.params().querystring)\n$input.json('$')\n```\n- Click Save\n- Return to your function\n- Remove the API Gateway and Save\n- Click Add Trigger and use the same API Gateway\n- Select the deployment stage and security\n- Click Add\n\n### Install to GCP\n\n- In Functions, create a new function, choose to ZIP upload\n- Select Node.js 12 for the Runtime\n- Click Browse and select the `$moduleName-module.zip` file\n- Select a Storage Bucket to keep the zip in\n- Function to execute: gcpHandler\n- Click More, Add variable (repeat for all environment variables)\n  - NAME: API_KEY\n  - VALUE: Your_API_key\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fja88a%2Fchainlink-eth-secretnetwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fja88a%2Fchainlink-eth-secretnetwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fja88a%2Fchainlink-eth-secretnetwork/lists"}