Pushed Live versions
This commit is contained in:
1 parent
d06f856700
commit
f37326855e
4 files changed
+2775
-47
No files matched your search
@@ -536,43 +536,15 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "createdAt",
|
"name": "createdAt",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "createVesting",
|
|
||||||
"outputs": [],
|
|
||||||
"stateMutability": "nonpayable",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "user",
|
|
||||||
"type": "address"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "amount",
|
"name": "claimedAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "bonus",
|
"name": "claimedBonus",
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "lockedUntil",
|
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "token",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "usdAmount",
|
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1898,6 +1870,69 @@
|
|||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "user",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "vestingIndex",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "bonus",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "lockedUntil",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "usdAmount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "lastClaimed",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "claimedAmount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "claimedBonus",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "updateVesting",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -2146,8 +2181,8 @@
|
|||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000d6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000735760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d35780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615d8480620000e66000396000f3fe608060405234801561001057600080fd5b506004361061036e5760003560e01c8062159da6146103735780630137451814610399578063022914a7146103cf5780630519da3214610402578063092c76101461040b5780630a84096a1461042b5780630a910a6d1461043e5780630c7d63861461044757806313baee5b14610451578063173825d9146104715780631764303d146104845780631aefa2d1146104975780631eb9e53e146104aa5780632ded58aa146104bd5780632e46fed8146104c65780633ba8396e146104ef5780633c92f98d146105125780633e4bc6bc146105345780633f35e7221461053d57806343a32f891461055057806343c7c011146105cb578063441a4175146105de5780634a61f1e5146105ff57806351e624721461061f57806351f6cf2f14610632578063549e61d3146106535780635811622714610666578063592d1dd11461067957806361d1080b1461069957806362cd6a09146106a157806367a74ddc146106b85780636ef569a5146106cb5780637065cb48146106d457806374d1c8e3146106e757806375060a0b146106fa5780637a0c6dc01461071a5780637bc221ac1461073a5780637e6d99261461074d57806380259e691461077657806380ca0ecf146107895780638129fc1c1461079c57806382b75681146107a457806384e8520a146107b7578063853e0df2146107d75780638939d787146107ea5780638f82818f146107f35780639437e32e14610813578063953d16bf1461082657806396fd111a146108395780639cb6f556146108595780639f3a676c1461086c578063a0d46758146108b8578063aaf4b04d146108d8578063ac97b417146108eb578063b6c3dc4c146108fe578063b92a349f1461091e578063bc0bc6ba14610931578063bd84477d14610951578063bed9757e146109b9578063c0c07d17146109da578063c2676603146109ed578063c32d3ae2146109f5578063c6b61e4c14610a28578063c7b530b014610a98578063cc573a9114610ab8578063ce13d09014610af4578063cfcf331914610b07578063d532bdfe14610b27578063da1b436414610b3a578063e88f8e6614610b5a578063eacdc5ff14610b6d578063eb44e0a314610b76578063ef5d9ae814610b89578063f2bb563014610ba9578063fe2f50d014610bbc578063fee6018c14610bc5578063ffecf51614610bd8575b600080fd5b6103866103813660046152c2565b610beb565b6040519081526020015b60405180910390f35b6103c26103a73660046152c2565b6004602052600090815260409020546001600160a01b031681565b60405161039091906152e4565b6103f26103dd3660046152c2565b60006020819052908152604090205460ff1681565b6040519015158152602001610390565b61038660075481565b6103866104193660046152c2565b60066020526000908152604090205481565b6103866104393660046152f8565b610c85565b61038660125481565b61044f610dbd565b005b61038661045f3660046152c2565b600c6020526000908152604090205481565b61044f61047f3660046152c2565b610f83565b61044f610492366004615366565b611074565b61044f6104a53660046153a7565b6112b2565b6103866104b83660046152c2565b6112e6565b61038660115481565b6103866104d43660046152c2565b6001600160a01b03166000908152601c602052604090205490565b6103f26104fd3660046152c2565b60016020526000908152604090205460ff1681565b610525610520366004615366565b61132a565b604051610390939291906153fb565b610386601d5481565b61044f61054b3660046152f8565b61151b565b61059c61055e3660046152f8565b60146020908152600092835260408084209091529082529020805460018201546002830154600390930154919290916001600160a01b039091169084565b604051610390949392919093845260208401929092526001600160a01b03166040830152606082015260800190565b61044f6105d93660046152c2565b611590565b6105f16105ec3660046153a7565b6118fe565b604051610390929190615431565b61038661060d3660046152c2565b60186020526000908152604090205481565b61044f61062d3660046153a7565b611936565b6106456106403660046152f8565b61196a565b60405161039092919061544a565b61044f610661366004615458565b6119a6565b61044f6106743660046154c3565b611d13565b6103866106873660046152c2565b60056020526000908152604090205481565b601b54610386565b6106a9611f7d565b60405161039093929190615511565b61044f6106c63660046155b3565b6121a4565b61038660165481565b61044f6106e23660046152c2565b612201565b61044f6106f53660046155e6565b6122d3565b6103866107083660046152c2565b600a6020526000908152604090205481565b61072d6107283660046152c2565b6124b6565b6040516103909190615651565b6103866107483660046152c2565b61259d565b61038661075b3660046152c2565b6001600160a01b031660009081526017602052604090205490565b61044f6107843660046153a7565b612771565b6103866107973660046152f8565b6127a5565b61044f6128b1565b61044f6107b23660046153a7565b612ad9565b6103866107c53660046152c2565b600d6020526000908152604090205481565b61044f6107e53660046153a7565b612b6b565b61038660135481565b6103866108013660046152c2565b60176020526000908152604090205481565b61044f6108213660046156ff565b612be9565b61044f6108343660046153a7565b612c30565b61084c6108473660046154c3565b612f1e565b6040516103909190615791565b61044f6108673660046153a7565b6130bd565b61087f61087a3660046153a7565b61334c565b6040805196875260208701959095529385019290925260608401526001600160a01b0390811660808401521660a082015260c001610390565b6108cb6108c63660046152f8565b61339f565b604051610390919061Line truncated
|
"bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000d6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000735760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d35780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6162d480620000e66000396000f3fe608060405234801561001057600080fd5b506004361061045e5760003560e01c80637e6d99261161024c578063bd84477d11610146578063d532bdfe116100c3578063ef5d9ae811610087578063ef5d9ae814610c9c578063f2bb563014610cbc578063fe2f50d014610ccf578063fee6018c14610cd8578063ffecf51614610ceb57600080fd5b8063d532bdfe14610c3a578063da1b436414610c4d578063e88f8e6614610c6d578063eacdc5ff14610c80578063eb44e0a314610c8957600080fd5b8063c6b61e4c1161010a578063c6b61e4c14610b3b578063c7b530b014610bab578063cc573a9114610bcb578063ce13d09014610c07578063cfcf331914610c1a57600080fd5b8063bd84477d14610a64578063bed9757e14610acc578063c0c07d1714610aed578063c267660314610b00578063c32d3ae214610b0857600080fd5b8063953d16bf116101d4578063aaf4b04d11610198578063aaf4b04d146109eb578063ac97b417146109fe578063b6c3dc4c14610a11578063b92a349f14610a31578063bc0bc6ba14610a4457600080fd5b8063953d16bf1461093957806396fd111a1461094c5780639cb6f5561461096c5780639f3a676c1461097f578063a0d46758146109cb57600080fd5b806382b756811161021b57806382b75681146108ca57806384e8520a146108dd578063853e0df2146108fd5780638939d787146109105780638f82818f1461091957600080fd5b80637e6d99261461087357806380259e691461089c57806380ca0ecf146108af5780638129fc1c146108c257600080fd5b806341e23c2a1161035d578063592d1dd1116102e55780636ef569a5116102a95780636ef569a5146108045780637065cb481461080d57806375060a0b146108205780637a0c6dc0146108405780637bc221ac1461086057600080fd5b8063592d1dd11461079f57806361d1080b146107bf57806362cd6a09146107c757806363624c83146107de57806367a74ddc146107f157600080fd5b80634a61f1e51161032c5780634a61f1e51461071e57806351e624721461073e57806351f6cf2f14610751578063549e61d314610779578063581162271461078c57600080fd5b806341e23c2a1461064b57806343a32f891461065e57806343c7c011146106d9578063441a4175146106ec57600080fd5b8063173825d9116103eb5780632e46fed8116103af5780632e46fed8146105c15780633ba8396e146105ea5780633c92f98d1461060d5780633e4bc6bc1461062f5780633f35e7221461063857600080fd5b8063173825d91461056c5780631764303d1461057f5780631aefa2d1146105925780631eb9e53e146105a55780632ded58aa146105b857600080fd5b8063092c761011610432578063092c7610146105065780630a84096a146105265780630a910a6d146105395780630c7d63861461054257806313baee5b1461054c57600080fd5b8062159da6146104635780630137451814610489578063022914a7146104ca5780630519da32146104fd575b600080fd5b610476610471366004615930565b610cfe565b6040519081526020015b60405180910390f35b6104b2610497366004615930565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610480565b6104ed6104d8366004615930565b60006020819052908152604090205460ff1681565b6040519015158152602001610480565b61047660075481565b610476610514366004615930565b60066020526000908152604090205481565b610476610534366004615952565b610d98565b61047660125481565b61054a610ed0565b005b61047661055a366004615930565b600c6020526000908152604090205481565b61054a61057a366004615930565b6110cf565b61054a61058d3660046159c0565b6111c0565b61054a6105a0366004615a01565b61142b565b6104766105b3366004615930565b61145f565b61047660115481565b6104766105cf366004615930565b6001600160a01b03166000908152601c602052604090205490565b6104ed6105f8366004615930565b60016020526000908152604090205460ff1681565b61062061061b3660046159c0565b6114a3565b60405161048093929190615a55565b610476601d5481565b61054a610646366004615952565b611691565b61054a610659366004615a8b565b611718565b6106aa61066c366004615952565b60146020908152600092835260408084209091529082529020805460018201546002830154600390930154919290916001600160a01b039091169084565b604051610480949392919093845260208401929092526001600160a01b03166040830152606082015260800190565b61054a6106e7366004615930565b611a22565b6106ff6106fa366004615a01565b611dab565b604080516001600160a01b039093168352602083019190915201610480565b61047661072c366004615930565b60186020526000908152604090205481565b61054a61074c366004615a01565b611de3565b61076461075f366004615952565b611e17565b60408051928352602083019190915201610480565b61054a610787366004615b17565b611e53565b61054a61079a366004615b82565b6121be565b6104766107ad366004615930565b60056020526000908152604090205481565b601b54610476565b6107cf612495565b60405161048093929190615ba4565b61054a6107ec366004615c6d565b6126e8565b61054a6107ff366004615ceb565b6128d6565b61047660165481565b61054a61081b366004615930565b612933565b61047661082e366004615930565b600a6020526000908152604090205481565b61085361084e366004615930565b612a05565b6040516104809190615d1e565b61047661086e366004615930565b612aec565b610476610881366004615930565b6001600160a01b031660009081526017602052604090205490565b61054a6108aa366004615a01565b612ccf565b6104766108bd366004615952565b612d03565b61054a612e0f565b61054a6108d836600461Line truncated
|
||||||
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061036e5760003560e01c8062159da6146103735780630137451814610399578063022914a7146103cf5780630519da3214610402578063092c76101461040b5780630a84096a1461042b5780630a910a6d1461043e5780630c7d63861461044757806313baee5b14610451578063173825d9146104715780631764303d146104845780631aefa2d1146104975780631eb9e53e146104aa5780632ded58aa146104bd5780632e46fed8146104c65780633ba8396e146104ef5780633c92f98d146105125780633e4bc6bc146105345780633f35e7221461053d57806343a32f891461055057806343c7c011146105cb578063441a4175146105de5780634a61f1e5146105ff57806351e624721461061f57806351f6cf2f14610632578063549e61d3146106535780635811622714610666578063592d1dd11461067957806361d1080b1461069957806362cd6a09146106a157806367a74ddc146106b85780636ef569a5146106cb5780637065cb48146106d457806374d1c8e3146106e757806375060a0b146106fa5780637a0c6dc01461071a5780637bc221ac1461073a5780637e6d99261461074d57806380259e691461077657806380ca0ecf146107895780638129fc1c1461079c57806382b75681146107a457806384e8520a146107b7578063853e0df2146107d75780638939d787146107ea5780638f82818f146107f35780639437e32e14610813578063953d16bf1461082657806396fd111a146108395780639cb6f556146108595780639f3a676c1461086c578063a0d46758146108b8578063aaf4b04d146108d8578063ac97b417146108eb578063b6c3dc4c146108fe578063b92a349f1461091e578063bc0bc6ba14610931578063bd84477d14610951578063bed9757e146109b9578063c0c07d17146109da578063c2676603146109ed578063c32d3ae2146109f5578063c6b61e4c14610a28578063c7b530b014610a98578063cc573a9114610ab8578063ce13d09014610af4578063cfcf331914610b07578063d532bdfe14610b27578063da1b436414610b3a578063e88f8e6614610b5a578063eacdc5ff14610b6d578063eb44e0a314610b76578063ef5d9ae814610b89578063f2bb563014610ba9578063fe2f50d014610bbc578063fee6018c14610bc5578063ffecf51614610bd8575b600080fd5b6103866103813660046152c2565b610beb565b6040519081526020015b60405180910390f35b6103c26103a73660046152c2565b6004602052600090815260409020546001600160a01b031681565b60405161039091906152e4565b6103f26103dd3660046152c2565b60006020819052908152604090205460ff1681565b6040519015158152602001610390565b61038660075481565b6103866104193660046152c2565b60066020526000908152604090205481565b6103866104393660046152f8565b610c85565b61038660125481565b61044f610dbd565b005b61038661045f3660046152c2565b600c6020526000908152604090205481565b61044f61047f3660046152c2565b610f83565b61044f610492366004615366565b611074565b61044f6104a53660046153a7565b6112b2565b6103866104b83660046152c2565b6112e6565b61038660115481565b6103866104d43660046152c2565b6001600160a01b03166000908152601c602052604090205490565b6103f26104fd3660046152c2565b60016020526000908152604090205460ff1681565b610525610520366004615366565b61132a565b604051610390939291906153fb565b610386601d5481565b61044f61054b3660046152f8565b61151b565b61059c61055e3660046152f8565b60146020908152600092835260408084209091529082529020805460018201546002830154600390930154919290916001600160a01b039091169084565b604051610390949392919093845260208401929092526001600160a01b03166040830152606082015260800190565b61044f6105d93660046152c2565b611590565b6105f16105ec3660046153a7565b6118fe565b604051610390929190615431565b61038661060d3660046152c2565b60186020526000908152604090205481565b61044f61062d3660046153a7565b611936565b6106456106403660046152f8565b61196a565b60405161039092919061544a565b61044f610661366004615458565b6119a6565b61044f6106743660046154c3565b611d13565b6103866106873660046152c2565b60056020526000908152604090205481565b601b54610386565b6106a9611f7d565b60405161039093929190615511565b61044f6106c63660046155b3565b6121a4565b61038660165481565b61044f6106e23660046152c2565b612201565b61044f6106f53660046155e6565b6122d3565b6103866107083660046152c2565b600a6020526000908152604090205481565b61072d6107283660046152c2565b6124b6565b6040516103909190615651565b6103866107483660046152c2565b61259d565b61038661075b3660046152c2565b6001600160a01b031660009081526017602052604090205490565b61044f6107843660046153a7565b612771565b6103866107973660046152f8565b6127a5565b61044f6128b1565b61044f6107b23660046153a7565b612ad9565b6103866107c53660046152c2565b600d6020526000908152604090205481565b61044f6107e53660046153a7565b612b6b565b61038660135481565b6103866108013660046152c2565b60176020526000908152604090205481565b61044f6108213660046156ff565b612be9565b61044f6108343660046153a7565b612c30565b61084c6108473660046154c3565b612f1e565b6040516103909190615791565b61044f6108673660046153a7565b6130bd565b61087f61087a3660046153a7565b61334c565b6040805196875260208701959095529385019290925260608401526001600160a01b0390811660808401521660a082015260c001610390565b6108cb6108c63660046152f8565b61339f565b60405161039091906157df565b61044f6108e63660046153a7565b613403565b61044f6108f93660046153a7565b613489565b61091161090c3660046152f8565b61387b565b6040516103909190615819565b61044f61092c366004615827565b61398d565b61094461093f3660046153a7565b613b2e565b604051610390919061585a565b61096461095f3660046152f8565b613bd2565b604080519a8b5260208b0199909952978901969096526060880194909452608087019290925260a086015260c08501526001600160a01b031660e08401521515610100830152610120820152610140016103Line truncated
|
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061045e5760003560e01c80637e6d99261161024c578063bd84477d11610146578063d532bdfe116100c3578063ef5d9ae811610087578063ef5d9ae814610c9c578063f2bb563014610cbc578063fe2f50d014610ccf578063fee6018c14610cd8578063ffecf51614610ceb57600080fd5b8063d532bdfe14610c3a578063da1b436414610c4d578063e88f8e6614610c6d578063eacdc5ff14610c80578063eb44e0a314610c8957600080fd5b8063c6b61e4c1161010a578063c6b61e4c14610b3b578063c7b530b014610bab578063cc573a9114610bcb578063ce13d09014610c07578063cfcf331914610c1a57600080fd5b8063bd84477d14610a64578063bed9757e14610acc578063c0c07d1714610aed578063c267660314610b00578063c32d3ae214610b0857600080fd5b8063953d16bf116101d4578063aaf4b04d11610198578063aaf4b04d146109eb578063ac97b417146109fe578063b6c3dc4c14610a11578063b92a349f14610a31578063bc0bc6ba14610a4457600080fd5b8063953d16bf1461093957806396fd111a1461094c5780639cb6f5561461096c5780639f3a676c1461097f578063a0d46758146109cb57600080fd5b806382b756811161021b57806382b75681146108ca57806384e8520a146108dd578063853e0df2146108fd5780638939d787146109105780638f82818f1461091957600080fd5b80637e6d99261461087357806380259e691461089c57806380ca0ecf146108af5780638129fc1c146108c257600080fd5b806341e23c2a1161035d578063592d1dd1116102e55780636ef569a5116102a95780636ef569a5146108045780637065cb481461080d57806375060a0b146108205780637a0c6dc0146108405780637bc221ac1461086057600080fd5b8063592d1dd11461079f57806361d1080b146107bf57806362cd6a09146107c757806363624c83146107de57806367a74ddc146107f157600080fd5b80634a61f1e51161032c5780634a61f1e51461071e57806351e624721461073e57806351f6cf2f14610751578063549e61d314610779578063581162271461078c57600080fd5b806341e23c2a1461064b57806343a32f891461065e57806343c7c011146106d9578063441a4175146106ec57600080fd5b8063173825d9116103eb5780632e46fed8116103af5780632e46fed8146105c15780633ba8396e146105ea5780633c92f98d1461060d5780633e4bc6bc1461062f5780633f35e7221461063857600080fd5b8063173825d91461056c5780631764303d1461057f5780631aefa2d1146105925780631eb9e53e146105a55780632ded58aa146105b857600080fd5b8063092c761011610432578063092c7610146105065780630a84096a146105265780630a910a6d146105395780630c7d63861461054257806313baee5b1461054c57600080fd5b8062159da6146104635780630137451814610489578063022914a7146104ca5780630519da32146104fd575b600080fd5b610476610471366004615930565b610cfe565b6040519081526020015b60405180910390f35b6104b2610497366004615930565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610480565b6104ed6104d8366004615930565b60006020819052908152604090205460ff1681565b6040519015158152602001610480565b61047660075481565b610476610514366004615930565b60066020526000908152604090205481565b610476610534366004615952565b610d98565b61047660125481565b61054a610ed0565b005b61047661055a366004615930565b600c6020526000908152604090205481565b61054a61057a366004615930565b6110cf565b61054a61058d3660046159c0565b6111c0565b61054a6105a0366004615a01565b61142b565b6104766105b3366004615930565b61145f565b61047660115481565b6104766105cf366004615930565b6001600160a01b03166000908152601c602052604090205490565b6104ed6105f8366004615930565b60016020526000908152604090205460ff1681565b61062061061b3660046159c0565b6114a3565b60405161048093929190615a55565b610476601d5481565b61054a610646366004615952565b611691565b61054a610659366004615a8b565b611718565b6106aa61066c366004615952565b60146020908152600092835260408084209091529082529020805460018201546002830154600390930154919290916001600160a01b039091169084565b604051610480949392919093845260208401929092526001600160a01b03166040830152606082015260800190565b61054a6106e7366004615930565b611a22565b6106ff6106fa366004615a01565b611dab565b604080516001600160a01b039093168352602083019190915201610480565b61047661072c366004615930565b60186020526000908152604090205481565b61054a61074c366004615a01565b611de3565b61076461075f366004615952565b611e17565b60408051928352602083019190915201610480565b61054a610787366004615b17565b611e53565b61054a61079a366004615b82565b6121be565b6104766107ad366004615930565b60056020526000908152604090205481565b601b54610476565b6107cf612495565b60405161048093929190615ba4565b61054a6107ec366004615c6d565b6126e8565b61054a6107ff366004615ceb565b6128d6565b61047660165481565b61054a61081b366004615930565b612933565b61047661082e366004615930565b600a6020526000908152604090205481565b61085361084e366004615930565b612a05565b6040516104809190615d1e565b61047661086e366004615930565b612aec565b610476610881366004615930565b6001600160a01b031660009081526017602052604090205490565b61054a6108aa366004615a01565b612ccf565b6104766108bd366004615952565b612d03565b61054a612e0f565b61054a6108d8366004615a01565b612ff2565b6104766108eb366004615930565b600d6020526000908152604090205481565b61054a61090b366004615a01565b613084565b61047660135481565b610476610927366004615930565b60176020526000908152604090205481565b61054a610947366004615a01565b613120565b61095f61095a366004615b82565b613427565b6040516104809190615dcc565b61054a61097a366004615a01565b6135f7565b61099261098d366004615a01565b6138e8565b6040805196875260208701959095529385019290925260608401526001600160a01b0390Line truncated
|
||||||
"linkReferences": {},
|
"linkReferences": {},
|
||||||
"deployedLinkReferences": {}
|
"deployedLinkReferences": {}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -160,11 +160,8 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
|||||||
authorizedBots[0x7c40f272570fdf9549d6f67493aC250a1DB52F27] = true;
|
authorizedBots[0x7c40f272570fdf9549d6f67493aC250a1DB52F27] = true;
|
||||||
authorizedBots[0x8a9281ECEcE9b599C2f42d829C3d0d8e74b7083e] = true;
|
authorizedBots[0x8a9281ECEcE9b599C2f42d829C3d0d8e74b7083e] = true;
|
||||||
|
|
||||||
// Initialize big stake for the address
|
|
||||||
userBigStake[0x8a9281ECEcE9b599C2f42d829C3d0d8e74b7083e] = 10000 * 1e18;
|
|
||||||
totalBigStakes += 10000 * 1e18;
|
|
||||||
|
|
||||||
unlockDelay = 60 * 60 * 36;
|
unlockDelay = 60 * 60 * 72;
|
||||||
maxUnlockPercentage = 100; // 1% maximum unlock per epoch
|
maxUnlockPercentage = 100; // 1% maximum unlock per epoch
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,10 +545,11 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
|||||||
// Update totalBigStakes directly (subtract old, add new)
|
// Update totalBigStakes directly (subtract old, add new)
|
||||||
totalBigStakes = totalBigStakes - userBigStake[users[i]] + amounts[i];
|
totalBigStakes = totalBigStakes - userBigStake[users[i]] + amounts[i];
|
||||||
|
|
||||||
// Set original stake only if this is the first time (never changes after)
|
// Set original stake
|
||||||
if (userOriginalStake[users[i]] == 0) {
|
|
||||||
userOriginalStake[users[i]] = amounts[i];
|
userOriginalStake[users[i]] = amounts[i];
|
||||||
}
|
|
||||||
|
// Set last claimed epoch to current epoch
|
||||||
|
userLastClaimedEpoch[users[i]] = currentEpochId;
|
||||||
|
|
||||||
// Set user's big stake
|
// Set user's big stake
|
||||||
userBigStake[users[i]] = amounts[i];
|
userBigStake[users[i]] = amounts[i];
|
||||||
@@ -750,6 +748,11 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
|||||||
// Transfer payment from buyer to seller (direct transfer)
|
// Transfer payment from buyer to seller (direct transfer)
|
||||||
IERC20(BSC_TOKEN).safeTransferFrom(msg.sender, seller, salePrice);
|
IERC20(BSC_TOKEN).safeTransferFrom(msg.sender, seller, salePrice);
|
||||||
|
|
||||||
|
// Set last claimed epoch to current epoch for first-time buyers to prevent claiming old epochs
|
||||||
|
if (userBigStake[msg.sender] == 0) {
|
||||||
|
userLastClaimedEpoch[msg.sender] = currentEpochId;
|
||||||
|
}
|
||||||
|
|
||||||
// Transfer stakes: remove from seller, add to buyer (minus protocol share)
|
// Transfer stakes: remove from seller, add to buyer (minus protocol share)
|
||||||
userBigStake[seller] -= value;
|
userBigStake[seller] -= value;
|
||||||
userBigStake[msg.sender] += buyerStake;
|
userBigStake[msg.sender] += buyerStake;
|
||||||
@@ -825,17 +828,13 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
|||||||
/// @param lockedUntil The unlock timestamp for the vesting
|
/// @param lockedUntil The unlock timestamp for the vesting
|
||||||
/// @param token The token address for the vesting
|
/// @param token The token address for the vesting
|
||||||
/// @param usdAmount The USD value of the vesting
|
/// @param usdAmount The USD value of the vesting
|
||||||
function createVesting(address user, uint256 amount, uint256 bonus, uint256 lockedUntil, address token, uint256 usdAmount) external onlyBot {
|
function createVesting(address user, uint256 amount, uint256 bonus, uint256 lockedUntil, address token, uint256 usdAmount, uint256 lastClaimed, uint256 createdAt, uint256 claimedAmount, uint256 claimedBonus) public onlyBot {
|
||||||
createVesting(user, amount, bonus, lockedUntil, token, usdAmount, block.timestamp, block.timestamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
function createVesting(address user, uint256 amount, uint256 bonus, uint256 lockedUntil, address token, uint256 usdAmount, uint256 lastClaimed, uint256 createdAt) public onlyBot {
|
|
||||||
vestings[user].push(Vesting({
|
vestings[user].push(Vesting({
|
||||||
amount: amount,
|
amount: amount,
|
||||||
bonus: bonus,
|
bonus: bonus,
|
||||||
lockedUntil: lockedUntil,
|
lockedUntil: lockedUntil,
|
||||||
claimedAmount: 0,
|
claimedAmount: claimedAmount,
|
||||||
claimedBonus: 0,
|
claimedBonus: claimedBonus,
|
||||||
lastClaimed: lastClaimed,
|
lastClaimed: lastClaimed,
|
||||||
createdAt: createdAt,
|
createdAt: createdAt,
|
||||||
token: token,
|
token: token,
|
||||||
@@ -844,7 +843,47 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
dollarsVested[user] += usdAmount;
|
dollarsVested[user] += usdAmount;
|
||||||
vestedTotal[token] += amount;
|
vestedTotal[token] += amount - claimedAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @notice Update an existing vesting at a specific index
|
||||||
|
/// @dev Only updates existing vestings. Fails if the index doesn't exist.
|
||||||
|
/// @param user The user address to update vesting for
|
||||||
|
/// @param vestingIndex The index of the existing vesting to update
|
||||||
|
/// @param amount The vesting amount
|
||||||
|
/// @param bonus The bonus amount
|
||||||
|
/// @param lockedUntil The lock timestamp
|
||||||
|
/// @param token The token address
|
||||||
|
/// @param usdAmount The USD value
|
||||||
|
/// @param lastClaimed The last claimed timestamp
|
||||||
|
/// @param createdAt The creation timestamp
|
||||||
|
/// @param claimedAmount The already claimed amount
|
||||||
|
/// @param claimedBonus The already claimed bonus
|
||||||
|
function updateVesting(address user, uint256 vestingIndex, uint256 amount, uint256 bonus, uint256 lockedUntil, address token, uint256 usdAmount, uint256 lastClaimed, uint256 createdAt, uint256 claimedAmount, uint256 claimedBonus) public onlyBot {
|
||||||
|
require(vestingIndex < vestings[user].length, "Vesting index does not exist");
|
||||||
|
|
||||||
|
// Subtract old values from totals first
|
||||||
|
Vesting storage oldVesting = vestings[user][vestingIndex];
|
||||||
|
dollarsVested[user] -= oldVesting.usdAmount;
|
||||||
|
vestedTotal[oldVesting.token] -= (oldVesting.amount - oldVesting.claimedAmount);
|
||||||
|
|
||||||
|
// Update the vesting at the specified index
|
||||||
|
vestings[user][vestingIndex] = Vesting({
|
||||||
|
amount: amount,
|
||||||
|
bonus: bonus,
|
||||||
|
lockedUntil: lockedUntil,
|
||||||
|
claimedAmount: claimedAmount,
|
||||||
|
claimedBonus: claimedBonus,
|
||||||
|
lastClaimed: lastClaimed,
|
||||||
|
createdAt: createdAt,
|
||||||
|
token: token,
|
||||||
|
complete: false,
|
||||||
|
usdAmount: usdAmount
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add new values to totals
|
||||||
|
dollarsVested[user] += usdAmount;
|
||||||
|
vestedTotal[token] += amount - claimedAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
// /// @notice Migrates all vestings from an old address to a new address
|
// /// @notice Migrates all vestings from an old address to a new address
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user