Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update por-address-list to query API #3551

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Update por-address-list to query API #3551

merged 3 commits into from
Nov 13, 2024

Conversation

mxiao-cll
Copy link
Contributor

@mxiao-cll mxiao-cll commented Nov 8, 2024

Closes #DF-20747

Description

Update por-address-list EA to support query address from API endpoints. We start with two implementation Solv and Bedrock

Changes

  1. Add two new endpoints in por-address-list to read address from API
  2. Add a new param to por to select endpoint from protocol EA

Steps to Test

{
    "data": {
        "result": [
            {
                "address": "1LaC3Xt8RZWYH1pjcvXxrWxLvXe7iR3ybe",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1patpjgd37q68kmt4zd5u3ajp7t95r785t5e0wkh4e20kwnducv5rqpvzat0",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pjyxkkt2ufregr92cu0ccuje8efez68wzf347hlf5ym02ah8nqlhslg8lwz",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1ph5jl0sm97wcdp5k3ctpcrl7sy3hmt7e6gs2tr35qq8pnfpqn2ejqqhh6ur",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p0tsy45wav45req0ltwlca56m2wss9dd26g3wpdjujwmhtk0q79dq7d8fhp",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p7dafndyllnsqtthxhp76gzjwujzeelzc2qt8haua7ds8cmqgvhkqtr00ya",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pmjcg79u2quppamjtekfns5pqmdlpd0gqlwvksq9tzrua0f3vq7hsdmfcs9",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p4su5lzpaxz7rc9z6tv8u4pfstpxaw7hagdrlrq8p2z3uvd8p8thsddye9w",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "3FRaevESEjvvrE9q5GdmuAvjsGUy8sCfS4",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qwmw0j0nwe2r8rl8cgecf9pqhgqkpzs0zcfcraz",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1phhfsdcts2lqkc44ver6v24460x5kx5dpg364elxd8jzfjpg5q4yqt8saty",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1paew2r3hqqnwhatttwx3qe3f837vvhwx7jhv228py9u3t7s22ltmqenjdym",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qma2epmz00c7kutshs0h7m8rra8ceekht87amu7",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p93qry6vdxutmtnqk0n48hs9au54xha6ywr9a8fryy2a3ctqcn0hqt5s0cv",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qdrhewkdyy44xf80n79wmls3pyg07lrg3syhmze",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1phql7l5rrfqn9egmppjtlvyw0evav853q5uzlzcq8rdp5sp0dwjzq9x57pn",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pc8t32hxvlnnv0lyuqhfqy9mfmaxtl66e495rqw4rmp7y4q60kkcs2wt2pq",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pxfwnyqng7c622te5m5ayjsz6lrsxjl542wyw99h2p5e60zmeknqq49g0fm",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p6mu8mrtnfz0frdfghfxr05tr8dq6j0q65rpzhhgg7998zelfp74qxxejh9",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qkj4yxrlsear0hujkf3pq5zc4r8mnz3ep8udftj",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "3KKdHVw5TFrPLqM9q8znpjxCyYpzZhErFH",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qj9w5ee2kf4akvtzrj59p77yc6x02nqqg9m0tcd",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "38fLZKJQuNMAEmFXTbbpkTo6fD5su2fD9P",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p8jpunkzxpued6d4k4n8the7trn3m53vjphxwwaxls58kg3gyracqwetwzl",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "3Pg6HJJPhm3X7eWrdHbPFQeHU723a9GSJ7",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qwgnhe6vn5zzu7csukavhfatzdasvmkavktqe4udzx96dk602ghsqaz8vt6",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qf2lqvumkq2l2d3qej7u6w9u84djfnmy7kfcqdulfpcm7zqxl330smc0mkj",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qyzsetzfrwzxs7zzqtsmyaz39mumhrh58mu04kyjcy8pynn9zhk5q2dc2r3",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p8275ypqm7z4pyzhrvs6ashfgz5fuchtet8lqpl3xaecgyy07rrgq3jmvrx",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pyfmtputwx7uvug972jp5r658da90m4dl4sgx506znnw3ezushuzqwz5u8a",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pvkr32l23vr0e9uv0ylkwn8fkt8whkl2h620yeh08x25fd5msw7usdmdv4f",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pwhy84kvvxzfyrlwkyyzapf2ztkwpfj7yv0y6al7pg9kwht7undhsj3ww9p",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pjwjx9ygltd4ehp8rlwxlep803e0w9gtz8hxx6ekjpvetay3yytsqhfm7d4",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1psjmpuxzryfxh863xlhk8hxvfdrywj0v6uqfxd0w5xxaa9sx0hjhqkx8qff",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pu4hcya6n2qrpr773qdxjrsz0wk8epyl0eyc98g97qdp2n0f0z7cqtq6hnk",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pzlhnwcyytvmzl5kmp4usxwt9jhw7u2c2w4u5gej5ef4y0uznv5ps84c4vv",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p45penescv68n8aeh4z2gpktls7cvgttgstx96myws4rxx9xhgjxqzf6srh",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pyc5v468mmltf503uhhdumxmadq3s0ykj5q5cyhj8a54k8sq5ze2su4vdy4",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pyax28jhft0lzzwz9fj5cm5mehxpffa6efmddexch04tup7d23arqpcqm2x",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p59yh7hz8v7rcrktd095xtt9kcjfgdalv54vxwmdpms057pesgntqqkfg67",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1purqv24xky3l7yf2gf48lsd3et7yc2gw38fj3laflf4g0fdm8xelq4u95fh",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1pwtr406pv8l6ean6hu6rzhwknd86u2hwszum9zqtvn8cls8h59keqjua0m3",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1puacezgtudwq587zp9ffkgugxrw7a405yrf586s8nvg53x3hsg6zs67eafn",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1p94j8r24zm409k8wgqylh0z9p66mwuwgk5nkz9525mug7kda40hcqc0qdmc",
                "network": "bitcoin",
                "chainId": "mainnet"
            }
        ]
    },
    "statusCode": 200,
    "result": null,
    "timestamps": {
        "providerDataRequestedUnixMs": 1731351101111,
        "providerDataReceivedUnixMs": 1731351102181
    },
    "meta": {
        "adapterName": "POR_ADDRESS_LIST",
        "metrics": {
            "feedId": "{\"confirmations\":0,\"contractAddressNetwork\":\"\",\"batchSize\":10,\"apiClient\":\"bedrock unibtc\"}"
        }
    }
}
{
    "data": {
        "result": [
            {
                "address": "bc1pjrxeuc9f3zqtx92s3mnf6202894jzufswur957l6s04rjns6dumsyh6u89",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1qdpwl80flfh3k6h6sumzwgws3ephkrmx307hk64",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "1Ayme2p4PDQiE3CEv665aPjEGbVRxUHF54",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "36LMbBpvUHNsG1tfteuEXmpdMK4Q8Rh8n1",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "3MgmZFbfsXaX9w24zrGedHkMkrzoaZruGE",
                "network": "bitcoin",
                "chainId": "mainnet"
            },
            {
                "address": "bc1quyzu5xj0m4nczlfa0njzfgf8z0t7spsfz28ly5cn6v8w8mk4ra5s07ypfr",
                "network": "bitcoin",
                "chainId": "mainnet"
            }
        ]
    },
    "statusCode": 200,
    "result": null,
    "timestamps": {
        "providerDataRequestedUnixMs": 1731351145588,
        "providerDataReceivedUnixMs": 1731351145925,
        "providerIndicatedTimeUnixMs": 1729837717580
    },
    "meta": {
        "adapterName": "POR_ADDRESS_LIST",
        "metrics": {
            "feedId": "{\"confirmations\":0,\"contractAddressNetwork\":\"\",\"batchSize\":10,\"apiClient\":\"solvbtc\"}"
        }
    }
}

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file or update the soak testing blacklist.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: b24560a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@chainlink/proof-of-reserves-adapter Minor
@chainlink/por-address-list-adapter Minor
@chainlink/renvm-address-set-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mxiao-cll mxiao-cll merged commit c7b5a90 into main Nov 13, 2024
7 of 8 checks passed
@mxiao-cll mxiao-cll deleted the por branch November 13, 2024 13:37
@github-actions github-actions bot mentioned this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants