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

Sync SDK with AVS API to v1.3.0 #66

Merged
merged 8 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sync protobuf, update test salt
  • Loading branch information
v9n committed Feb 1, 2025
commit 580631bc47bee621b7906ef184822286844ba56f
8 changes: 6 additions & 2 deletions grpc_codegen/avs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ message ContractWriteNode {
string contract_address = 1;
string call_data = 2;

// abi is necessary to decode the return
// The ABI is only required to decode the return value of a method call.
// If we don’t need the result and only want the transaction hash (which is usually sufficient),
// then we don’t need to provide the ABI.
string contract_abi = 3;
string method = 4;
chrisli30 marked this conversation as resolved.
Show resolved Hide resolved
}
Expand All @@ -133,7 +135,9 @@ message ContractReadNode {
string contract_address = 1;
string call_data = 2;

// abi and method name is necessary to decode the return
// The ABI and method name are required to decode the return value and pass it to the next step.
// Currently, we need to provide the contract ABI as a JSON string.
// We don’t need to include the full ABI—just enough to decode the method call.
string contract_abi = 3;
string method = 4;
}
Expand Down
1 change: 1 addition & 0 deletions packages/sdk-js/src/models/node/contractWrite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ContractWriteNode extends Node {
);
nodeData.setCallData((this.data as ContractWriteNodeData).callData);
nodeData.setContractAbi((this.data as ContractWriteNodeData).contractAbi);
nodeData.setMethod((this.data as ContractWriteNodeData).method);

request.setContractWrite(nodeData);

Expand Down
2 changes: 1 addition & 1 deletion tests/getWallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe("getAddresses Tests", () => {
client.setFactoryAddress(FACTORY_ADDRESS);
expect(client.getFactoryAddress()).toEqual(FACTORY_ADDRESS);

const salt = parseInt(process.env.RUN_ID || Math.floor(Math.random() * 100000));
const salt = process.env.RUN_ID || `${new Date().getTime()}`;
let wallet = await client.getWallet({ salt });

const initialStat = {
Expand Down
Loading