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

[New Tool: Build a Flow SDK] - Milestone 1 #117

Closed
wants to merge 1 commit into from

Conversation

Evan-Dapplica
Copy link

[New Tool: Build a Flow SDK] - Milestone 1

Description

This PR is for issue #20.

This version of the C++ SDK provides gRPC communication and a number of the SDK user stories, including script execution.

Usage documentation is available at https://github.com/Evan-Dapplica/FlowCppSDK

Features:

Blocks:

  • retrieve a block by ID
  • retrieve a block by height
  • retrieve the latest block

Collections:

  • retrieve a collection by ID

Events:

  • retrieve events by name in the block height range

Scripts:

  • submit a script and parse the response
  • submit a script with arguments and parse the response

Accounts:

  • retrieve an account by address
  • create a new account
  • deploy a new contract to the account
  • remove a contract from the account
  • update an existing contract on the account

Transactions:

  • retrieve a transaction by ID
  • sign a transaction (single payer, proposer, authorizer or combination of multiple)
  • submit a signed transaction
  • sign a transaction with arguments and submit it

Milestones

  • 1: Implement the gRPC layer of the SDK, allowing communication with the Flow blockchain
  • 2: Accomplish transaction signing in a way that handles the complex algorithm / hashing / encoding for the user.
  • 3: Meet and exceed Flow SDK guidelines
  • 4: Complete documentation and common usage examples are available

@Evan-Dapplica Evan-Dapplica changed the title Add Flow C++ SDK [New Tool: Build a Flow SDK] - Milestone 1 Oct 31, 2021
@kerrywei
Copy link

kerrywei commented Nov 1, 2021

Hi @Evan-Dapplica , thank you for the submission. In the linked repo, it does not seem to have all the functionalities listed in milestone 1. do you plan to finish them?

@Evan-Dapplica
Copy link
Author

Hi @kerrywei ! Thank you for the review. Could you please list the missing functionalities so we can double check and consider adding them?

@kerrywei
Copy link

kerrywei commented Nov 3, 2021

@Evan-Dapplica
Apologies for getting back to you bit late. Here's some feedback/questions:

  1. we built a new documentation template at https://github.com/onflow/sdks which aims to make writing README file easier -- SDK builds just need to insert working examples under each section given the template should cover the explanation of many things already. would recommend to use this template for the README file (and suggestions highly welcome!)

  2. Run into the following error:
    `% cmake ../..
    -- The C compiler identification is AppleClang 13.0.0.13000029
    -- The CXX compiler identification is AppleClang 13.0.0.13000029
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at CMakeLists.txt:12 (find_package):
    Could not find a package configuration file provided by "Protobuf" with any
    of the following names:

    ProtobufConfig.cmake
    protobuf-config.cmake

Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
"Protobuf_DIR" to a directory containing one of the above files. If
"Protobuf" provides a separate development package or SDK, be sure it has
been installed.`

Full error log:
`Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc
Build flags:
Id flags:

The output was:
1
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Library/Developer/CommandLineTools/usr/bin/c++
Build flags:
Id flags:

The output was:
1
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)`
Any suggestions on how I can proceed?

@kerrywei
Copy link

kerrywei commented Nov 4, 2021

Hello @Evan-Dapplica , any thoughts on the comment above?

@Evan-Dapplica
Copy link
Author

@kerrywei thanks for the details. Planning to update the build steps and readme today.

@kerrywei
Copy link

Thank you for participating in FLIP FEST @Evan-Dapplica ! Looking forward to see the c++ SDK to be fully fledged in future 👍

@kerrywei kerrywei closed this Nov 12, 2021
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