portal

command
v0.0.0-...-3cbb637 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

Portal (Oracle Middleware)

The sandbox oracle serves the application's JSON API, abstracting the details of interacting with smart contracts from API consumers.

A blockchain oracle is a service that provides smart contracts with information from the outside world.

Directory Structure

oracle:
 Code implementing the oracle service
version:
 A mechanism for the oracle to know its build vesrion

Making Changes

Testing Changes

The oracle defines tests in files with names like oracle/*_test.go. These are functional tests which test application API and the code paths connecting the oracle to the phylum. The functional tests can be run with the following command:

make test

From the project's top level make oraclegotest will run the same tests.

Running Tests Outside of Docker

To run tests directly using go test there are environment variables needed to for the tests to set up an in-memory copy of the platform to run tests on.

eval $(make host-go-env)
go test ./...

This can be faster than running the tests in docker and has some additional benefits. For example, the following command runs only the tests related to the CreateAccount API endpoint:

go test -run=CreateAccount ./...

Documentation

Overview

Copyright © 2024 Luther Systems, Ltd. All right reserved.

Copyright © 2024 Luther Systems, Ltd. All right reserved.

Copyright © 2024 Luther Systems, Ltd. All right reserved.

Directories

Path Synopsis
Package oracle implements the sandbox UI portal.
Package oracle implements the sandbox UI portal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL