Skip to content

Commit

Permalink
GITBOOK-504: remove APP_ID as a constant to avoid conflicts with alre…
Browse files Browse the repository at this point in the history
…ady existing immutable in contract
  • Loading branch information
yum0e authored and gitbook-bot committed Jul 18, 2023
1 parent b938806 commit b76215c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ In your smart contract, the most basic Sismo Connect Config looks like this:
import "sismo-connect-solidity/SismoConnectLib.sol"; // <--- add a Sismo Connect import

contract MyContract is SismoConnect {
bytes16 public constant APP_ID = 0xf4977993e52606cfd67b7a1cde717069;
bytes16 private _appId = 0xf4977993e52606cfd67b7a1cde717069;

constructor()
SismoConnect(buildConfig(APP_ID)) // <--- Sismo Connect constructor
SismoConnect(buildConfig(_appId)) // <--- Sismo Connect constructor
{}
}
```
Expand Down Expand Up @@ -222,11 +222,11 @@ In your smart contract, the most basic Sismo Connect Config looks like this:
import "sismo-connect-solidity/SismoConnectLib.sol"; // <--- add a Sismo Connect import

contract MyContract is SismoConnect {
bytes16 public constant APP_ID = 0xf4977993e52606cfd67b7a1cde717069;
bool isImpersonationMode = true;
bytes16 private _appId = 0xf4977993e52606cfd67b7a1cde717069;
bool private _isImpersonationMode = true;

constructor()
SismoConnect(buildConfig(APP_ID, isImpersonationMode))
SismoConnect(buildConfig(_appId, _isImpersonationMode))
{}
}
```
Expand Down
8 changes: 4 additions & 4 deletions build-with-sismo-connect/tutorials/deploy-your-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ export const sismoConnectConfig: SismoConnectConfig = {
import "sismo-connect-solidity/SismoConnectLib.sol";
contract A is SismoConnect {
// add your appId as a constant
bytes16 public constant APP_ID = 0xf4977993e52606cfd67b7a1cde717069;
// add your appId
bytes16 private _appId = 0xf4977993e52606cfd67b7a1cde717069;
// use impersonated mode for testing
bool public constant IS_IMPERSONATION_MODE = true;
bool private _isImpersonationMode = true;
constructor()
// use buildConfig helper to easily build a Sismo Connect config in Solidity
SismoConnect(buildConfig(APP_ID, IS_IMPERSONATION_MODE))
SismoConnect(buildConfig(_appId, _isImpersonationMode))
{}
}
```
Expand Down
2 changes: 1 addition & 1 deletion build-with-sismo-connect/tutorials/tuto.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pragma solidity ^0.8.17;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
// Sismo Connect import
import "sismo-connect-solidity/SismoLib.sol";
import "sismo-connect-solidity/SismoConnectLib.sol";
contract Airdrop is ERC20, SismoConnect { // <--- add a Sismo Connect inheritance
// add your appId
Expand Down

0 comments on commit b76215c

Please sign in to comment.