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
| /// This is how you'd write end-to-end (E2E) or integration tests for ink! contracts. | |
| /// | |
| /// When running these you need to make sure that you: | |
| /// - Compile the tests with the `e2e-tests` feature flag enabled (`--features e2e-tests`) | |
| /// - Are running a Substrate node which contains `pallet-contracts` in the background | |
| #[cfg(all(test, feature = "e2e-tests"))] | |
| mod e2e_tests { | |
| /// Imports all the definitions from the outer scope so we can use them here. | |
| use super::*; |
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
| contract Campaign { | |
| struct Request { | |
| string description; | |
| uint256 value; | |
| address recipient; | |
| bool complete; | |
| uint256 approvalCount; | |
| mapping(address => bool) approvals; | |
| } | |
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
| pragma solidity ^0.4.18; | |
| contract WFIL { | |
| string public name = "Wrapped FIL"; | |
| string public symbol = "WFIL"; | |
| uint8 public decimals = 18; | |
| address private admin; | |
| function WFIL() public { | |
| admin = msg.sender; |
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
| [ | |
| { | |
| "inputs": [], | |
| "name": "INVALID_INPUT", | |
| "type": "error" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "INVALID_POOL", | |
| "type": "error" |
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
| async function getPermitSignature(signer: any, token: any, spender: any, value: any, deadline: any) { | |
| const [nonce, name, version, chainId] = await Promise.all([ | |
| token.nonces(signer.address), | |
| token.name(), | |
| "1", | |
| 80001, | |
| ]) | |
| console.log(nonce, name, version, chainId) | |
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
| [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "_name", | |
| "type": "string" | |
| }, | |
| { | |
| "internalType": "string", |
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
| [ | |
| { | |
| "inputs": [], | |
| "name": "INSUFFICENT_POINTS", | |
| "type": "error" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "INVALID_INPUT", | |
| "type": "error" |
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
| [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "_token0", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", |