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

add reichain multicall #75

Merged
merged 1 commit into from
Sep 16, 2022
Merged

Conversation

dtmkeng
Copy link
Contributor

@dtmkeng dtmkeng commented Sep 13, 2022

test

import { multiCall } from "./abi";
(async () => {
  const vaults = ["0x64271453023b421D2c4CAd01e2Fa17605ea40D5d", "0x781f058c951fc10F0e15d5679F691A6c55237c89"];
  const a = await multiCall({
    abi: {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    calls: vaults.map((i) => ({ target: i})),
    chain: 'reichain'
  });
  console.log(a)
})();

result

{
  output: [
    {
      input: [Object],
      success: true,
      output: '768700687137013901940518'
    },
    {
      input: [Object],
      success: true,
      output: '750000000000000000000000000'
    }
  ]
}

@0xngmi 0xngmi merged commit ac36ebc into DefiLlama:master Sep 16, 2022
@0xngmi
Copy link
Member

0xngmi commented Sep 16, 2022

@realdealshaman can you push a new sdk version?

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.

None yet

2 participants