Upgrade Contracts #2
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
| name: Upgrade Contracts | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| network: | |
| description: 'Network (same as deployment)' | |
| required: true | |
| type: choice | |
| options: | |
| - base_sepolia | |
| - base | |
| proxy_address: | |
| description: 'Proxy contract address (not implementation!)' | |
| required: true | |
| jobs: | |
| upgrade: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Upgrade to SplitBaseV2 | |
| env: | |
| PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
| BASESCAN_API_KEY: ${{ secrets.BASESCAN_API_KEY }} | |
| PROXY_ADDRESS: ${{ inputs.proxy_address }} | |
| run: | | |
| echo "🚀 Upgrading SplitBase to V2..." | |
| echo "Network: ${{ inputs.network }}" | |
| echo "Proxy: $PROXY_ADDRESS" | |
| forge script script/UpgradeToV2.s.sol \ | |
| --rpc-url ${{ inputs.network }} \ | |
| --broadcast \ | |
| --verify \ | |
| -vvvv | |
| echo "" | |
| echo "✅ Upgrade complete!" | |
| echo "Proxy $PROXY_ADDRESS now runs SplitBaseV2" | |
| echo "" | |
| echo "New V2 features available:" | |
| echo "- Bucket categorization (TEAM, INVESTORS, TREASURY, etc.)" | |
| echo "- Revenue source tracking (BASE_PAY, PROTOCOL_FEES, etc.)" | |
| echo "- Distribution history with full metadata" | |
| echo "- getBucketRecipients() and getBucketTotalShares()" | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: upgrade-${{ inputs.network }} | |
| path: broadcast/ |