• Adrian Sutton's avatar
    op-geth: Update to latest op-geth · f5a1a409
    Adrian Sutton authored
    Brings in the Regolith consensus changes for the execution layer
    Updates the update-op-geth.py script to account for the new geth version and op-wheel being in the main go.mod now
    f5a1a409
update-op-geth.py 589 Bytes
#!/usr/bin/env python3


import json
import subprocess
import os


GETH_VERSION='v1.11.2'


def main():
	for project in ('.', 'indexer'):
		print(f'Updating {project}...')
		update_mod(project)


def update_mod(project):
	print('Replacing...')
	subprocess.run([
		'go',
		'mod',
		'edit',
		'-replace',
		f'github.com/ethereum/go-ethereum@{GETH_VERSION}=github.com/ethereum-optimism/op-geth@optimism'
	], cwd=os.path.join(project), check=True)
	print('Tidying...')
	subprocess.run([
		'go',
		'mod',
		'tidy'
	], cwd=os.path.join(project), check=True)


if __name__ == '__main__':
	main()