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

feat: Add address reputation #221

Merged
merged 5 commits into from
Dec 17, 2024
Merged

feat: Add address reputation #221

merged 5 commits into from
Dec 17, 2024

Conversation

alex-stone
Copy link
Contributor

@alex-stone alex-stone commented Dec 11, 2024

What changed? Why?

This adds support for fetching an address' reputation lazily.

Example:

risky_address = Coinbase::ExternalAddress.new(:ethereum_mainnet, '0x12846c6Fd6baBFE4bC6F761eB871eFfFDEb26913')

# Returns the reputation of the address
risky_address.reputation
=> Coinbase::AddressReputation{score: '-90', total_transactions: '0', unique_days_active: '0', longest_active_streak: '0', current_active_streak: '0', activity_period_days: '0', token_swaps_performed: '0', bridge_transactions_performed: '0', lend_borrow_stake_transactions: '0', ens_contract_interactions: '0', smart_contract_deployments: '0'}

# Returns whether the address itself is deemed "risky"
risky_address.risky?
=> true

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Dec 11, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@alex-stone alex-stone force-pushed the stone/address-reputation branch 2 times, most recently from 39ca4a4 to 43f0081 Compare December 11, 2024 17:58
@alex-stone

This comment was marked as resolved.

@arpitsrivastava-cb

This comment was marked as resolved.

alex-stone and others added 3 commits December 13, 2024 09:53
This adds support for fetching an address' reputation lazily.

Example:
```
risky_address = Coinbase::Address.new(:ethereum_mainnet, '0x12846c6Fd6baBFE4bC6F761eB871eFfFDEb26913')

// Returns the reputation of the address
risky_address.reputation

// Returns whether the address itself is deemed "risky"
risky_address.risky?
=> true
```
This adds tests for the address reputation object as well as for
the usage of it within all of the address constructs.
@alex-stone alex-stone force-pushed the stone/address-reputation branch from edd83e0 to 0acc672 Compare December 13, 2024 17:55
@alex-stone alex-stone changed the title wip: Add address reputation feat: Add address reputation Dec 13, 2024
@alex-stone alex-stone marked this pull request as ready for review December 13, 2024 17:57
@alex-stone alex-stone force-pushed the stone/address-reputation branch from d169d91 to 995413d Compare December 13, 2024 21:20
jazz-cb
jazz-cb previously approved these changes Dec 17, 2024
@alex-stone alex-stone changed the base branch from master to v0.13.0 December 17, 2024 19:01
@alex-stone alex-stone dismissed jazz-cb’s stale review December 17, 2024 19:01

The base branch was changed.

@alex-stone alex-stone requested a review from jazz-cb December 17, 2024 19:01
@alex-stone alex-stone merged commit 1ee0882 into v0.13.0 Dec 17, 2024
10 checks passed
@alex-stone alex-stone deleted the stone/address-reputation branch December 17, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants