Smart contracts

Static smart contracts

Smart contract sponsoring

Smart contract may be sponsored, but when web3 or ethers.js perform the transaction, they are using EIP1559 transactions and set gas price as double of default gas price.
This causes the sponsoring of this transaction to be disabled to prevent manipulation of the transaction queue at the expense of the sponsor.

So if you enabled sponsoring for your smart contract, the gas price should be set explicitly in every transaction you want to be sponsored.
The best option here is just pass the default gas price of the provider:

ethers: await provider.getGasPrice()
web3: await web3.eth.getGasPrice()

Otherwise, the caller will be charged for the transaction.

Also can be interesting these two smart contract stubs:

ContractHelpers

Kind of «static» smart contract in our chain with some helper functions ContractHelpers.solopen in new window

UniqueNFT - NFT

UniqueNft.sol documentation

Marketplace smart contract

Marketplace smart contract could be found here:

MarketPlace.solopen in new window