-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
637 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Scorecard analysis workflow | ||
on: | ||
# Only the default branch is supported. | ||
branch_protection_rule: | ||
schedule: | ||
# Weekly on Saturdays. | ||
- cron: "30 1 * * 6" | ||
push: | ||
branches: [main] | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecard analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed if using Code scanning alerts | ||
security-events: write | ||
# Needed for GitHub OIDC token if publish_results is true | ||
id-token: write | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Run analysis" | ||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
# Publish the results for public repositories to enable scorecard badges. For more details, see | ||
# https://github.com/ossf/scorecard-action#publishing-results. | ||
# For private repositories, `publish_results` will automatically be set to `false`, regardless | ||
# of the value entered here. | ||
publish_results: true | ||
|
||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF | ||
# format to the repository Actions tab. | ||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 30 | ||
|
||
# required for Code scanning alerts | ||
- name: "Upload SARIF results to code scanning" | ||
uses: github/codeql-action/upload-sarif@49abf0ba24d0b7953cb586944e918a0b92074c80 # v2.22.4 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
scarb 2.3.1 | ||
starknet-foundry 0.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mod tokens { | ||
mod interface; | ||
mod memecoin; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
use openzeppelin::token::erc20::interface::{IERC20Metadata, IERC20, IERC20Camel}; | ||
use starknet::ContractAddress; | ||
|
||
|
||
#[starknet::interface] | ||
trait IUnruggableMemecoin<TState> { | ||
// ************************************ | ||
// * Metadata | ||
// ************************************ | ||
fn name(self: @TState) -> felt252; | ||
fn symbol(self: @TState) -> felt252; | ||
fn decimals(self: @TState) -> u8; | ||
|
||
// ************************************ | ||
// * snake_case | ||
// ************************************ | ||
fn total_supply(self: @TState) -> u256; | ||
fn balance_of(self: @TState, account: ContractAddress) -> u256; | ||
fn allowance(self: @TState, owner: ContractAddress, spender: ContractAddress) -> u256; | ||
fn transfer(ref self: TState, recipient: ContractAddress, amount: u256) -> bool; | ||
fn transfer_from( | ||
ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 | ||
) -> bool; | ||
fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; | ||
|
||
// ************************************ | ||
// * camelCase | ||
// ************************************ | ||
fn totalSupply(self: @TState) -> u256; | ||
fn balanceOf(self: @TState, account: ContractAddress) -> u256; | ||
fn transferFrom( | ||
ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 | ||
) -> bool; | ||
|
||
// ************************************ | ||
// * Additional functions | ||
// ************************************ | ||
fn launch_memecoin(ref self: TState); | ||
} | ||
|
||
#[starknet::interface] | ||
trait IUnruggableMemecoinCamel<TState> { | ||
fn totalSupply(self: @TState) -> u256; | ||
fn balanceOf(self: @TState, account: ContractAddress) -> u256; | ||
fn transferFrom( | ||
ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 | ||
) -> bool; | ||
} | ||
|
||
#[starknet::interface] | ||
trait IUnruggableMemecoinSnake<TState> { | ||
fn total_supply(self: @TState) -> u256; | ||
fn balance_of(self: @TState, account: ContractAddress) -> u256; | ||
fn allowance(self: @TState, owner: ContractAddress, spender: ContractAddress) -> u256; | ||
fn transfer(ref self: TState, recipient: ContractAddress, amount: u256) -> bool; | ||
fn transfer_from( | ||
ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 | ||
) -> bool; | ||
fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; | ||
} | ||
|
||
#[starknet::interface] | ||
trait IUnruggableAdditional<TState> { | ||
fn launch_memecoin(ref self: TState); | ||
} |
Oops, something went wrong.