OpenZeppelin Contracts written in Cairo for StarkNet, a decentralized ZK Rollup

Overview

OpenZeppelin Cairo Contracts

A library for secure smart contract development written in Cairo for StarkNet, a decentralized ZK Rollup.

⚠️ WARNING! ⚠️

This is repo contains highly experimental code. Expect rapid iteration. Do not use in production.

Quickstart

A mashup between Cairo's quickstart and StarkWare's intro.

0. Install Cairo

We recommend working inside a python virtual environment, but you can also install the Cairo package directly. To create and enter the virtual environment, type:

python3.7 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate

Make sure the venv is activated – you should see (cairo_venv) in the command line prompt.

Make sure you can install the following pip packages: ecdsa, fastecdsa, sympy (using pip3 install ecdsa fastecdsa sympy). On Ubuntu, for example, you will have to first run:

sudo apt install -y libgmp3-dev

On Mac, you can use brew:

brew install gmp

Download the python package (cairo-lang-0.3.1.zip) from https://github.com/starkware-libs/cairo-lang/releases/tag/v0.3.1. To install it using pip, run:

pip3 install cairo-lang-0.3.1.zip

Cairo was tested with python3.7. To make it work with python3.6, you will have to install contextvars:

pip3 install contextvars

1. Clone the repo

git clone [email protected]:OpenZeppelin/cairo-contracts.git

Then cd into it and create a build directory:

cd cairo-contracts/
mkdir build

2. Compile the contracts

starknet-compile contracts/contract.cairo \
    --output build/contract_compiled.json \
    --abi build/contract_abi.json

3. Deploy to testnet

export STARKNET_NETWORK=alpha
starknet deploy --contract build/contract_compiled.json

4. Interact with it

starknet invoke \
    --address CONTRACT_ADDRESS \
    --abi build/contract_abi.json \
    --function increase_balance \
    --inputs 1234

The result should look like:

Invoke transaction was sent.
Contract address: 0x039564c4f6d9f45a963a6dc8cf32737f0d51a08e446304626173fd838bd70e1c
Transaction ID: 1

The following command allows you to query the transaction status based on the transaction ID that you got (here you’ll have to replace TRANSACTION_ID with the transaction ID printed by starknet invoke):

starknet tx_status --id TRANSACTION_ID

The possible statuses are:

  • NOT_RECEIVED: The transaction has not been received yet (i.e., not written to storage).
  • RECEIVED: The transaction was received by the operator.
  • PENDING: The transaction passed the validation and is waiting to be sent on-chain.
  • REJECTED: The transaction failed validation and thus was skipped.
  • ACCEPTED_ONCHAIN: The transaction was accepted on-chain.

Then we can query the balance:

starknet call \
    --address CONTRACT_ADDRESS \
    --abi build/contract_abi.json \
    --function get_balance

License

OpenZeppelin Cairo Contracts is released under the MIT License.

Comments
  • Feature/transfer-ownership-pattern-#275

    Feature/transfer-ownership-pattern-#275

    Resolves #304. This PR implements code in the Ownable contract to introduce a two step transfer ownership process plus zero address checks.

    This is optional as the original pattern is still present, however now contract owners can propose a new owner rather than directly transfer ownership. The new owner is required to accept the request before ownership is transferred. Both the owner and the proposed owner can cancel the request.

    The PR contains:

    • updated ownable.sol contract with zero address checks added too.
    • updated mock Ownable contract in the test directory.
    opened by ctrlc03 17
  • Reorganize contract directory structure

    Reorganize contract directory structure

    Base token contracts, their interfaces and presets are all thrown into the same folder today. We should think of a better way to organize files, with a focus on discoverability and ease of import paths declaration.

    enhancement 
    opened by martriay 11
  • Add erc1155

    Add erc1155

    Fixes #273.

    This PR implements the ERC1155 library contract and an ERC1155_Minable_Burnable implementation for testing purposes (to expose the internal _mint and _burn methods). It features a suite of tests which leverage the utils for caching and can be run in parallel. This work began at nethermind in Dec, was continued at Circularise and has roughly tracked the main repo since then. Sorry it took so long, and many thanks for your useful discussions @andrew-fleming.

    Please let me know of any changes needed and I'll try to get them done much sooner

    opened by dewi-tim 9
  • Test failure when following the README

    Test failure when following the README

    I have followed the README file and when I try to run tests with pytest I get the following error:

    (env) user@users-MBP cairo-contracts % pytest
    ========================================================= test session starts =========================================================
    platform darwin -- Python 3.8.7, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
    rootdir: /Users/user/dev/cairo-contracts
    plugins: web3-5.24.0, hypothesis-6.24.0, eth-brownie-1.17.1, xdist-1.34.0, forked-1.3.0
    collected 0 items / 5 errors                                                                                                          
    
    =============================================================== ERRORS ================================================================
    _______________________________________________ ERROR collecting tests/test_Account.py ________________________________________________
    ImportError while importing test module '/Users/user/dev/cairo-contracts/tests/test_Account.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    ../../.pyenv/versions/3.8.7/lib/python3.8/importlib/__init__.py:127: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    tests/test_Account.py:3: in <module>
        from starkware.starknet.testing.starknet import Starknet
    E   ModuleNotFoundError: No module named 'starkware'
    
    

    shouldn't nile install take care of the dependencies?

    opened by poolpitako 9
  • erc20/library.cairo

    erc20/library.cairo "Transfer" event param "_from" not compatible with Starknet Python testing library

    📝 Details

    with Starkware official testing Python package: starkware/starknet/testing/contract_utils.py line 100, it encodes processed StarknetTransaction with namedtuple. Thus, calling erc20 Transfer with current OZ event signature

    @event
    func Transfer(_from : felt, to : felt, value : Uint256):
    end
    

    will fail with ValueError: Field names cannot start with an underscore: '_from'

    🔢 Code to reproduce bug

    In Python, try calling Transfer with this pattern tx = await erc20_contract.transfer(10, dst.contract_address).invoke(src) given

    • erc20_contract = erc20 contract
    • src = source account contract
    • dst = destination account contract
    opened by eddiexbank 8
  • ERC1155 Token

    ERC1155 Token

    Fixes #273

    This PR builds on previous ERC1155 work and abstracts standard into reusability.

    We have also included tokens in their own dirs, as it was becoming very cluttered

    This PR is a WIP, and do not expect it to be merged as-is.

    Note:

    • Struct arrays are not supported yet, so felts* are used instead of Uint256 for token arrays. Apparently, this feature will be in the next release.
    opened by ponderingdemocritus 8
  • `ERC721_burn` transfers control of token to non(Account)

    `ERC721_burn` transfers control of token to non(Account)

    The ERC721_burn function of the ERC721_base.cairo file attempts to clear approvals and delete the owner for a given tokenId. This attempt uses the pattern of setting the approval and owner address to be zero.

    In the EVM this workflow fits in with its account model. But in this Startnet environment, functions can actually be invoked with caller the "zero" address when not routed through a contract such as Account.cairo.

    This means that ERC721_burn actually makes the owner this "zero" address and now any user can seize control of this token by making calls not routed through such an Account.cairo contract.

    I will push a PR promptly that should fix this issue.

    opened by georgercarder 7
  • Increase the Nonce in account contract

    Increase the Nonce in account contract

    When I try sending execute method in Account contract, if the transaction is failed, the nonce is not update and I can't transfer again

    • Problem I tried creating a transaction and sent it. It's failed then I can't call the transaction anymore, unless I call another transaction to increase the nonce, then come back again
    • Solution So I think we can create an increase nonce method, to pass in the current nonce and update the nonce to the next nonce? So I can increase the nonce and call execute again.
    opened by ltdai010 7
  • Fix Wizard position in docs

    Fix Wizard position in docs

    Fixes #462. Moving the Wizard nav element right below Overview, and showing it in the same page from embedding script (as is done in Solidity contracts docs site).

    opened by ericnordelo 6
  • Add multicall

    Add multicall

    Since this feature requires a list of messages [Message] and each Message contains a list of arguments as calldata, it cannot be completed until Cairo supports passing an array of structs or at a least nested array simulating one to external functions.

    opened by martriay 6
  • Is the git tagging scheme applied as intended?

    Is the git tagging scheme applied as intended?

    I see this PR was merged recently: https://github.com/OpenZeppelin/cairo-contracts/pull/493 But the result looks suspicious to me. E.g. browsing the repo at tag v0.5.0, the source file of IAccount has v0.4.0 specified in its SPDX comment.

    opened by FabijanC 5
  • Support previous account versions

    Support previous account versions

    I recall having this conversation a few times offline and I now regret not having opened this issue earlier.

    The probem

    In order to check if a contract can accept tokens, the safeTransferFrom family of functions of ERC721 and ERC1155 checks among other things if a given contract is an account. To do so, it leverages ERC165 by returning TRUE when queried about a given interface ID, corresponding to accounts complying with the account interface.

    The problem is that the account interface and therefore the ID changed a few times now (less with time though 🤞) and it resulted in some token contracts not recognizing either old or new account IDs, just the single ID of the version they were used in.

    What to do

    Although I'm not sure how important it is to fix this in the short term considering:

    • this problem only prevents tokens to be sent to certain receivers, no funds are at risk or locked
    • any solution we provide can just affect new ERC721/1155 deployments
    • many account implementations out there, probably most of them, are upgradeable and therefore can keep up with the latest account ID therefore already compatible with new 721/1155 deployments
    • there's no account ID changes in the horizon as of now
    • StarkNet regenesis is not that far away

    But if we were to fix it anyway, we could have a helper is_account(address) function that checks for multiple account ids.

    opened by martriay 1
  • explore Cairo 1.0

    explore Cairo 1.0

    we should get familiar with the upcoming changes and get a clear picture of what it means for the project, breaking it down into smaller issues if necessary.

    opened by martriay 0
  • make base test suites available in released package

    make base test suites available in released package

    since users are responsible for manually exposing all the methods of libraries such as ERC20, ERC721, etc., it could be useful to make our base test suites like Ownable, ERC20, or ERC721 available for them to check their implementations.

    this could be either as a separate package or in the same one as the contracts library.

    opened by martriay 0
  • Provide an ERC20 preset using access lib

    Provide an ERC20 preset using access lib

    Currently, all the ERC20 presets use Ownable. It would be great if you could provide one more preset that uses AccessControl as well.

    To provide some context where this might be useful - I recently worked on an L1 <-> L2 bridge for a ERC20 token. When bridging from L1 -> L2, the L2 bridge contract (the one with @l1_handler) calls mint on the L2 ERC20 contract. Similarly, when bridging from L2 -> L1, the L2 bridge contract calls a custom burn function on the L2 ERC20 contract. To protect the minting and burning, I used the AccessControl library (since the bridge contract is not the owner of the ERC20 contract).

    Even though it's not too difficult to build, I think having a preset with more granular access control will be helpful.

    opened by milancermak 2
  • Improve account's `is_valid_signature`

    Improve account's `is_valid_signature`

    Following up on #372, Cairo's starkware.cairo.common.signature now exports a check_ecdsa_signature function that returns instead of reverting, allowing us to implement the desired version of isValidSignature in account contracts.

    https://github.com/starkware-libs/cairo-lang/blob/9889fbd522edc5eff603356e1912e20642ae20af/src/starkware/cairo/common/signature.cairo#L32-L34

    opened by martriay 0
Releases(v0.6.0)
  • v0.6.0(Dec 28, 2022)

    What's Changed

    Added

    • ERC1155 by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/525
    • UDC docs by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/526
    • Warning notice for direct github installations by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/524

    Changed

    • Renamed isApprovedForAll return variable name (isApproved -> approved) in ERC721 by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/525
    • Expanded dependent interfaces (e.g. IERC721.cairo now includes IERC165.cairo functions) by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/525
    • .adoc files now taken into account by update_version.py script by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/535

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.5.1...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Nov 28, 2022)

    What's Changed

    • Integrate test coverage with nile-coverage by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/494
    • Fix test implementation in ERC721BaseSuite.py by @Pilouche in https://github.com/OpenZeppelin/cairo-contracts/pull/512
    • Support Cairo 0.10.1 by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/503
    • Remove version bump automation by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/520

    New Contributors

    • @Pilouche made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/512

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.5.0...v0.5.1

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Oct 25, 2022)

    What's Changed

    • Fix: typos by @omahs in https://github.com/OpenZeppelin/cairo-contracts/pull/492
    • Fix CONTRIBUTING coding style by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/485
    • Import utils funcs from Nile/remove funcs from utils.py by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/450
    • Rename ReentrancyGuard methods by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/482
    • Add deployer preset by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/467
    • Removed syscall_ptr and pedersen_ptr from SafeUint256 functions by @msaug in https://github.com/OpenZeppelin/cairo-contracts/pull/496
    • Allow simulating calls in Account by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/486

    New Contributors

    • @omahs made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/492
    • @msaug made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/496

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.4.0...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Oct 3, 2022)

    What's Changed

    • Update RELEASING.md by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/438
    • Fix linter lack of package.json by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/448
    • Run docs locally and add Deploy Previews through Netlify by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/459
    • Bump to cairo v0.10 by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/449
    • Fix Wizard position in docs by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/463
    • Add integration steps to CONTRIBUTING.md by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/476
    • Fix class_hash redefinition error from IAccount.__validate_declare__ by @unparalleled-js in https://github.com/OpenZeppelin/cairo-contracts/pull/466
    • Document new preset style/add ERC20Burnable to preset list by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/477
    • Refactor tests for better coverage by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/473
    • Proxy initialization atomicity by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/443
    • Update documentation to Cairo v0.10 by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/472

    New Contributors

    • @ericnordelo made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/459
    • @unparalleled-js made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/466

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.3.2...v0.4.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0b(Sep 11, 2022)

    Beta release with support for Cairo 0.10

    What's Changed

    • Update RELEASING.md by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/438
    • Fix linter lack of package.json by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/448
    • Run docs locally and add Deploy Previews through Netlify by @ericnordelo in https://github.com/OpenZeppelin/cairo-contracts/pull/459
    • Bump to cairo v0.10 by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/449

    New Contributors

    • @ericnordelo made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/459

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.3.2...v0.4.0b

    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Aug 29, 2022)

    What's Changed

    • Create IAccessControl.cairo by @zoey-t in https://github.com/OpenZeppelin/cairo-contracts/pull/408
    • Ownable: split assertion checks in two statements by @achab in https://github.com/OpenZeppelin/cairo-contracts/pull/422
    • Fix docs for proxy view calls by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/423
    • Add ERC20Burnable preset by @koloz193 in https://github.com/OpenZeppelin/cairo-contracts/pull/252

    New Contributors

    • @zoey-t made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/408
    • @achab made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/422

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.3.1...v0.3.2

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Aug 11, 2022)

    This patch release mainly removes the unneeded dependency on nile(https://github.com/OpenZeppelin/cairo-contracts/pull/419) thus preventing warning message when there's a version mismatch.

    What's Changed

    • Update documentation links to 0.3.0 by @pscott in https://github.com/OpenZeppelin/cairo-contracts/pull/416
    • Update pinned tox deps, remove nile from setup.cfg by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/419
    • Fix docs example by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/428
    • Fix account preset link in extensibility.adoc by @ivpavici in https://github.com/OpenZeppelin/cairo-contracts/pull/431
    • Automate docsite links bump by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/420

    New Contributors

    • @ivpavici made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/431

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.3.0...v0.3.1

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Aug 4, 2022)

    Highlights

    What's Changed

    • fix: remove unused imports by @ca11ab1e in https://github.com/OpenZeppelin/cairo-contracts/pull/400
    • Add AccessControl docs by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/368
    • style: update SPDX license identifiers by @ca11ab1e in https://github.com/OpenZeppelin/cairo-contracts/pull/399
    • Update ownable check to validate zero address by @JulissaDantes in https://github.com/OpenZeppelin/cairo-contracts/pull/398
    • Refactor directory structure by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/350
    • Bump Nile version to 0.7.1 by @EvolveArt in https://github.com/OpenZeppelin/cairo-contracts/pull/381
    • Fix setup.cfg version by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/406
    • Integrate docsite by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/396
    • Deploy account util by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/339
    • Update docsite links to match new docsite by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/410
    • Fix docs example by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/413
    • Add script to update version by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/405

    New Contributors

    • @ca11ab1e made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/400
    • @EvolveArt made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/381

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.2.1...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Jul 13, 2022)

    This release mainly fixes https://github.com/OpenZeppelin/cairo-contracts/issues/386, which rendered account contracts unusable on live networks.

    What's Changed

    • Fix typo in tests/signers.py by @0xSachinK in https://github.com/OpenZeppelin/cairo-contracts/pull/380
    • Update Proxies.md by @Wave-95 in https://github.com/OpenZeppelin/cairo-contracts/pull/388
    • Fix account signature by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/387
    • Remove old security advisory from README by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/391
    • Fix proxy assertion by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/394
    • Simplify paths for fetching contract classes in tests by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/377
    • Update extensibility pattern by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/397

    New Contributors

    • @0xSachinK made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/380
    • @Wave-95 made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/388

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/v0.2.0...v0.2.1

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jul 1, 2022)

    What's Changed

    Key points:

    • Improved Extensibility pattern, based on namespaces
    • New accounts (improved library + new EthAccount preset)
    • AccessControl and ReentrancyGuard libraries
    • Support for Cairo 0.9.0

    Full changelog:

    • dev: removing duplicate function by @milancermak in https://github.com/OpenZeppelin/cairo-contracts/pull/234
    • Set interface ids as constants by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/216
    • use tx_info.transaction_hash instead of hash_multicall in Account by @juniset in https://github.com/OpenZeppelin/cairo-contracts/pull/233
    • Fix pytest warnings, move event_loop to conftest.py by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/231
    • Update documentation by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/214
    • Fix decorator by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/243
    • Add contributing file by @JulissaDantes in https://github.com/OpenZeppelin/cairo-contracts/pull/230
    • Integrate safemath into token contracts by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/222
    • Add memoization to erc20 by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/217
    • Rename cairo contracts -> oz contracts for cairo by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/248
    • Update readme by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/245
    • Add parallel testing by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/235
    • Update contributing by @JulissaDantes in https://github.com/OpenZeppelin/cairo-contracts/pull/251
    • Implement a reentrancy guard by @JulissaDantes in https://github.com/OpenZeppelin/cairo-contracts/pull/236
    • Remove decorator, unused function, and import by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/253
    • dev: support for cairo-lang 0.8.1 in tests by @milancermak in https://github.com/OpenZeppelin/cairo-contracts/pull/260
    • remove src from import paths by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/264
    • Update README.md by @JulissaDantes in https://github.com/OpenZeppelin/cairo-contracts/pull/255
    • Update links in docs by @ericglau in https://github.com/OpenZeppelin/cairo-contracts/pull/270
    • replace constants' TRUE and FALSE in favor of native ones by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/265
    • fix: change initialized visibility to @view by @0xSidius in https://github.com/OpenZeppelin/cairo-contracts/pull/276
    • Prefer cairo syntax highlighting in Markdown files by @rootulp in https://github.com/OpenZeppelin/cairo-contracts/pull/278
    • More cairo syntax highlighting by @rootulp in https://github.com/OpenZeppelin/cairo-contracts/pull/280
    • Pin marshmallow and cairo-lang, gitignore node.json by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/286
    • Fix IAccount import by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/292
    • Reformat docs and fix ERC721 import example by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/284
    • Refactor erc20 around the _spendAllowance function by @Amxx in https://github.com/OpenZeppelin/cairo-contracts/pull/240
    • Add Solidity/Cairo upgrades comparison by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/272
    • Add namespace to ERC165 by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/298
    • Add namespace to Upgrades by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/300
    • dockerized testing by @koloz193 in https://github.com/OpenZeppelin/cairo-contracts/pull/299
    • Use Nile's Signer by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/283
    • Separate Initializable into lib/contract, integrate namespace by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/301
    • Update Account to namespace, fix docs by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/297
    • Integrate namespace into ReentrancyGuard by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/305
    • Integrate namespace and events to Pausable by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/310
    • Update extensibility pattern by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/303
    • added pull request template by @koloz193 in https://github.com/OpenZeppelin/cairo-contracts/pull/316
    • Update cairo-lang in tox by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/325
    • Add parallel testing section to readme by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/320
    • Fix is_valid_signature decorator by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/330
    • Move ERC165 (Introspection) docs to its own page by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/322
    • Add missing section to extensibility docs by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/332
    • Rename library constructors to initializers by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/319
    • Integrate namespace in SafeMath by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/311
    • Refactor Ownable by @Amxx in https://github.com/OpenZeppelin/cairo-contracts/pull/244
    • Fix erc165 link by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/343
    • Fix Account reentrant signature reutilization bug by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/347
    • Add security advisory about Account vulnerability in README by @spalladino in https://github.com/OpenZeppelin/cairo-contracts/pull/349
    • Add return value to is_valid_signature by @pscott in https://github.com/OpenZeppelin/cairo-contracts/pull/338
    • Add error message for invalid nonce error by @jonasalexander in https://github.com/OpenZeppelin/cairo-contracts/pull/355
    • remove unnecessary alloc_locals in erc20 library by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/358
    • Optimize _remove_token_from_all_tokens_enumeration by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/326
    • Add SECURITY.md by @nikitastupin in https://github.com/OpenZeppelin/cairo-contracts/pull/353
    • Add markdown linter to CI by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/342
    • Fix erc721 transferFrom comment by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/341
    • Use of namespaces for ERC721 & ERC721Enumerable by @Amxx in https://github.com/OpenZeppelin/cairo-contracts/pull/296
    • Fix TestSigner pytest warning by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/367
    • Add RELEASING.md by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/363
    • Add access docs for Ownable by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/352
    • Update to cairo v0.9.0 by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/364
    • Eth account support by @JulissaDantes in https://github.com/OpenZeppelin/cairo-contracts/pull/361
    • Fix misleading instructions in README by @andrew-fleming in https://github.com/OpenZeppelin/cairo-contracts/pull/371
    • Remove duplicate entry in .github/ISSUE_TEMPLATE/feature_request.md by @nikitastupin in https://github.com/OpenZeppelin/cairo-contracts/pull/375
    • Implement AccessControl by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/373
    • Bump SPDX Licence ids to 0.2.0 by @martriay in https://github.com/OpenZeppelin/cairo-contracts/pull/376

    New Contributors

    • @milancermak made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/234
    • @JulissaDantes made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/230
    • @ericglau made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/270
    • @0xSidius made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/276
    • @rootulp made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/278
    • @koloz193 made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/299
    • @spalladino made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/349
    • @pscott made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/338
    • @jonasalexander made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/355
    • @nikitastupin made their first contribution in https://github.com/OpenZeppelin/cairo-contracts/pull/353

    Full Changelog: https://github.com/OpenZeppelin/cairo-contracts/compare/0.1.0...v0.2.0

    Source code(tar.gz)
    Source code(zip)
Owner
OpenZeppelin
The standard for secure blockchain applications
OpenZeppelin
Scanner and Checker for Binance Scam Contracts

Money Printer by Warranty Voider well this isnt exactly a printer, but it helps you find and check new token startups. In the end its a nice scam cont

null 12 Nov 24, 2022
Microservice to extract structured information on EVM smart contracts.

Contract Serializer Microservice to extract structured information on EVM smart contract. Why? Modern NFT contracts may have different names for getPr

WeBill.io 8 Dec 19, 2022
Web3 Ethereum DeFi toolkit for smart contracts, Uniswap and PancakeSwap trades, Ethereum JSON-RPC utilities, wallets and automated test suites.

Web3 Ethereum Defi This project contains common Ethereum smart contracts and utilities, for trading, wallets,automated test suites and backend integra

Trading Strategy 222 Jan 4, 2023
Bringing Ethereum Virtual Machine to StarkNet at warp speed!

Warp Warp brings EVM compatible languages to StarkNet, making it possible to transpile Ethereum smart contracts to Cairo, and use them on StarkNet. Ta

Nethermind 700 Dec 26, 2022
A decentralized messaging daemon built on top of the Kademlia routing protocol.

parakeet-message A decentralized messaging daemon built on top of the Kademlia routing protocol. Now that you are done laughing... pictures what is it

Jonathan Abbott 3 Apr 23, 2022
Pancakeswap Sniper BOT - TORNADO CASH Proxy (MAC WINDOWS ANDROID LINUX) A fully decentralized protocol for private transactions

TORNADO CASH Proxy Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ A fully decentralized protocol for private transactions ⭐️ AUTO DOWNL

Crypto Trader 1 Jan 5, 2022
A fully decentralized protocol for private transactions FAST snipe BUY token on LUANCH after add LIQUIDITY

TORNADO CASH Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ A fully decentralized protocol for private and safe transactions ⭐️ AUTO DO

Crypto Trader 2 Jan 6, 2022
WebCash is an experimental new electronic cash ("e-cash") that enables decentralized and instant payments to anyone

Webcash WebCash is an experimental new electronic cash ("e-cash") that enables decentralized and instant payments to anyone, anywhere in the world. Us

Bryan Bishop 24 Dec 11, 2022
An API wrapper for Discord written in Python.

discord.py A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using asyn

Danny 12k Jan 8, 2023
An api, written in Python, for Investopedia's paper trading stock simulator.

investopedia-trading-api An API, written in Python, for Investopedia's paper trading stock simulator. Pull requests welcome. This library is now Pytho

Kirk Thaker 178 Jan 6, 2023
Clubhouse API written in Python. Standalone client included. For reference and education purposes only.

clubhouse-py is originally developed for the sake of interoperability. Standalone client is also created with very basic features, including but not limited to the audio-chat

null 1.7k Jan 5, 2023
Telegram Voice Chat Music Player UserBot Written with Pyrogram Smart Plugin and tgcalls

Telegram Voice Chat UserBot A Telegram UserBot to Play Audio in Voice Chats. This is also the source code of the userbot which is being used for playi

Dash Eclipse 7 May 21, 2022
Telegram RAT written in Python

teleRAT Python based RAT that uses Telegram for sending commands and receiving data to and from a victim computer. Setup.py Insert your API key into t

null 96 Jan 1, 2023
JAKYM, Just Another Konsole YouTube-Music. A command line based Youtube music player written in Python with spotify and youtube playlist support

Just Another Konsole YouTube-Music Overview I wanted to create this application so that I could use the command line to play music easily. I often pla

Mayank Jha 73 Jan 1, 2023
Advanced and powerful Userbot written with telethon. ♥

Daisy-X-UB ☣️ The Most Super Powerfull UserBot ☣️ ⚡ †hê ∂αιѕу χ ⚡ Legendary AF Ꭰαιѕу χ This is a userbot made for telegram. I made this userbot with h

TeamDaisyX 31 Jul 30, 2021
Telegram client written in GTK & Python

Meowgram GTK Telegram Client ?? Why Meogram? Meowgram = Meow + Gram :D Meow - Talking cats sound. It's a symbol of unique and user friendly UI of clie

Artem Prokop 71 May 4, 2022
A Chip-8 emulator written using Python's default libraries

Chippure A Chip-8 emulator written using Python's default libraries. Instructions: Simply launch the .py file and type the name of the Chip8 ROM you w

null 5 Sep 27, 2022
❤️ DaisyX 2.0 ❤️ A Powerful, Smart And Simple Group Manager ... Written with AioGram , Pyrogram and Telethon...

❤️ DaisyX 2.0 ❤️ A Powerful, Smart And Simple Group Manager ... Written with AioGram , Pyrogram and Telethon... ⭐️ Thanks to everyone who starred Dais

TeamOfDaisyX 44 Oct 6, 2022
A GETTR API client written in Python.

GUTTR A GETTR client library written in Python. I rushed to get this out so it's a bit janky. Open an issue if something is broken or missing. Getting

Roger Johnston 13 Nov 23, 2022