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

Contract dynamic swagger endpoint #527

Merged
merged 22 commits into from
May 5, 2021

Conversation

rowandh
Copy link
Contributor

@rowandh rowandh commented Apr 21, 2021

Adds the ability to dynamically generate a Swagger doc for a deployed contract.

Usage:
The contract must first be added to Swagger's definitions by POSTing the a valid contract address to /swagger/contracts/. Afterwards, refresh the page to see the contract in the Swagger UI dropdown.

image

POST endpoints - these will create and broadcast a transaction to the network, incurring fees
GET endpoints - these will execute locally and won't incur any fees

Future work:
We could potentially wait for the tx to be mined and return the receipt when making POSTs

Copy link
Contributor

@fassadlr fassadlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quantumagi not sure if you wanted to have a look as well?

@rowandh rowandh merged commit ec0f1d6 into stratisproject:master May 5, 2021
zeptin pushed a commit to zeptin/StratisFullNode that referenced this pull request Jun 15, 2021
fassadlr pushed a commit that referenced this pull request Jul 22, 2021
fassadlr added a commit that referenced this pull request Jul 23, 2021
* Bump Nuget versions

* Validate cross-chain deposit target (#561)

* Validate cross-chain transaction target

* Add more changes

* Change validation network

* Refactor

* Add ValidateCrossChainTransferAddress method

* Rename method

* Add some comments

* Update tests

* Add validation to SmartContractTransactionService

* Add minimum

* Fix spelling

* Fix message

* Update CirrusAddressValidationNetwork

* Add comments

* Refactor

* Remove whitespace

* Test for federation

* Move OpReturnDataReader to Stratis.Bitcoin

* Add reference

* Add Ethereum address check to InterFluxOpReturnEncoder (#601)

* Bump version to 1.0.9.1

* [Interflux] Explicitly specify Enum values for DestinationChain (#602)

* Explicitly specify Enum values for DestinationChain

* Fix order

* [InterFlux] Only allow ETH Interflux conversions (#608)

* Only allow ETH Interflux conversions

* Update src/Stratis.Bitcoin.Features.Wallet/Controllers/WalletController.cs

Co-authored-by: zeptin <zeptin@gmail.com>

Co-authored-by: zeptin <zeptin@gmail.com>

* Add Ethereum address check to InterFluxOpReturnEncoder (#601)

* Support legacy ETH conversion OP_RETURNs (#615)

* Fix SmartContract History (#596)

* Fix SmartContract History

* Update GetHistory

* Update GetHistory

* Update GetHistory

* Update query

* Update query

* Fix column name

* Add address filter to wallet service

* Fix query

* Refactor

* Use SC ScriptAddressReader

* Refactor

* Update network check points (#619)

* Update network check points

* Fix tests

* Only reserve UTXOs once the transaction has been built successfully. (#618)

* Update StraxTest.cs (#630)

* Update launch script (#638)

* Remove Password Check and GETH Check

* Signed Script

* Contract dynamic swagger endpoint (#527)

Co-authored-by: quantumagi <someguy.fromafrica@gmail.com>
Co-authored-by: zeptin <zeptin@gmail.com>
Co-authored-by: StratisIain <32906542+StratisIain@users.noreply.github.com>
Co-authored-by: Rowan de Haas <rowandh@users.noreply.github.com>
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