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

Problem: cannot call external contract #225

Open
leejw51crypto opened this issue Sep 12, 2022 · 2 comments
Open

Problem: cannot call external contract #225

leejw51crypto opened this issue Sep 12, 2022 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@leejw51crypto
Copy link
Collaborator

add calling external contract function through abi

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Sep 12, 2022

example

string chain = "ethereum";
string network = "rinkeby";
string method = "myTotal";
string abi = "[ { \"inputs\": [ { \"internalType\": \"uint8\", \"name\": \"_myArg\", \"type\": \"uint8\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]";
string contract = "0x....";
string args = "[]";
string response = await EVM.Call(chain, network, contract, abi, method, args);
print(response);

@bg6621
Copy link

bg6621 commented Jan 22, 2023

The inputs is hard to understand all the way yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants