Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sol version #93

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"no-unused-vars": "off",
"no-inline-assembly": "off",
"visibility-modifier-order": "off",
"compiler-version": ["error", "0.7.4"],
"compiler-version": ["error", "^0.8.0"],
"func-visibility": ["warn", {"ignoreConstructors":true}],
"reason-string": ["warn", {"maxLength": 96}]
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The ERC-1155 token standard contains multiple classes of tokens referenced by ID
### Usage

```solidity
pragma solidity ^0.7.4;
pragma solidity ^0.8.0;

import '@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155.sol';

Expand Down
4 changes: 2 additions & 2 deletions SPECIFICATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@ Towards the end of a transaction, the fee to be paid is calculated as follow:

```solidity
// Amount of gas consumed so far
gasUsed = _startGas.sub(gasleft()).add(_g.baseGas);
gasUsed = _startGas - gasleft() + _g.baseGas;

// Reimburse up to gasLimit (instead of throwing)
fee = gasUsed > _g.gasLimit ? _g.gasLimit.mul(_g.gasPrice) : gasUsed.mul(_g.gasPrice);
fee = gasUsed > _g.gasLimit ? (_g.gasLimit * _g.gasPrice) : (gasUsed * _g.gasPrice);
```

The `baseGas` value is there to account for gas that was not accounted for by the gas counter, such as the CALLDATA, the expected cost of reimbursing the gas, a supplementary fee required by operator, etc.
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'solidity-coverage'

const config: HardhatUserConfig = {
solidity: {
version: '0.7.4',
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Sequence ERC-1155 contracts. For more information see, [github.com/0xsequence/er
### Usage from Solidity

```solidity
pragma solidity ^0.7.4;
pragma solidity ^0.8.0;

import '@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155.sol';

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export declare class ERC1155OperatorMock__factory extends ContractFactory {
}): TransactionRequest;
attach(address: string): ERC1155OperatorMock;
connect(signer: Signer): ERC1155OperatorMock__factory;
static readonly bytecode = "0x608060405234801561001057600080fd5b50610d18806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063e7e4f05211610050578063e7e4f05214610333578063eb46c45b14610519578063f06978b7146105f957610067565b80637ee7f69b1461006c57806387fd22fc1461024a575b600080fd5b610248600480360360c081101561008257600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101358216926040820135909216918101906080810160608201356401000000008111156100cb57600080fd5b8201836020820111156100dd57600080fd5b803590602001918460208302840111640100000000831117156100ff57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561014f57600080fd5b82018360208201111561016157600080fd5b8035906020019184602083028401116401000000008311171561018357600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156101d357600080fd5b8201836020820111156101e557600080fd5b8035906020019184600183028401116401000000008311171561020757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106dd945050505050565b005b610248600480360360e081101561026057600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013582169260408201359092169160608201359160808101359160a08201351515919081019060e0810160c08201356401000000008111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460018302840111640100000000831117156102f257600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061087a945050505050565b610248600480360360e081101561034957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013582169260408201359092169181019060808101606082013564010000000081111561039257600080fd5b8201836020820111156103a457600080fd5b803590602001918460208302840111640100000000831117156103c657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561041657600080fd5b82018360208201111561042857600080fd5b8035906020019184602083028401116401000000008311171561044a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295843515159590949093506040810192506020013590506401000000008111156104a457600080fd5b8201836020820111156104b657600080fd5b803590602001918460018302840111640100000000831117156104d857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109a6945050505050565b610248600480360360c081101561052f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013582169260408201359092169160608201359160808101359181019060c0810160a082013564010000000081111561058457600080fd5b82018360208201111561059657600080fd5b803590602001918460018302840111640100000000831117156105b857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b2d945050505050565b610248600480360360c081101561060f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101358216926040820135909216916060820135151591608081013515159181019060c0810160a082013564010000000081111561066857600080fd5b82018360208201111561067a57600080fd5b8035906020019184600183028401116401000000008311171561069c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c2e945050505050565b8573ffffffffffffffffffffffffffffffffffffffff16632eb2c2d686868686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561078d578181015183820152602001610775565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156107cc5781810151838201526020016107b4565b50505050905001848103825285818151815260200191508051906020019080838360005b838110156108085781810151838201526020016107f0565b50505050905090810190601f1680156108355780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15801561085a57600080fd5b505af115801561086e573d6000803e3d6000fd5b50505050505050505050565b8673ffffffffffffffffffffffffffffffffffffffff1663ce0b514b8787878787876040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561093457818101518382015260200161091c565b50505050905090810190601f1680156109615780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561098557600080fd5b505af1158015610999573d6000803e3d6000fd5b5050505050505050505050565b8673ffffffffffffffffffffffffffffffffffffffff1663a3d4926e8787878787876040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018060200180602001851515815260200180602001848103845288818151815260200191508051906020019060200280838360005b83811015610a5f578181015183820152602001610a47565b50505050905001848103835287818151815260200191508051906020019060200280838360005b83811015610a9e578181015183820152602001610a86565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015610ada578181015183820152602001610ac2565b50505050905090810190601f168015610b075780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b15801561098557600080fd5b8573ffffffffffffffffffffffffffffffffffffffff1663f242432a86868686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610bde578181015183820152602001610bc6565b50505050905090810190601f168015610c0b5780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b15801561085a57600080fd5b8573ffffffffffffffffffffffffffffffffffffffff1663f5d4c82086868686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184151581526020018315158152602001806020018281038252838181518152602001915080519060200190808383600083811015610bde578181015183820152602001610bc656fea2646970667358221220bdbcac80567895a7aa3160b9abf7b776e200be0b22bb4d8a98e82d5d9e3958b064736f6c63430007040033";
static readonly bytecode = "0x608060405234801561001057600080fd5b50610a4e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063e7e4f05211610050578063e7e4f05214610094578063eb46c45b146100a7578063f06978b7146100ba57600080fd5b80637ee7f69b1461006c57806387fd22fc14610081575b600080fd5b61007f61007a3660046104bd565b6100cd565b005b61007f61008f366004610586565b610161565b61007f6100a2366004610619565b6101f8565b61007f6100b53660046106d5565b610254565b61007f6100c8366004610749565b6102ae565b6040517f2eb2c2d600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690632eb2c2d690610127908890889088908890889060040161085e565b600060405180830381600087803b15801561014157600080fd5b505af1158015610155573d6000803e3d6000fd5b50505050505050505050565b6040517fce0b514b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169063ce0b514b906101bd908990899089908990899089906004016108c9565b600060405180830381600087803b1580156101d757600080fd5b505af11580156101eb573d6000803e3d6000fd5b5050505050505050505050565b6040517fa3d4926e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169063a3d4926e906101bd90899089908990899089908990600401610916565b6040517ff242432a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169063f242432a90610127908890889088908890889060040161098a565b6040517ff5d4c82000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169063f5d4c8209061012790889088908890889088906004016109cf565b803573ffffffffffffffffffffffffffffffffffffffff8116811461032c57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156103a7576103a7610331565b604052919050565b600082601f8301126103c057600080fd5b8135602067ffffffffffffffff8211156103dc576103dc610331565b8160051b6103eb828201610360565b928352848101820192828101908785111561040557600080fd5b83870192505b848310156104245782358252918301919083019061040b565b979650505050505050565b600082601f83011261044057600080fd5b813567ffffffffffffffff81111561045a5761045a610331565b61048b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610360565b8181528460208386010111156104a057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060c087890312156104d657600080fd5b6104df87610308565b95506104ed60208801610308565b94506104fb60408801610308565b9350606087013567ffffffffffffffff8082111561051857600080fd5b6105248a838b016103af565b9450608089013591508082111561053a57600080fd5b6105468a838b016103af565b935060a089013591508082111561055c57600080fd5b5061056989828a0161042f565b9150509295509295509295565b8035801515811461032c57600080fd5b600080600080600080600060e0888a0312156105a157600080fd5b6105aa88610308565b96506105b860208901610308565b95506105c660408901610308565b945060608801359350608088013592506105e260a08901610576565b915060c088013567ffffffffffffffff8111156105fe57600080fd5b61060a8a828b0161042f565b91505092959891949750929550565b600080600080600080600060e0888a03121561063457600080fd5b61063d88610308565b965061064b60208901610308565b955061065960408901610308565b9450606088013567ffffffffffffffff8082111561067657600080fd5b6106828b838c016103af565b955060808a013591508082111561069857600080fd5b6106a48b838c016103af565b94506106b260a08b01610576565b935060c08a01359150808211156106c857600080fd5b5061060a8a828b0161042f565b60008060008060008060c087890312156106ee57600080fd5b6106f787610308565b955061070560208801610308565b945061071360408801610308565b9350606087013592506080870135915060a087013567ffffffffffffffff81111561073d57600080fd5b61056989828a0161042f565b60008060008060008060c0878903121561076257600080fd5b61076b87610308565b955061077960208801610308565b945061078760408801610308565b935061079560608801610576565b92506107a360808801610576565b915060a087013567ffffffffffffffff81111561073d57600080fd5b600081518084526020808501945080840160005b838110156107ef578151875295820195908201906001016107d3565b509495945050505050565b6000815180845260005b8181101561082057602081850181015186830182015201610804565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a0604083015261089760a08301866107bf565b82810360608401526108a981866107bf565b905082810360808401526108bd81856107fa565b98975050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015250856040830152846060830152831515608083015260c060a08301526108bd60c08301846107fa565b600073ffffffffffffffffffffffffffffffffffffffff808916835280881660208401525060c0604083015261094f60c08301876107bf565b828103606084015261096181876107bf565b9050841515608084015282810360a084015261097d81856107fa565b9998505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a0608083015261042460a08301846107fa565b600073ffffffffffffffffffffffffffffffffffffffff80881683528087166020840152508415156040830152831515606083015260a0608083015261042460a08301846107fa56fea2646970667358221220bcae46749f04d09bd950ee0d2c027787c732cdc3e88f6c112ea2d4b1d04f5fc564736f6c63430008120033";
static readonly abi: {
inputs: {
internalType: string;
Expand Down
Loading