Skip to content

Commit

Permalink
feat: Support registering external contracts
Browse files Browse the repository at this point in the history
This starts to add support for registering external smart contracts
with CDP.

This will enable developers to use these register smart contracts
to invoke, read, and create webhooks associated with the contract!
  • Loading branch information
alex-stone committed Dec 18, 2024
1 parent 5e5ccee commit 13220f6
Show file tree
Hide file tree
Showing 5 changed files with 554 additions and 261 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased
* Add support for fetching address reputation.
* Add support for registering, updating, and listing smart contracts that are
deployed external to CDP.

## [0.12.0] - Skipped

Expand Down
8 changes: 8 additions & 0 deletions lib/coinbase/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ def initialize(msg = 'Transaction must be signed')
end
end

# An error raised when attempting to manage an external contract on-chain,
# e.g. sign the deployment tx, deploy the contract, etc...
class ManageExternalContractError < StandardError
def initialize(action = 'manage')
super("Cannot #{action} external smart contract")
end
end

# An error raised when an address attempts to sign a transaction without a private key.
class AddressCannotSignError < StandardError
def initialize(msg = 'Address cannot sign transaction without private key loaded')
Expand Down
Loading

0 comments on commit 13220f6

Please sign in to comment.