This example showcases how to write multiple Starknet contracts within a single Scarb package.
This file contains hidden or 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
| import { ethers } from 'ethers' | |
| /** | |
| * Deploy the given contract | |
| * @param {string} contractName name of the contract to deploy | |
| * @param {Array<any>} args list of constructor' parameters | |
| * @param {Number} accountIndex account index from the exposed account | |
| * @return {Contract} deployed contract | |
| */ | |
| export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => { |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| { | |
| "id": "3baede574160ee7b135a852727852b19", | |
| "_format": "hh-sol-build-info-1", | |
| "solcVersion": "0.8.18", | |
| "solcLongVersion": "0.8.18+commit.87f61d96", | |
| "input": { | |
| "language": "Solidity", | |
| "sources": { | |
| "tests/MyToken1_test.sol": { | |
| "content": "// SPDX-License-Identifier: GPL-3.0\n \npragma solidity >=0.4.22 <0.9.0;\n\n// This import is automatically injected by Remix\nimport \"remix_tests.sol\"; \n\n// This import is required to use custom transaction context\n// Although it may fail compilation in 'Solidity Compiler' plugin\n// But it will work fine in 'Solidity Unit Testing' plugin\nimport \"remix_accounts.sol\";\nimport \"../contracts/MyToken.sol\";\n\n// File name has to end with '_test.sol', this file can contain more than one testSuite contracts\ncontract testSuite {\n\n /// 'beforeAll' runs before all other tests\n /// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll'\n function beforeAll() public {\n // <instantiate contract>\n Asser |
This file contains hidden or 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
| name: Slither Analysis | |
| on: [push] | |
| jobs: | |
| analyze: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - run: npm install |
This file contains hidden or 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
| import png from 'png-metadata'; | |
| import fs from 'fs'; | |
| const desiredSize = 24000; | |
| const folder = './assets/'; | |
| const creatorString = 'Skeleton Crew'; | |
| const fillerString = 'https://treattoolbox.com '; | |
| const bumpImageSize = async (file) => { | |
| if (file.endsWith('.png')) { |
This file contains hidden or 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
| {"chainId":"JavaScript VM Network","abi":[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutabi |
This file contains hidden or 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
| 1912 |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.4.22 <0.9.0; | |
| library console { | |
| address constant CONSOLE_ADDRESS = | |
| 0x000000000000000000636F6e736F6c652e6c6f67; | |
| function _sendLogPayloadImplementation(bytes memory payload) internal view { | |
| address consoleAddress = CONSOLE_ADDRESS; | |
| /// @solidity memory-safe-assembly |
This file contains hidden or 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
| { | |
| function array_length_t_string_memory_ptr(value) -> length { | |
| length := mload(value) | |
| } | |
| function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos { | |
| mstore(pos, length) |
This file contains hidden or 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
| { | |
| "overrides": [ | |
| { | |
| "files": "*.sol", | |
| "options": { | |
| "printWidth": 80, | |
| "tabWidth": 4, | |
| "useTabs": false, | |
| "singleQuote": false, | |
| "bracketSpacing": false |
OlderNewer